Generic options

ignore-noncritical-query-features

type:boolean
default:false
description:When true, the “bond topology”, “stereo care”, “ring bond count”, and “unsaturation” specifications are ignored when a non-query molecule is being loaded.

Indigo has two kind of molecule object: molecule and query molecule. Query molecules represent patterns for ordinary molecules and they are used in substructure search. Many properties are not defined for query molecules, for example, implicit hydrogens count, because query molecule is a pattern.

# Load structure and get exception about stereocenters
query = indigo.loadQueryMoleculeFromFile('data/noncritial_query.mol')
indigoRenderer.renderToFile(query, 'result.png')
Input: data/noncritial_query.mol

../../_images/indigorenderer_8fe6c82dcb7a4d85e0a6fde70abbde2ec24951d9.svg

When such query molecule is loaded as ordinary molecule Indigo throws an exception about query features:

# Load structure and get exception about query features
try:
    m = indigo.loadMoleculeFromFile('data/noncritial_query.mol')
except IndigoException, ex:
    print("Exception: " + str(ex))

Output:
Exception: molfile loader: only a query can have stereo care box

To load such structure we have to set ignore-noncritical-query-features option.

indigo.setOption("ignore-noncritical-query-features", True)
m = indigo.loadMoleculeFromFile('data/noncritial_query.mol')
indigoRenderer.renderToFile(m, 'result.png')
../../_images/indigorenderer_6c03f317d6242e8caddd68ef4bbf55839a561d6b.svg

treat-x-as-pseudoatom

type:boolean
default:false
description:Treat ‘X’ atoms in Molfiles/Rxnfiles as pseudoatoms, rather than “any halogen” query atoms.

skip-3d-chirality

type:boolean
default:false
description:Do not calculate chirality of 3D input structures.

Indigo automatically reconstructs stereocenters when loading structures from chemical files with 3D coordinates.

m = indigo.loadMoleculeFromFile('data/3d-chiral.mol')
indigo.setOption("render-comment", "3D coordinates")
indigoRenderer.renderToFile(m, 'result_1.png')

m.layout()
indigo.setOption("render-comment", "2D coordinates")
indigoRenderer.renderToFile(m, 'result_2.png')
Input: data/3d-chiral.mol

../../_images/indigorenderer_063f599b02154411b51fb6c54491bba80d8092081.svg ../../_images/indigorenderer_063f599b02154411b51fb6c54491bba80d8092082.svg

molfile-saving-mode

type:enum (auto, 2000, 3000)
default:auto
description:Molfile saving mode
2000:
force saving Molfiles and Rxnfiles to v2000 format, not regarding if there are features that can not be represented in v2000.
3000:
force saving Molfiles and Rxnfiles to v3000 format, not regarding if there are features that can not be represented in v2000.
auto:
detect if saving to v3000 is really needed, and then save to v3000. Otherwise, save to v2000.

molfile-saving-no-chiral

type:boolean
default:false
description:Do no write the “Chiral” flag when saving Molfiles and Rxnfiles

molfile-saving-skip-date

type:boolean
default:false
description:Do no write the current date into Molfiles, Rxnfiles and RDFiles

smiles-saving-write-name

type:boolean
default:false
description:Write names when saving via generic saver interface in SMILES mode
# Create molecules and set their names
m1 = indigo.loadMolecule('[H][C@](C)(N)O')
m1.setName("Molecule 1")
m2 = indigo.loadMolecule('C1=CC=CC=C1')
m2.setName("Molecule 2")

indigo.setOption("smiles-saving-write-name", True)

# Create string stream and save molecules in SMILES format into it
buffer = indigo.writeBuffer()
saver = indigo.createSaver(buffer, "smi")
saver.append(m1)
saver.append(m2)

print(buffer.toString())

Output:
[H][C@@](O)(N)C Molecule 1
C1C=CC=CC=1 Molecule 2

filename-encoding

type:enum (ascii, utf-8)
default:ascii
description:File names encoding

serialize-preserve-ordering

type:boolean
default:false
description:Preserve atom and bond ordering in the serialization procedure