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 via render-image-width and render-image-height options.
../../_images/indigorenderer_3c11ad279c390a28ce067ee73041a6b87ade9e3f0.svg ../../_images/indigorenderer_3c11ad279c390a28ce067ee73041a6b87ade9e3f1.svg

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.
../../_images/indigorenderer_f7be387e6db7f616aa9ba3ab3958a118e3313dea0.svg ../../_images/indigorenderer_f7be387e6db7f616aa9ba3ab3958a118e3313dea1.svg ../../_images/indigorenderer_f7be387e6db7f616aa9ba3ab3958a118e3313dea2.svg

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.
../../_images/indigorenderer_a07a656adc406186148b2958a3995aaeef6abc570.svg ../../_images/indigorenderer_a07a656adc406186148b2958a3995aaeef6abc571.svg ../../_images/indigorenderer_a07a656adc406186148b2958a3995aaeef6abc572.svg

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.
../../_images/indigorenderer_4c2f2f8b5b88aaa0cde640208fc5f2006c87a4c80.svg ../../_images/indigorenderer_4c2f2f8b5b88aaa0cde640208fc5f2006c87a4c81.svg

render-base-color

type:coloring
default:black (0, 0, 0)
description:The default color for atoms and bonds.
../../_images/indigorenderer_217893bd7c00aa95187cef8027eebbc6d77030ce0.svg ../../_images/indigorenderer_217893bd7c00aa95187cef8027eebbc6d77030ce1.svg

render-background-color

type:color
default:transparent
description:Background color.
../../_images/indigorenderer_dfbba4ab12e62b149d2d445a353832a6d4bd28d60.svg ../../_images/indigorenderer_dfbba4ab12e62b149d2d445a353832a6d4bd28d61.svg

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")
../../_images/indigorenderer_5afc363772e39448d1cd4d5adbf562adbc786795.svg

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
../../_images/indigorenderer_56e221e816798873127eae5ff474f83b47516fb30.svg ../../_images/indigorenderer_56e221e816798873127eae5ff474f83b47516fb31.svg ../../_images/indigorenderer_56e221e816798873127eae5ff474f83b47516fb32.svg ../../_images/indigorenderer_56e221e816798873127eae5ff474f83b47516fb33.svg

render-hdc-offset

type:offset
default:0, 0
description:Offset for the rendering area
../../_images/indigorenderer_5f464c2e2487526b06b2a1470d133836ea5045a80.svg ../../_images/indigorenderer_5f464c2e2487526b06b2a1470d133836ea5045a81.svg

Comments

render-comment

type:string
default:None
description:Put a comment at the top or bottom of the image

If the image size is set explicitly, it must not be smaller than the size of the comment bounding box.

All the examples on this page contain comment with option value.

Comment can have multiple line:

../../_images/indigorenderer_bd0d6512e3230e62589572a289adf0ba004904ac0.svg

render-comment-font-size

type:integer
default:20
description:Font size for the comment in absolute units, roughly equal to the height in pixels.
../../_images/indigorenderer_466f5b8ed55a03de5496ec9ad39de337c9b72cbd0.svg ../../_images/indigorenderer_466f5b8ed55a03de5496ec9ad39de337c9b72cbd1.svg ../../_images/indigorenderer_466f5b8ed55a03de5496ec9ad39de337c9b72cbd2.svg

render-comment-alignment

type:enum
default:center
description:Comment alignment

Supported values: left, right, center, center-left

../../_images/indigorenderer_d85affdde4f867d5960bde527951095797c1d58d0.svg ../../_images/indigorenderer_d85affdde4f867d5960bde527951095797c1d58d1.svg ../../_images/indigorenderer_d85affdde4f867d5960bde527951095797c1d58d2.svg ../../_images/indigorenderer_d85affdde4f867d5960bde527951095797c1d58d3.svg

render-comment-color

type:color
default:black
description:Color to use for the comment.
../../_images/indigorenderer_fb119fbd66421752aca14a7c74518a6781b6133b0.svg ../../_images/indigorenderer_fb119fbd66421752aca14a7c74518a6781b6133b1.svg

render-bond-line-width

type:float
default:1.0
description:Relative bond line width
../../_images/indigorenderer_76584355aaca4915a4e67d873c0b81ab9ce6b5f00.svg ../../_images/indigorenderer_76584355aaca4915a4e67d873c0b81ab9ce6b5f01.svg ../../_images/indigorenderer_76584355aaca4915a4e67d873c0b81ab9ce6b5f02.svg

render-comment-position

type:enum
default:bottom
description:top or bottom.
../../_images/indigorenderer_720c541ef1469ab19d2838f359b7d5e75f9ef98e0.svg ../../_images/indigorenderer_720c541ef1469ab19d2838f359b7d5e75f9ef98e1.svg

render-comment-offset

type:integer
default:0
description:Vertical space (in pixels) between the comment and the rendered structure or reaction.
../../_images/indigorenderer_a29812dee01a7255f847acd27a8db84445731a580.svg ../../_images/indigorenderer_a29812dee01a7255f847acd27a8db84445731a581.svg ../../_images/indigorenderer_a29812dee01a7255f847acd27a8db84445731a582.svg

Chemistry

render-implicit-hydrogens-visible

type:boolean
default:True
description:Show implicit hydrogens on visible atoms.
../../_images/indigorenderer_bb170c86f5ee1dc585166e5390269a0d475c29bf0.svg ../../_images/indigorenderer_bb170c86f5ee1dc585166e5390269a0d475c29bf1.svg

render-atom-ids-visible

type:boolean
default:False
description:Show atom numbers (for debugging purposes only).
../../_images/indigorenderer_6f053b6acb6a81d303b625911c85a649227eac310.svg ../../_images/indigorenderer_6f053b6acb6a81d303b625911c85a649227eac311.svg

render-bond-ids-visible

type:boolean
default:False
description:Show bond numbers (for debugging purposes only).
../../_images/indigorenderer_a7b5ecc20c2aab239e409dc68c7c3ec162cd0b2e0.svg ../../_images/indigorenderer_a7b5ecc20c2aab239e409dc68c7c3ec162cd0b2e1.svg

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.
../../_images/indigorenderer_2d4b51b4095d744294e0a4b18dd40230c8e664f30.svg

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')
../../_images/indigorenderer_bfb81f9acd9910b65776d216ac99637f46e02283.svg

See Atom Coloring for a larger example.

render-bold-bond-detection

type:boolean
default:true
description:Detect and draw bold bond for Haworth projection
../../_images/indigorenderer_1bc28b16c239ff2c4e4bd87858d8743f2b4a13cd0.svg ../../_images/indigorenderer_1bc28b16c239ff2c4e4bd87858d8743f2b4a13cd1.svg

Input: data/bold-bond.mol

render-catalysts-placement

type:enum
default:above-and-below
description:Reaction catalysts place relative to the reaction arrow
../../_images/indigorenderer_b6c60f30bd0cc1572a0865431b90994855115fa80.svg ../../_images/indigorenderer_b6c60f30bd0cc1572a0865431b90994855115fa81.svg

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
../../_images/indigorenderer_e40818900fba8c7e8b4bf18e05a6552c536ce6a10.svg ../../_images/indigorenderer_e40818900fba8c7e8b4bf18e05a6552c536ce6a11.svg

render-data-sgroup-color

type:color
default:black
description:Color for data-sgroups
../../_images/indigorenderer_e18eb2e98d5eea2b76442abaa014b5f81ef12eb80.svg ../../_images/indigorenderer_e18eb2e98d5eea2b76442abaa014b5f81ef12eb81.svg

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.
../../_images/indigorenderer_45bbf8dc3fd3f1a657d113e5f8290004b699a5fe0.svg ../../_images/indigorenderer_45bbf8dc3fd3f1a657d113e5f8290004b699a5fe1.svg ../../_images/indigorenderer_45bbf8dc3fd3f1a657d113e5f8290004b699a5fe2.svg

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:

../../_images/indigorenderer_2ffd17f6774edd33a8e5c7622aa0a8180955981a0.svg ../../_images/indigorenderer_2ffd17f6774edd33a8e5c7622aa0a8180955981a1.svg ../../_images/indigorenderer_2ffd17f6774edd33a8e5c7622aa0a8180955981a2.svg

Input: data/stereo-chiral2.mol

render-superatom-mode

type:enum (expand, collapse)
default:expand
description:Superatoms rendering mode
../../_images/indigorenderer_47ecde5d4f564604570713bf01f4aa9513aee8a80.svg ../../_images/indigorenderer_47ecde5d4f564604570713bf01f4aa9513aee8a81.svg

Input: data/abbr.mol

render-valences-visible

type:boolean
default:true
description:Render explicit valences
../../_images/indigorenderer_0353c45c93208719837a25cd05e68583a4e2a73f0.svg ../../_images/indigorenderer_0353c45c93208719837a25cd05e68583a4e2a73f1.svg

Highlighting

render-highlight-color

type:color
default:red
description:The color to be used for highlighting.
../../_images/indigorenderer_e905816881c8d623ce00c9e36c772bfd193700890.svg ../../_images/indigorenderer_e905816881c8d623ce00c9e36c772bfd193700891.svg

Input: data/highlighting.mol

render-highlight-color-enabled

type:boolean
default:true
description:Enable highlighting with color.
../../_images/indigorenderer_3d437ca521688ef7272f242d9f7139493fec3f110.svg ../../_images/indigorenderer_3d437ca521688ef7272f242d9f7139493fec3f111.svg

Input: data/highlighting.mol

render-highlight-thickness-enabled

type:boolean
default:false
description:Enable highlighting with thick bonds and bold atom labels.
../../_images/indigorenderer_c31cb16e30c5cc90f32e10593163cb2a0448691d0.svg ../../_images/indigorenderer_c31cb16e30c5cc90f32e10593163cb2a0448691d1.svg

Input: data/highlighting.mol

render-highlighted-labels-visible

type:boolean
default:False
description:Always show labels of highlighted atoms.
../../_images/indigorenderer_684946bb4d432e3399d9428862c423b9e7e9e1580.svg ../../_images/indigorenderer_684946bb4d432e3399d9428862c423b9e7e9e1581.svg

Input: data/highlighting.mol