Rendering options¶
General¶
render-output-format¶
- type
string
- default
automatic
- description
Image file format.
If this option is not set, then Indigo deduces image format from the file extension. Supported formats:
png
pdf
svg
emf (windows)
cdxml (not all options are supported)
render-image-size¶
- type
size
- default
auto
- description
Width and height of target image.
If not set, is calculated automatically according to
render-bond-length
. To reset this setting, you can set the values of width and height to -1. This options defines both width and height that can be set independently viarender-image-width
andrender-image-height
options.
render-bond-length¶
- type
integer
- default
100
- description
Desired average bond length in pixels
The actual average bond length may be less if the
render-image-size
option is set. To reset this setting, you can set its value to -1. This option scales label size as well.
render-relative-thickness¶
- type
float
- default
1.0
- description
Set the thickness of bonds and atom labels to X/30 of the average bond length.
render-image-width¶
- type
int
- default
auto
- description
Image width
render-image-height¶
- type
int
- default
auto
- description
Image height
render-image-max-width¶
- type
int
- default
auto
- description
Maximum image width
render-image-max-height¶
- type
int
- default
auto
- description
Maximum image height
render-margins¶
- type
size
- default
auto
- description
Horizontal and vertical margins around the image, in pixels.
render-coloring¶
- type
boolean
- default
false
- description
Turn on atom coloring, e.g. nitrogen is blue, oxygen is red, etc.
render-base-color¶
- type
coloring
- default
black (0, 0, 0)
- description
The default color for atoms and bonds.
render-background-color¶
- type
color
- default
transparent
- description
Background color.
Combination of both render-background-color
and render-base-color
can be used to get negative:
m = indigo.loadMoleculeFromFile('data/render_example1.mol')
indigo.setOption("render-background-color", "0, 0, 0")
indigo.setOption("render-base-color", "1, 1, 1")
indigoRenderer.renderToFile(m, "result.png")
render-label-mode¶
- type
enum
- default
terminal-hetero
- description
Atom label rendering mode
- all
show all atoms
- terminal-hetero
show heteroatoms, terminal atoms, atoms with radical, charge, isotope, explicit valence, and atoms having two adjacent bonds in a line
- hetero
the same as terminal-hetero, but without terminal atoms
- none
hide all labels, show only bonds
render-hdc-offset¶
- type
offset
- default
0, 0
- description
Offset for the rendering area
Chemistry¶
render-implicit-hydrogens-visible¶
- type
boolean
- default
True
- description
Show implicit hydrogens on visible atoms.
render-atom-ids-visible¶
- type
boolean
- default
False
- description
Show atom numbers (for debugging purposes only).
render-bond-ids-visible¶
- type
boolean
- default
False
- description
Show bond numbers (for debugging purposes only).
render-atom-bond-ids-from-one¶
- type
boolean
- default
False
- description
Show atom and bond numbers starting from one, not from zero.
render-aam-color¶
- type
color
- default
black
- description
Atom-by-atom mapping indices color in reactions.
render-atom-color-property¶
- type
string
- default
none
- description
S-group name for atom colors
Indigo can use a specified color for each atom and interpolate these colors for bond rendering.
# Load structure
m = indigo.loadMolecule('CC(=C)C1=C(C)C(C)=CC(O)=C1NCCCCC=O')
# Add data sgroups with 'color' description
m.addDataSGroup([0, 1, 2, 3], [], "color", "0.155, 0.55, 0.955")
m.addDataSGroup([4, 5, 6, 16, 17, 18], [], "color", "0.955, 0.155, 0.155")
indigo.setOption("render-atom-color-property", "color")
indigo.setOption('render-coloring', False)
indigoRenderer.renderToFile(m, 'result.png')
See Atom Coloring for a larger example.
render-bold-bond-detection¶
- type
boolean
- default
true
- description
Detect and draw bold bond for Haworth projection
Input: data/bold-bond.mol
render-catalysts-placement¶
- type
enum
- default
above-and-below
- description
Reaction catalysts place relative to the reaction arrow
Input: data/catalysts3000.rxn
render-center-double-bond-when-stereo-adjacent¶
- type
boolean
- default
false
- description
Center double done if there is an attached stereobond
render-data-sgroup-color¶
- type
color
- default
black
- description
Color for data-sgroups
Input: data/render_example-sgroup.mol
render-stereo-style¶
- type
enum (old, ext, none)
- default
old
- description
Stereocenters rendering mode
- old:
Only display the “Chiral” sign when appropriate.
- ext:
Display “abs”, “and”, “or” labels near each stereocenter.
- none:
Hide all the information about the stereogroups.
Input: data/stereo-chiral.mol
Old style of rendering is used only with ordinary stereocenters, and enhanced stereocenters with and and or groups are rendered the same in the old and ext mode:
Input: data/stereo-chiral2.mol
render-superatom-mode¶
- type
enum (expand, collapse)
- default
expand
- description
Superatoms rendering mode
Input: data/abbr.mol
render-valences-visible¶
- type
boolean
- default
true
- description
Render explicit valences
Highlighting¶
render-highlight-color¶
- type
color
- default
red
- description
The color to be used for highlighting.
Input: data/highlighting.mol
render-highlight-color-enabled¶
- type
boolean
- default
true
- description
Enable highlighting with color.
Input: data/highlighting.mol
render-highlight-thickness-enabled¶
- type
boolean
- default
false
- description
Enable highlighting with thick bonds and bold atom labels.
Input: data/highlighting.mol
render-highlighted-labels-visible¶
- type
boolean
- default
False
- description
Always show labels of highlighted atoms.
Input: data/highlighting.mol
Comments¶
render-comment¶
string
None
Put a comment at the top or bottom of the image
render-comment-font-size¶
integer
20
Font size for the comment in absolute units, roughly equal to the height in pixels.
render-comment-alignment¶
enum
center
Comment alignment
Supported values: left, right, center, center-left
render-comment-color¶
color
black
Color to use for the comment.
render-bond-line-width¶
float
1.0
Relative bond line width
render-comment-position¶
enum
bottom
top or bottom.
render-comment-offset¶
integer
0
Vertical space (in pixels) between the comment and the rendered structure or reaction.