Python

Indigo

class indigo.Indigo(path=None)
buildPkaModel(level, threshold, filename)

Build pKa model into file

Parameters
  • level (int) – max level

  • threshold (float) – threshold value

  • filename (str) – full path to the file

Returns

1 if level > 0, 0 otherwise

Return type

int

check(moltext, checkflags='', props='')

Validates given structure

Parameters
  • moltext (str) – input structure string

  • checkflags (str) – validation flags. Optional, defaults to “”.

  • props (str) – validation properties. Optional, defaults to “”.

Returns

validation string

Return type

str

checkStructure(structure, props='')

Runs validation for the given structure

Parameters
  • structure (IndigoObject) – structure object

  • props (str) – Parameters for validation. Optional, defaults to “”.

Returns

validation results string

Return type

str

clearTautomerRules()

Clears all tautomer rules

Returns

1 if there are no errors

Return type

int

commonBits(fingerprint1, fingerprint2)

Returns number of common 1 bits for given fingerprints

Parameters
Returns

number of common bits

Return type

int

convertToArray(iteratable)

Converts iterable object to array

Parameters

iteratable (IndigoObject) – iterable object

Raises

IndigoException – if object is not iterable

Returns

array object

Return type

IndigoObject

countReferences()

Returns number of objects in pool

Returns

number of objects

Return type

int

createArray()

Creates array object

Returns

array object

Return type

IndigoObject

createDecomposer(scaffold)

Creates deconvolution object for the given scaffold

Parameters

scaffold (IndigoObject) – scaffold molecular structure

Returns

deconvolution object

Return type

IndigoObject

createFileSaver(filename, format)

Creates file saver object

Parameters
  • filename (str) – full file path

  • format (str) – file format

Returns

file saver object

Return type

IndigoObject

createMolecule()

Creates molecule object

Returns

molecule object

Return type

IndigoObject

createQueryMolecule()

Creates query molecule object

Returns

query molecule

Return type

IndigoObject

createQueryReaction()

Creates query reaction object

Returns

query reaction object

Return type

IndigoObject

createReaction()

Creates reaction object

Returns

reaction object

Return type

IndigoObject

createSaver(obj, format)

Creates saver object

Parameters
  • obj (IndigoObject) – output object

  • format (str) – format settings

Returns

saver object

Return type

IndigoObject

dbgBreakpoint()
decomposeMolecules(scaffold, structures)

Creates deconvolution object for the given structures

Parameters
Returns

deconvolution object

Return type

IndigoObject

deserialize(arr)

Creates molecule or reaction object from binary serialized CMF format

Parameters

arr (list) – array of bytes

Returns

molecule or reaction object

Return type

IndigoObject

exactMatch(item1, item2, flags='')

Creates match object for the given structures

Parameters
  • item1 (IndigoObject) – target1 structure (molecule or reaction)

  • item2 (IndigoObject) – target2 structure (molecule or reaction)

  • flags (str) – exact match options. Optional, defaults to “”.

Returns

match object

Return type

IndigoObject

extractCommonScaffold(structures, options='')

Extracts common scaffold for given structures

Parameters
  • structures (IndigoObject) – array object of molecule structures

  • options (str) – extration options. Optional, defaults to “”.

Returns

scaffold object

Return type

IndigoObject

getFragmentedMolecule(elem, options='')

Returns fragmented molecule for the composition element

Parameters
  • elem (IndigoObject) – composition element object

  • options (str) – Fragmantation options. Optional, defaults to “”.

Returns

fragmented structure object

Return type

IndigoObject

getOption(option)

Returns option value by given name

Parameters

option (str) – option name

Returns

option value

Return type

str

getOptionBool(option)

Returns option value by given name

Parameters

option (str) – option name

Returns

option value

Return type

bool

getOptionFloat(option)

Returns option value by given name

Parameters

option (str) – option name

Returns

option value

Return type

float

getOptionInt(option)

Returns option value by given name

Parameters

option (str) – option name

Returns

option value

Return type

int

getOptionType(option)

Returns option value type by given name

Parameters

option (str) – option name

Returns

option type string

Return type

str

iterateCDX(reader)

Creates CDX iterator from scanner object

Parameters

reader (IndigoObject) – scanner object

Returns

CDX iterator object

Return type

IndigoObject

iterateCDXFile(filename)

Returns iterator for CDX files

Parameters

filename (str) – full file path

Returns

CDX iterator object

Return type

IndigoObject

iterateCML(reader)

Creates CML iterator from scanner object

Parameters

reader (IndigoObject) – scanner object

Returns

CML iterator object

Return type

IndigoObject

iterateCMLFile(filename)

Returns iterator for CML files

Parameters

filename (str) – full file path

Returns

CML iterator object

Return type

IndigoObject

iterateRDF(reader)

Creates RDF iterator from scanner object

Parameters

reader (IndigoObject) – scanner object

Returns

RD iterator object

Return type

IndigoObject

iterateRDFile(filename)

Returns iterator for RDF files

Parameters

filename (str) – full file path

Returns

RD iterator object

Return type

IndigoObject

iterateSDF(reader)

Creates SDF iterator from scanner object

Parameters

reader (IndigoObject) – scanner object

Returns

SD iterator object

Return type

IndigoObject

iterateSDFile(filename)

Returns iterator for SDF files

Parameters

filename (str) – full file path

Returns

SD iterator object

Return type

IndigoObject

iterateSmiles(reader)

Creates smiles iterator from scanner object

Parameters

reader (IndigoObject) – scanner object

Returns

smiles iterator object

Return type

IndigoObject

iterateSmilesFile(filename)

Returns iterator for smiles files

Parameters

filename (str) – full file path

Returns

smiles iterator object

Return type

IndigoObject

iterateTautomers(molecule, params)

Iterates tautomers for the given molecule

Parameters
  • molecule (IndigoObject) – molecule to find tautomers from

  • params (str) – tau iteration parameters. “INCHI” or “RSMARTS”. Defaults to “RSMARTS”

Returns

molecule iterator object

Return type

IndigoObject

loadBuffer(buf)

Creates scanner object

Parameters

buf (list) – array of bytes

Returns

scanner object

Return type

IndigoObject

loadFingerprintFromBuffer(buffer)

Creates a fingerprint from the supplied binary data

Parameters

buffer (list) – array of bytes

Returns

fingerprint object

Return type

IndigoObject

loadFingerprintFromDescriptors(descriptors, size, density)

Packs a list of molecule descriptors into a fingerprint object

Parameters
  • descriptors (list) – list of normalized numbers (roughly) between 0.0 and 1.0

  • size (int) – size of the fingerprint in bytes

  • density (float) – approximate density of ‘1’s vs ‘0’s in the fingerprint

Returns

fingerprint object

Return type

IndigoObject

loadMolecule(string)

Loads molecule from string. Format will be automatically recognized

Parameters

string (str) – molecule format

Returns

molecule object

Return type

IndigoObject

loadMoleculeFromBuffer(data)

Loads molecule from a given buffer. Automatically detects input format

Parameters

data (bytes) – input byte array with a structure

Returns

loaded molecular structure

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

Examples

with open (..), 'rb') as f:
    m = indigo.loadMoleculeFromBuffer(f.read())
loadMoleculeFromFile(filename)

Loads molecule from a given file. Automatically detects input format

Parameters

filename (str) – full path to a file

Returns

loaded molecular structure

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadQueryMolecule(string)

Loads query molecule from string. Format will be automatically recognized

Parameters

string (str) – molecule format

Returns

query molecule object

Return type

IndigoObject

loadQueryMoleculeFromFile(filename)

Loads query molecule from a given file. Automatically detects input format

Parameters

filename (str) – full path to a file

Returns

loaded query molecular structure

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadQueryReaction(string)

Loads query reaction from string. Format will be automatically recognized

Parameters

string (str) – reaction format

Returns

query reaction object

Return type

IndigoObject

loadQueryReactionFromFile(filename)

Loads query reaction from a given file. Automatically detects input format

Parameters

filename (str) – full path to a file

Returns

loaded query reaction object

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadReaction(string)

Loads reaction from string. Format will be automatically recognized

Parameters

string (str) – reaction format

Returns

reaction object

Return type

IndigoObject

loadReactionFromFile(filename)

Loads reaction from a given file.

Parameters

filename (str) – full path to a file

Returns

loaded reaction

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadReactionSmarts(string)

Loads query reaction from a given SMARTS

Parameters

string (str) – smarts string

Returns

loaded query reaction

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadReactionSmartsFromFile(filename)

Loads query reaction from a given SMARTS

Parameters

filename (str) – full path to the file with smarts strings

Returns

loaded query reaction

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadSmarts(string)

Loads query molecule from a given SMARTS

Parameters

string (str) – smarts string

Returns

loaded query molecular structure

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadSmartsFromFile(filename)

Loads query molecule from a given SMARTS

Parameters

filename (str) – full path to the file with smarts strings

Returns

loaded query molecular structure

Return type

IndigoObject

Raises

IndigoException – Exception if structure format is incorrect

loadString(string)

Creates scanner object from string

Parameters

string (str) – string with information

Returns

scanner object

Return type

IndigoObject

loadStructure(structureStr, parameter=None)

Loads a structure from given string

Parameters
  • structureStr (str) – string with structure format

  • parameter (str) – parameters for loading. Optional, defaults to None.

Returns

loaded object

Return type

IndigoObject

loadStructureFromBuffer(structureData, parameter=None)

Loads structure object from given buffer

Parameters
  • structureData (list) – array of bytes

  • parameter (str) – parameters for loading. Optional, defaults to None.

Returns

loaded object

Return type

IndigoObject

loadStructureFromFile(filename, parameter=None)

Loads structure object from file

Parameters
  • filename (str) – full path with structure information

  • parameter (str) – parameters to load. Optional, defaults to None.

Returns

loaded object

Return type

IndigoObject

nameToStructure(name, params=None)

Converts a chemical name into a corresponding structure

Parameters
  • name (str) – a name to parse

  • params (str) – a string (optional) containing parsing options or nullptr if no options are changed

Raises

IndigoException – if parsing fails or no structure is found

reactionProductEnumerate(replacedaction, monomers)

Creates reaction product enumeration iterator

Parameters
  • replacedaction (IndigoObject) – query reaction for the enumeration

  • monomers (IndigoObject) – array of objects to enumerate

Returns

result products iterator

Return type

IndigoObject

removeTautomerRule(id)

Removes tautomer rule

Parameters

id (int) – tau rule index

Returns

1 if there are no errors

Return type

int

resetOptions()

Resets options to default state

rgroupComposition(molecule, options='')

Creates compostion iterator

Parameters
  • molecule (IndigoObject) – target molecule object

  • options (str) – rgroup composition object. Optional, defaults to “”.

Returns

composition iterator

Return type

IndigoObject

setOption(option, value1, value2=None, value3=None)

Sets option value

Parameters
  • option (str) – option name

  • value1 (int, str, bool, float) – option value

  • value2 (int, float) – option value for tuples. Optional, defaults to None.

  • value3 (float) – option value for triple. Optional, defaults to None.

Raises

IndigoException – if option does not exist

setTautomerRule(id, beg, end)

Sets tautormer rules

Parameters
  • id (int) – tau rule index

  • beg (str) – begin value

  • end (str) – end value

Returns

1 if there are no errors

Return type

int

similarity(item1, item2, metrics='')

Accepts two molecules, two reactions, or two fingerprints. Returns the similarity measure between them.

Parameters
  • item1 (IndigoObject) – molecule, reaction or fingerprint objects

  • item2 (IndigoObject) – molecule, reaction or fingerprint objects

  • metrics (str) – “tanimoto”, “tversky”, “tversky <alpha> <beta>”, “euclid-sub” or “normalized-edit”. Optional, defaults to “tanimoto”.

Returns

[description]

Return type

float

substructureMatcher(target, mode='')

Creates substructure matcher

Parameters
  • target (IndigoObject) – target molecule or reaction

  • mode (str) – substructure mode. Optional, defaults to “”.

Returns

substructure mode

Return type

IndigoObject

transform(reaction, monomers)

Transforms given monomers by a reaction

Parameters
Returns

mapping object

Return type

IndigoObject

transformHELMtoSCSR(item)

Transforms HELM to SCSR object

Parameters

item (IndigoObject) – object with HELM information

Returns

molecule with SCSR object

Return type

IndigoObject

unserialize(arr)

[DEPRECATED] Creates molecule or reaction object from binary serialized CMF format

Parameters

arr (list) – array of bytes

Returns

molecule or reaction object

Return type

IndigoObject

version()

Returns Indigo version

Returns

verstion string

Return type

str

writeBuffer()

Creates buffer to write an object

Returns

buffer object

Return type

IndigoObject

writeFile(filename)

Creates file writer object

Parameters

filename (str) – full path to the file

Returns

file writer object

Return type

IndigoObject

IndigoObject

class indigo.IndigoObject(dispatcher, id, parent=None)

Keeps all Indigo model objects

addAtom(symbol)

Molecule method adds atom

Parameters

symbol (str) – atom symbol

Returns

atom object

Return type

IndigoObject

addBond(destination, order)

Atom method adds bond

Parameters
  • destination (IndigoObject) – atom object destination

  • order (int) – bond order

Returns

bond object

Return type

IndigoObject

addCatalyst(molecule)

Reaction method adds given molecule copy to catalysts

Parameters

molecule (IndigoObject) – molecule to be added

Returns

1 if a molecule was added correctly

Return type

int

addConstraint(type, value)

Atom method adds a constraint

Parameters
  • type (str) – constraint type

  • value (str) – constraint value

Returns

1 if there are no errors

Return type

int

addConstraintNot(type, value)

Atom method adds a NOT constraint

Parameters
  • type (str) – constraint type

  • value (str) – constraint value

Returns

1 if there are no errors

Return type

int

addConstraintOr(type, value)

Atom method adds OR constraint

Parameters
  • type (str) – constraint type

  • value (str) – constraint value

Returns

1 if there are no errors

Return type

int

addDataSGroup(atoms, bonds, description, data)

Molecule method adds data s-group

Parameters
  • atoms (list) – atom index list

  • bonds (list) – bond index list

  • description (str) – data s-group description

  • data (str) – data s-group data

Returns

SGroup object

Return type

IndigoObject

addDecomposition(q_match)

Deconvolution method adds query match

Parameters

q_match (IndigoObject) – decomposition match object

Returns

0 if there are no errors

Return type

int

addProduct(molecule)

Reaction method adds given molecule copy to products

Parameters

molecule (IndigoObject) – molecule to be added

Returns

1 if a molecule was added correctly

Return type

int

addRSite(name)

Molecule method adds r-site

Parameters

name (str) – r-site name

Returns

atom object

Return type

IndigoObject

addReactant(molecule)

Reaction method adds given molecule copy to reactants

Parameters

molecule (IndigoObject) – molecule to be added

Returns

1 if a molecule was added correctly

Return type

int

addSGroupAttachmentPoint(aidx, lvidx, apid)

SGroup method sets attachment point info

Parameters
  • aidx (int) – index

  • lvidx (int) – index

  • apid (str) – id string

Returns

attachment point index

Return type

int

addStereocenter(type, v1, v2, v3, v4=- 1)

Atom method. Adds stereo information for a given atom

Parameters
  • type (int) – Stereocenter type. Use Indigo constants ABS, OR, AND, EITHER

  • v1 (int) – pyramid info

  • v2 (int) – pyramid info

  • v3 (int) – pyramid info

  • v4 (int) – pyramid info. Optional, defaults to -1.

Returns

1 stereocenter added successfully

Return type

int

addSuperatom(atoms, name)

Molecule method adds superatom

Parameters
  • atoms (list) – atom index list

  • name (str) – superatom name

Returns

superatom object

Return type

IndigoObject

addTemplate(templates, name)

Molecule method adds template TGroup

Parameters
  • templates (IndigoObject) – molecule template

  • name (str) – template name

Returns

template index

Return type

int

alignAtoms(atom_ids, desired_xyz)

Determines and applies the best transformation for the given molecule so that the specified atoms move as close as possible to the desired positions

Parameters
  • atom_ids (list) – atom indexes

  • desired_xyz (list) – desired coordinates for atoms (size atom_ids * 3)

Raises

IndigoException – if input array size does not match

Returns

root-mean-square measure of the difference between the desired and obtained positions

Return type

float

allScaffolds()

Scaffold method returns all scaffolds

Returns

array of all scaffolds

Return type

IndigoObject

append(object)

Saver method adds a new object

Parameters

object (IndigoObject) – object to be added

Returns

1 if there are no errors

Return type

int

aromatize()

Molecule or reaction method aromatizes input structure

Returns

1 if there are no errors

Return type

int

arrayAdd(object)

Array method adds a new object

Parameters

object (IndigoObject) – object to be added

Returns

1 if there are no errors

Return type

int

at(index)

Loader method returns element for given index

Parameters

index (int) – element index

Returns

element object

Return type

IndigoObject

atomMappingNumber(reaction_atom)

Reaction atom method returns assigned mapping

Parameters

reaction_atom (IndigoObject) – reaction molecule atom

Returns

atom mapping value

Return type

int

atomicNumber()

Atom method returns atomic number

Returns

atomic number

Return type

int

automap(mode='')

Automatic reaction atom-to-atom mapping

Parameters
  • mode (str) – mode is one of the following (separated by a space) . Optional, defaults to “discard”.

  • "discard" – discards the existing mapping entirely and considers only the existing reaction centers (the default)

  • "keep" – keeps the existing mapping and maps unmapped atoms

  • "alter" – alters the existing mapping, and maps the rest of the reaction but may change the existing mapping

  • "clear" – removes the mapping from the reaction.

  • "ignore_charges" – do not consider atom charges while searching

  • "ignore_isotopes" – do not consider atom isotopes while searching

  • "ignore_valence" – do not consider atom valence while searching

  • "ignore_radicals" – do not consider atom radicals while searching

Returns

1 if atom mapping is done without errors

Return type

int

bond()

Atom neighbor method returns bond

Returns

bond object

Return type

IndigoObject

bondOrder()

Bond method returns bond order

Returns

bond order

Return type

int

bondStereo()

Bond method returns bond stereo

Returns

bond stereo

Return type

int

canonicalSmarts()

Molecule method returns canonical smarts

Returns

canonical smarts

Return type

str

canonicalSmiles()

Molecule or reaction method returns canonical smiles

Returns

canonical smiles string

Return type

str

cdxml()

Molecule method returns the structure as CDXML string

Returns

CDXML string

Return type

str

changeStereocenterType(type)

Atom method changes stereocentertyp

Parameters

type (int) – stereo type. * ABS = 1 * OR = 2 * AND = 3 * EITHER = 4

Returns

1 if there are no errors

Return type

int

charge()

Atom method returns charge of the atom

Returns

charge

Return type

int

check(checkflags='')

Molecule object. Performs verification of input structure

Parameters

checkflags (str) – Flags to verify. Optional, defaults to “”.

Returns

verification result as a JSON string

Return type

str

check3DStereo()

Molecule method verifies if structure contains 3d stereo

Returns

1 if contains 3d stereo, 0 otherwise

Return type

int

checkAmbiguousH()

Molecule or reaction method validates ambiguous hydrogens

Returns

string containing hydrogens validation errors

Return type

str

checkBadValence()

Molecule, atom or reaction method validates bad valence

Returns

string containing valence validation errors

Return type

str

checkChirality()

Molecule method verifies if structure has a chiral flag

Returns

1 if there is chiral flag, 0 otherwise

Return type

int

checkQuery()

Atom, Bond, Molecule, Reaction method verifies if object is query

Returns

1 if object is query, 0 otherwise

Return type

int

checkRGroups()

Molecule method verifies if structure contains r-groups

Returns

1 if molecule contains r-groups, 0 otherwise

Return type

int

checkStereo()

Molecule method verifies if structure contains stereocenters

Returns

1 if molecule contains stereo, 0 otherwise

Return type

int

checkValence()

Atom method validates valence

Returns

1 if valence has no errors, 0 otherwise

Return type

int

clean2d()

Molecule or reaction method recalculates coordinates

Returns

1 if there are no errors

Return type

int

clear()

Array, molecule or reaction method clears object

Returns

1 if there are no errors

Return type

int

clearAAM()

Reaction method clears atom mapping for atoms

Returns

1 if there are no errors

Return type

int

clearAlleneCenters()

Molecule method clears allene centers

Returns

1 if there are no errors

Return type

int

clearAttachmentPoints()

Atom method clears attachment point

Returns

1 if there are no errors

Return type

int

clearCisTrans()

Molecule or reaction method clear cis-trans stereo

Returns

1 if there are no errors

Return type

int

clearProperties()

Object method clears all properties

Returns

1 if there are no errors

Return type

int

clearStereocenters()

Molecule or reaction method clear stereo centers

Returns

1 if there are no errors

Return type

int

clone()

Clones IndigoObject

Returns

cloned object

Return type

IndigoObject

close()

FileOutput method closes file descriptor

Returns

1 if file is closed successfully. -1 otherwise

Return type

int

cml()

Molecule method returns CML format for a structure

Returns

CML string

Return type

str

cmlAppend(item)

CML builder adds a new structure

Parameters

item (IndigoObject) – new structure to be added

Returns

1 if there are no errors

Return type

int

cmlFooter()

CML builder adds footer information

Returns

1 if there are no errors

Return type

int

cmlHeader()

CML builder adds header

Returns

1 if there are no errors

Return type

int

component(index)

Molecule method returns component by index

Parameters

index (int) – component index

Returns

molecule component object

Return type

IndigoObject

componentIndex()

Atom method returns component index

Returns

component index

Return type

int

correctReactingCenters()

Reaction method corrects reacting centers according to AAM

Returns

1 if there are no errors

Return type

int

count()

Loader method returns number of elements

Returns

number of elements

Return type

int

countAlleneCenters()

Molecule method returns number of allene centers

Returns

number of allene centers

Return type

int

countAtoms()

Molecule or SGroup method returns number of atoms

Returns

number of atoms

Return type

int

countAttachmentPoints()

Molecule or RGroup method returns number of attachment points

Returns

number of attachment points

Return type

int

countBits()

Fingerprint method returns count of 1 bits

Returns

number of 1 bits

Return type

int

countBonds()

Molecule or SGroup method returns number of bonds

Returns

number of bonds

Return type

int

countCatalysts()

Reaction method returns number of catalysts

Returns

number of catalysts

Return type

int

countComponents()

Molecule method returns number of components

Returns

number of components

Return type

int

countDataSGroups()

Molecule method returns number of data s-groups

Returns

number of s-groups

Return type

int

countGenericSGroups()

Molecule method returns number of generic s-groups

Returns

number of generic -groups

Return type

int

countHeavyAtoms()

Molecule method returns number of heavy atoms

Returns

heavy atom count

Return type

int

countHydrogens()

Atom or Molecule method returns number of hydrogens

Returns

number of hydrogens

Return type

int

countImplicitHydrogens()

Atom or Molecule method returns number of implicit hydrogens

Returns

number of hydrogens

Return type

int

countMatches(query)

Matcher method returns number of matches

Parameters

query (IndigoObject) – query structure

Returns

number of matches

Return type

int

countMatchesWithLimit(query, embeddings_limit)

Matcher method returns number of matches with max limit

Parameters
  • query (IndigoObject) – query structure

  • embeddings_limit (int) – max number of matches to search

Returns

number of matches

Return type

int

countMolecules()

Reaction method returns number of reactants, products and catalysts

Returns

number of reactants, products and catalysts

Return type

int

countMultipleGroups()

Molecule method returns number of multiple s-groups

Returns

number of multiple s-groups

Return type

int

countProducts()

Reaction method returns number of products

Returns

number of products

Return type

int

countPseudoatoms()

Molecule method returns number of pseudoatoms

Returns

number of pseudoatoms

Return type

int

countRGroups()

Molecule method returns number of r-groups

Returns

number of r-groups

Return type

int

countRSites()

Molecule method returns number of r-sites

Returns

number of r-sites

Return type

int

countReactants()

Reaction method returns number of reactants

Returns

number of reactants

Return type

int

countRepeatingUnits()

Molecule method returns number of repeating units

Returns

number of repeating units

Return type

int

countSSSR()

Molecule method returns size of a smallest set of smallest rings

Returns

SSSR rings count

Return type

int

countStereocenters()

Molecule method returns number of stereocenters

Returns

number of stereocenters

Return type

int

countSuperatoms()

Molecule method calculates number of super atoms

Returns

number of super atoms

Return type

int

createEdgeSubmolecule(vertices, edges)

Molecule method creates submolecule from given vertex atom and bond list

Parameters
  • vertices (list) – list of atom indexes

  • edges (list) – list of bond indexes

Returns

molecule object as submolecule

Return type

IndigoObject

createSGroup(sgtype, mapping, name)

Molecule method creates SGroup

Parameters
  • sgtype (str) – sgroup type

  • mapping (IndigoObject) – mapping object

  • name (str) – sgroup name

Returns

sgroup object

Return type

IndigoObject

createSubmolecule(vertices)

Molecule method creates submolecule from given atom list

Parameters

vertices (list) – list of atom indexes

Returns

molecule object as submolecule

Return type

IndigoObject

data()

Data s-group method returns data

Returns

s-group data

Return type

str

dbgInternalType()

Object method returns type

Returns

object type string

Return type

str

dearomatize()

Molecule or reaction method de-aromatizes input structure

Returns

1 if there are no errors

Return type

int

decomposeMolecule(mol)

Deconvolution molecule make decomposition for the given molecule

Parameters

mol (IndigoObject) – molecule to decompose

Returns

deconvolution element object

Return type

IndigoObject

decomposedMoleculeHighlighted()

Deconvolution method returns decomposed highlighted molecule

Returns

decomposed highlighted molecule

Return type

IndigoObject

decomposedMoleculeScaffold()

Deconvolution method starts molecule decomposition

Returns

decomposed molecule

Return type

IndigoObject

decomposedMoleculeWithRGroups()

Deconvolution method returns decomposed molecule with R-groups

Returns

decomposed molecule with R-groups

Return type

IndigoObject

degree()

Atom method returns atom number of neighbors

Returns

number of atom neighbors

Return type

int

deleteSGroupAttachmentPoint(apidx)

SGroup method removes attachment point

Parameters

apidx (int) – attachment point index

Returns

1 if there are no errors

Return type

int

description()

Data s-group method returns description

Returns

s-group description

Return type

str

destination()

Bond method returns destination atom

Returns

atom object

Return type

IndigoObject

dispose()
expandAbbreviations()

Molecule method expands abbreviations

Returns

count of expanded abbreviations

Return type

int

findSGroups(prop, val)

Molecule method finds SGroup by property and value

Parameters
  • prop (str) – property string

  • val (str) – value string

Returns

SGroup iterator

Return type

IndigoObject

findTemplate(name)

Molecule method finds template by name

Parameters

name (str) – template name

Returns

template index

Return type

int

fingerprint(type)

Molecule or reaction method returns fingerprint representation

Parameters

type (str) – fingerprint type. One of the following: sim, sub, sub-res, sub-tau, full

Returns

fingerprint object

Return type

IndigoObject

foldHydrogens()

Molecule or reaction method folds hydrogens

Returns

1 if there are no errors

Return type

int

getAcidPkaValue(atom, level, min_level)

Molecule method calculates acid pKa value

Parameters
  • atom (int) – input atom index

  • level (int) – pka level

  • min_level (int) – pka min level

Returns

pka result

Return type

float

getAtom(idx)

Molecule method returns atom by index

Parameters

idx (int) – atom index

Returns

atom object

Return type

IndigoObject

getBasicPkaValue(atom, level, min_level)

Molecule method calculates basic pKa value

Parameters
  • atom (int) – input atom index

  • level (int) – pka level

  • min_level (int) – pka min level

Returns

pka result

Return type

float

getBond(idx)

Molecule method returns bond by index

Parameters

idx (int) – bond index

Returns

bond object

Return type

IndigoObject

getDataSGroup(index)

Molecule method returns data s-groups

Parameters

index (int) – sgroup index

Returns

data sgroup

Return type

IndigoObject

getExplicitValence()

Atom method returns explicit valence

Returns

valence

Return type

int

getGenericSGroup(index)

Molecule method returns generic s-group

Parameters

index (int) – s-group index

Returns

generic s-group

Return type

IndigoObject

getMolecule(index)

Reaction method returns a molecule by index

Parameters

index (int) – molecule index

Returns

molecule object

Return type

IndigoObject

getMultipleGroup(index)

Molecule method returns Mul s-group

Parameters

index (int) – mul s-group index

Returns

mul s-group

Return type

IndigoObject

getProperty(prop)

Object method returns property by given name

Parameters

prop (str) – property name

Returns

property value

Return type

str

getRepeatingUnit(index)

Molecule method returns repeating unit

Parameters

index (int) – repeating unit index

Returns

repeating unit

Return type

IndigoObject

getRepeatingUnitConnectivity()

Repeating unit method returns connectivity

Returns

connectivity value

Return type

int

getRepeatingUnitSubscript()

Repeating unit method resturns subscript

Returns

subscript value

Return type

str

getSGroupClass()

SGroup method returns sgroup class

Returns

sgroup class string

Return type

str

getSGroupCoords()

Sgroup method returns coordinates

Raises

IndigoException – if no coordinates exist for the sgroup

Returns

[x, y] coordinates

Return type

list

getSGroupDisplayOption()

SGroup method returns display option

Returns

display option

Return type

int

getSGroupIndex()

SGroup method returns index

Returns

sgroup index

Return type

int

getSGroupMultiplier()

Multiple group method returns multiplier

Returns

multiplier value

Return type

int

getSGroupName()

SGroup method returns sgroup name

Returns

sgroup name string

Return type

str

getSGroupNumCrossBonds()

SGroup method returns number of cross bonds

Returns

number of cross bonds

Return type

int

getSGroupOriginalId()

SGroup method returns original id

Returns

original id

Return type

int

getSGroupParentId()

SGroup method returns parent id

Returns

parent id

Return type

int

getSGroupSeqId()

SGroup method returns SEQID

Returns

SEQID value

Return type

int

getSGroupType()

SGroup method returns type

Returns

sgroup type

Return type

int

getSubmolecule(vertices)

Molecule method returns submolecule by given atom list

Parameters

vertices (list) – list of atom indexes

Returns

submolecule object

Return type

IndigoObject

getSuperatom(index)

Molecule method returns superatom

Parameters

index (int) – super atom index

Returns

super atom

Return type

IndigoObject

getTGroupAlias()

TGroup method returns alias

Returns

alias value

Return type

str

getTGroupClass()

TGroup method returns class

Returns

class value

Return type

str

getTGroupName()

TGroup method returns name

Returns

name value

Return type

str

getTemplateAtomClass()

Atom method returns template class

Returns

template class

Return type

str

grossFormula()

Molecule method returns gross formula

Returns

gross formula

Return type

str

hasCoord()

Molecule method returns True if structure contains coordinates

Returns

True if contains coordinates, False otherwise

Return type

bool

hasNext()

Iterator method returns presense of a next element

Returns

true if has next element, false otherwise

Return type

bool

hasProperty(prop)

Object method returns True if property exists

Parameters

prop (str) – property name

Returns

flag True if property exists

Return type

bool

hasZCoord()

Molecule method returns True if structure contains Z coordinate

Returns

True if contains Z coordinate, False otherwise

Return type

bool

highlight()

Atom or bond method to add hightlighting

Returns

1 if there are no errors

Return type

int

highlightedTarget()

Mapping method returns highlighted target

Returns

highlighted molecule structure

Return type

IndigoObject

ignoreAtom(atom_object)

Matcher method adds atom to ignore list

Parameters

atom_object (IndigoObject) – atom to ignore

Returns

1 if there are no errors

Return type

int

index()

Atom method returns index of an element

Returns

element index

Return type

int

invertStereo()

Atom or bond method inverts stereo

Returns

1 if there are no errors

Return type

int

ionize(pH, pH_toll)

Method for structure ionization at specified pH and pH tolerance

Parameters
  • pH (float) – pH value

  • pH_toll (float) – pH tolerance

Returns

1 if ionization is performed without issues

Return type

int

isChiral()

Molecule method returns True if structure contains chiral flag

Returns

True if contains chiral flag, False otherwise

Return type

bool

isHighlighted()

Atom or bond method returns True if highlighted

Returns

True if highlighted, False otherwise

Return type

bool

isPossibleFischerProjection(options)

Molecule method returns True if structure contains possible Fischer projection

Parameters

options (str) – projection options

Returns

True if structure contains possible Fischer projection

Return type

bool

isPseudoatom()

Atom method returns true if atom is pseudoatom

Returns

True if pseudoatom

Return type

bool

isRSite()

Atom method returns true if atom is R-site

Returns

True if R-site

Return type

bool

isTemplateAtom()

Atom method returns true if atom is a template atom

Returns

True if template

Return type

bool

isotope()

Atom method returns isotope number

Returns

isotope number

Return type

int

iterateAlleneCenters()

Molecule method returns an iterator for all atom with allene centers

Returns

atom iterator

Return type

IndigoObject

iterateArray()

Array method returns iterator for elements

Returns

elements iterator

Return type

IndigoObject

iterateAtoms()

Molecule method returns an iterator for all atoms including r-sites and pseudoatoms

Returns

atom iterator

Return type

IndigoObject

iterateAttachmentPoints(order)

Molecule method iterates attachment points

Parameters

order (int) – attachment points order

Returns

attachment points iterator

Return type

IndigoObject

iterateBonds()

Molecule or SGroup method returns bonds iterator

Returns

bonds iterator

Return type

IndigoObject

iterateCatalysts()

Reaction method iterates catalysts

Returns

catalyst iterator

Return type

IndigoObject

iterateComponents()

Molecule method returns components iterator

Returns

molecule components iterator

Return type

IndigoObject

iterateDataSGroups()

Molecule method iterates data s-groups

Returns

s-groups iterator

Return type

IndigoObject

iterateDecomposedMolecules()

Deconvolution method returns decomposed molecules iterator

Returns

decomposed molecules iterator

Return type

IndigoObject

iterateDecompositions()

Deconvolution element method returns decompositions iterator

Returns

decompositions iterator

Return type

IndigoObject

iterateEdgeSubmolecules(min_bonds, max_bonds)

Molecule method returns edge submolecules iterator

Parameters
  • min_bonds (int) – min bonds neighbors limit

  • max_bonds (int) – max bonds neighbors limit

Returns

submolecules iterator

Return type

IndigoObject

iterateGenericSGroups()

Molecule method iterates generic s-groups

Returns

generic s-groups iterator

Return type

IndigoObject

iterateMatches(query)

Matcher method returns matches iterator

Parameters

query (IndigoObject) – query structure

Returns

matches iterator

Return type

IndigoObject

iterateMolecules()

Reaction method iterates molecules

Returns

reactant, products and catalysts iterator

Return type

IndigoObject

iterateMultipleGroups()

Molecule method iterates Mul s-groups

Returns

Mul s-groups iterator

Return type

IndigoObject

iterateNeighbors()

Atom method returns neighbors iterator

Returns

atom neighbor iterator

Return type

IndigoObject

iterateProducts()

Reaction method iterates products

Returns

product iterator

Return type

IndigoObject

iterateProperties()

Object method returns properties iterator

Returns

properties iterator

Return type

IndigoObject

iteratePseudoatoms()

Molecule method returns an iterator for all pseudoatoms

Returns

atom iterator

Return type

IndigoObject

iterateRGroupFragments()

RGroup method iterates r-group fragments

Returns

r-group fragment iterator

Return type

IndigoObject

iterateRGroups()

Molecule method returns an iterator for all r-group

Returns

r-group iterator

Return type

IndigoObject

iterateRSites()

Molecule method returns an iterator for all r-sites

Returns

atom iterator

Return type

IndigoObject

iterateReactants()

Reaction method iterates reactants

Returns

reactant iterator

Return type

IndigoObject

iterateRepeatingUnits()

Molecule method iterates repeating units

Returns

repeating units iterator

Return type

IndigoObject

iterateRings(min_atoms, max_atoms)

Molecule method returns rings

Parameters
  • min_atoms (int) – min atoms neighbors limit

  • max_atoms (int) – max atoms neighbors limit

Returns

rings iterator

Return type

IndigoObject

iterateSGroups()

Molecule method iterates s-groups

Returns

s-groups iterator

Return type

IndigoObject

iterateSSSR()

Molecule method returns smallest set of smallest rings iterator

Returns

SSSR iterator

Return type

IndigoObject

iterateStereocenters()

Molecule method returns an iterator for all atom with stereocenters

Returns

atom iterator

Return type

IndigoObject

iterateSubtrees(min_atoms, max_atoms)

Molecule method returns subtrees iterator

Parameters
  • min_atoms (int) – min atoms neighbors limit

  • max_atoms (int) – max atoms neighbors limit

Returns

subtrees iterator

Return type

IndigoObject

iterateSuperatoms()

Molecule method iterates superatoms

Returns

superatoms iterator

Return type

IndigoObject

iterateTGroups()

Molecule method iterates t-groups

Returns

t-groups iterator

Return type

IndigoObject

json()

Structure method saves into KET format

Returns

KET format for the structure

Return type

str

layeredCode()

Molecule method returns layered code

Returns

layered code string

Return type

str

layout()

Molecule or reaction method calculates layout for a structure

Returns

1 if there are no errors

Return type

int

mapAtom(atom)

Mapping method returns mapped atom for the given atom

Parameters

atom (IndigoObject) – query atom to map

Returns

mapped atom

Return type

IndigoObject

mapBond(bond)

Mapping method returns mapped bond for the given bond

Parameters

bond (IndigoObject) – query bond to map

Returns

mapped bond

Return type

IndigoObject

mapMolecule(molecule)

Reaction mapping method returns mapped molecule for the given query molecule

Parameters

molecule (IndigoObject) – query molecule to map

Returns

mapped molecule

Return type

IndigoObject

markEitherCisTrans()

Molecule or reaction method marks cis-trans stereo

Returns

number of marked stereo

Return type

int

markStereobonds()

Molecule or reaction method marks stereo bonds

Returns

0 if there are no errors

Return type

int

massComposition()

Molecule method returns mass composition

Returns

mass composition string

Return type

str

match(query)

Matcher method executes matching

Parameters

query (IndigoObject) – query structure

Returns

mapping object

Return type

IndigoObject

mdlct()

Saves MDL CT into a buffer

Returns

buffer contained the MDLCT

Return type

IndigoObject

merge(what)

Molecule method merges molecule with given structure

Parameters

what (IndigoObject) – molecule object to merge with

Returns

mapping object for merged structure

Return type

IndigoObject

molecularWeight()

Molecule method returns molecular weight

Returns

molecular weight value

Return type

float

molfile()

Molecule method returns structure as molfile

Returns

molfile string

Return type

str

monoisotopicMass()

Molecule method returns most monoisotopic mass

Returns

most monoisotopic mass

Return type

float

mostAbundantMass()

Molecule method returns most abundant mass

Returns

most abundant mass

Return type

float

name()

IndigoObject method returns name

Returns

name string

Return type

str

next()

Geneeric iterator method

Returns

next item in a collection

Return type

IndigoObject

normalize(options='')

Molecule method for structure normalization. It neutralizes charges, resolves 5-valence Nitrogen, removes hydrogens and etc.

Parameters

options (str) – Normalization options. Optional, defaults to “”.

Returns

1 if normalization is performed without issues

Return type

int

oneBitsList()

Fingerprint method to return one bits

Returns

one bits string for the fingerprint

Return type

str

optimize(options='')

QueryReaction or QueryMolecule method for query optimizations for faster substructure search

Parameters

options (str) – Options for optimization. Optional, defaults to “”.

Returns

1 if optimization is performed without issues

Return type

int

radical()

Atom method returns radical value

Returns

radical value

Return type

int

radicalElectrons()

Atom method returns number of radical electrons

Returns

radical electrons number

Return type

int

rawData()

Object method returns string representation

Returns

string for the object

Return type

str

rdfAppend(item)

RDF builder method adds new structure

Parameters

item (IndigoObject) – new structure to be added

Returns

1 if there are no errors

Return type

int

rdfHeader()

RDF builder adds header

Returns

1 if there are no errors

Return type

int

reactingCenter(reaction_bond)

Reaction bond method returns reacting center

Parameters

reaction_bond (IndigoObject) – reaction molecule bond

Returns

reacting center enum. One of values
  • RC_NOT_CENTER = -1

  • RC_UNMARKED = 0

  • RC_CENTER = 1

  • RC_UNCHANGED = 2

  • RC_MADE_OR_BROKEN = 4

  • RC_ORDER_CHANGED = 8

Return type

int

remove()

Container method removes an element

Returns

1 if element was removed

Return type

int

removeAtoms(vertices)

Molecule method removes atoms

Parameters

vertices (list) – atom indexes list

Returns

1 if there are no errors

Return type

int

removeBonds(bonds)

Molecule method removes bonds

Parameters

bonds (list) – bond indexes list

Returns

1 if there are no errors

Return type

int

removeConstraints(type)

Atom method removes constraints

Parameters

type (str) – constraints type

Returns

1 if there are no errors

Return type

int

removeProperty(prop)

Object method removes property

Parameters

prop (str) – property name

Returns

1 if there are no errors

Return type

int

removeTemplate(name)

Molecule method removes template TGroup

Parameters

name (str) – template name

Returns

1 if there are no errors

Return type

int

resetAtom(symbol)

Atom method resets atom to the new symbol

Parameters

symbol (str) – atom symbol

resetCharge()

Atom method resets charge

Returns

1 if there are no errors

Return type

int

resetExplicitValence()

Atom method resets explicit valence

Returns

1 if there are no errors

Return type

int

resetIsotope()

Atom method resets isotope

Returns

1 if there are no errors

Return type

int

resetRadical()

Atom method resets radical

Returns

1 if there are no errors

Return type

int

resetStereo()

Atom or bond method resets stereo

Returns

1 if there are no errors

Return type

int

resetSymmetricCisTrans()

Molecule or reaction method clears symmetric stereo cis-trans

Returns

number of reset centers

Return type

int

resetSymmetricStereocenters()

Molecule or reaction method clears symmetric stereocenters

Returns

number of reset centers

Return type

int

rxnfile()

Reaction method saves reaction into RXN string

Returns

RXN string

Return type

str

saveCdxml(filename)

Molecule method saves the structure into CDXML file

Parameters

filename (str) – full path to the file

Returns

1 if a file was saved successfully

Return type

int

saveCml(filename)

Molecule method saves CML into a file

Parameters

filename (str) – full path to the file to be saved

Returns

[description]

Return type

[type]

saveMDLCT(output)

Structure method saves MDLCT format into a given buffer

Parameters

output (IndigoObject) – buffer to be updated

Returns

1f structure is saved

Return type

int

saveMolfile(filename)

Molecule method saves structure into a molfile

Parameters

filename (str) – full file path to the file

Returns

1 if file is saved

Return type

int

saveRxnfile(filename)

Reaction method saves reaction into RXN format

Parameters

filename (str) – file path for the reaction

Returns

1 if everthing saved without issues

Return type

int

sdfAppend(item)

SDF nethod adds a new structure

Parameters

item (IndigoObject) – structure to be added

Returns

1 if there are errors

Return type

int

serialize()

IndigoObject method serializes object into byte array

Returns

array of bytes

Return type

list

setAtomMappingNumber(reaction_atom, number)

Reaction atom method sets atom mapping

Parameters
  • reaction_atom (IndigoObject) – reaction molecule atom

  • number (int) – atom mapping

Returns

1 if atom mapping is set

Return type

int

setAttachmentPoint(order)

Atom method sets attachment point

Parameters

order (int) – attachment point order

Returns

1 if there are no errors

Return type

int

setBondOrder(order)

Bond method sets order

Parameters

order (int) – order value

Returns

1 if there are no errors

Return type

int

setCharge(charge)

Atom method sets charge

Parameters

name (int) – charge value

Returns

1 if there are no errors

Return type

int

setDataSGroupXY(x, y, options='')

SGroup method sets coordinates

Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

  • options (str) – options. Optional, defaults to “”.

Returns

1 if there are no errors

Return type

int

setExplicitValence(valence)

Atom method sets explicit valence

Parameters

valence (int) – valence

Returns

1 if there are no errors

Return type

int

setImplicitHCount(impl_h)

Atom method sets implicit hydrogen count

Parameters

name (int) – implicit hydrogen count

Returns

1 if there are no errors

Return type

int

setIsotope(isotope)

Atom method sets isotope

Parameters

name (int) – isotope value

Returns

1 if there are no errors

Return type

int

setName(name)

IndigoObject method sets name

Parameters

name (str) – name string

Returns

1 if there are no errors

Return type

int

setProperty(prop, value)

Object methods sets property

Parameters
  • prop (str) – property name

  • value (str) – property value

Returns

1 if there are no errors

Return type

int

setRSite(name)

Atom method sets r-site

Parameters

name (str) – r-site name

Returns

1 if there are no errors

Return type

int

setRadical(radical)

Atom method sets radical value

Parameters

radical (int) – radical value

Returns

1 if there are no errors

Return type

int

setReactingCenter(reaction_bond, rc)

Reaction bond method sets reacting center

Parameters
  • reaction_bond (IndigoObject) – reaction molecule bond

  • rc (int) – reacting center, one of the following * RC_NOT_CENTER = -1 * RC_UNMARKED = 0 * RC_CENTER = 1 * RC_UNCHANGED = 2 * RC_MADE_OR_BROKEN = 4 * RC_ORDER_CHANGED = 8

Returns

1 if there are no errors

Return type

int

setSGroupBrackets(style, x1, y1, x2, y2, x3, y3, x4, y4)

SGroup method sets brackets

Parameters
  • style (int) – bracket style

  • x1 (float) – X1 coordinate

  • y1 (float) – Y1 coordinate

  • x2 (float) – X2 coordinate

  • y2 (float) – Y2 coordinate

  • x3 (float) – X3 coordinate

  • y3 (float) – Y3 coordinate

  • x4 (float) – X4 coordinate

  • y4 (float) – Y4 coordinate

Returns

1 if there are no errors

Return type

int

setSGroupClass(sgclass)

SGroup method sets class

Parameters

sgclass (str) – sgroup class

Returns

1 if there are no errors

Return type

int

setSGroupCoords(x, y)

SGroup method sets coordinates

Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

Returns

1 if there are no errors

Return type

int

setSGroupData(data)

SGroup method adds data

Parameters

data (str) – data string

Returns

1 if there are no errors

Return type

int

setSGroupDataType(data_type)

SGroup method sets data type

Parameters

data_type (str) – data type string

Returns

1 if there are no errors

Return type

int

setSGroupDescription(description)

SGroup method sets description

Parameters

description (str) – description string

Returns

1 if there are no errors

Return type

int

setSGroupDisplay(option)

SGroup method sets display

Parameters

option (str) – display string

Returns

1 if there are no errors

Return type

int

setSGroupDisplayOption(option)

SGroup method sets display option

Parameters

option (int) – display option

Returns

1 if there are no errors

Return type

int

setSGroupFieldName(name)

SGroup method sets field name

Parameters

name (str) – name string

Returns

1 if there are no errors

Return type

int

setSGroupLocation(option)

SGroup method sets location

Parameters

option (str) – location string

Returns

1 if there are no errors

Return type

int

setSGroupMultiplier(mult)

Multiple group sets multiplier value

Parameters

mult (int) – multiplier value

Returns

1 if there are no errors

Return type

int

setSGroupName(sgname)

SGroup method sets group name

Parameters

sgname (str) – sgroup name string

Returns

1 if there are no errors

Return type

int

setSGroupOriginalId(original)

SGroup method sets original id

Parameters

original (int) – original id value

Returns

1 if there are no errors

Return type

int

setSGroupParentId(parent)

SGroup method sets parent id

Parameters

parent (int) – parent id

Returns

1 if there are no errors

Return type

int

setSGroupQueryCode(code)

SGroup methods sets query code

Parameters

code (str) – code string

Returns

1 if there are no errors

Return type

int

setSGroupQueryOper(oper)

SGroup method sets query oper

Parameters

oper (str) – query oper string

Returns

1 if there are no errors

Return type

int

setSGroupTag(tag)

SGroup method sets tag

Parameters

tag (str) – tag string

Returns

1 if there are no errors

Return type

int

setSGroupTagAlign(tag_align)

SGroup method sets tag align

Parameters

tag_align (int) – tag align value

Returns

1 if there are no errors

Return type

int

setSGroupXCoord(x)

Sgroup method sets X coordinate

Parameters

x (float) – X coordinate

Returns

1 if there are no errors

Return type

int

setSGroupYCoord(y)

Sgroup method sets Y coordinate

Parameters

y (float) – Y coordinate

Returns

1 if there are no errors

Return type

int

setStereocenterGroup(group)

Atom method sets stereocenter group

Parameters

group (int) – group index

setTemplateAtomClass(name)

Atom method sets template class

Parameters

name (str) – class bane

Returns

1 if there are no errors

Return type

int

setXYZ(x, y, z)

Atom methods sets coordinates

Parameters
  • x (float) – X coordinate

  • y (float) – Y coordinate

  • z (float) – Z coordinate

Returns

1 if there are no errors

Return type

int

singleAllowedRGroup()

Atom method returns single allowed r-group

Returns

single allowed r-group

Return type

int

smarts()

Molecule or reaction method calculates SMARTS for a given structure

Returns

smarts string

Return type

str

smiles()

Molecule or reaction method calculates SMILES for a given structure

Returns

smiles string

Return type

str

smilesAppend(item)

Smiles builder methods adds a new structure

Parameters

item (IndigoObject) – structure to be added

Returns

1 if there are no errors

Return type

int

source()

Bond method returns source atom

Returns

atom object

Return type

IndigoObject

standardize()

Molecule method for structure standardization. It standardize charges, stereo and etc.

Returns

1 if standardization is performed without issues

Return type

int

stereocenterGroup()

Atom method returns stereocenter group

Returns

group index

Return type

int

stereocenterPyramid()

Atom method returns stereopyramid information

Returns

stereopyramid information string

Return type

str

stereocenterType()

Atom method returns stereo center type

Returns

type of stereocenter
  • ABS = 1

  • OR = 2

  • AND = 3

  • EITHER = 4

Return type

int

symbol()

Atom method returns string symbol

Returns

atom symbol

Return type

str

symmetryClasses()

Molecule method returns symmetry classes

Returns

symmetry classes string

Return type

str

tell()

Object method returns size of the content, e.g. SDF number of structures

Returns

size of the content

Return type

int

toBuffer()

Object method returns binary representation

Returns

array of bytes

Return type

list

toString()

Object method returns string represation

Returns

string representation for the object

Return type

str

topology()

Bond method returns bond topology

Returns

bond topology

Return type

int

transformCTABtoSCSR(templates)

Molecule method transforms CTAB to SCSR using templates

Parameters

templates (IndigoObject) – Molecule object with templates

Returns

1 if there are no errors

Return type

int

transformSCSRtoCTAB()

Molecule method transforms SCSR to full CTAB

Returns

1 if there are no errors

Return type

int

unfoldHydrogens()

Molecule or reaction method unfolds hydrogens

Returns

1 if there are no errors

Return type

int

unhighlight()

Atom or bond method to remove hightlighting

Returns

1 if there are no errors

Return type

int

unignoreAllAtoms()

Matcher method clears ignore list

Returns

1 if there are no errors

Return type

int

unignoreAtom(atom_object)

Matcher method removes atom from ignore list

Parameters

atom_object (IndigoObject) – atom to remove from ignore

Returns

1 if there are no errors

Return type

int

valence()

Atom method returns valence

Returns

atom valence

Return type

int

validateChirality()

Molecule or reaction method validates chirality

xyz()

Atom method to get coordinatess

Raises

IndigoException – raises an exception if no XYZ for the object

Returns

3-element array with coordinates

Return type

list

IndigoException

class indigo.IndigoException(value)

Docstring for class IndigoException.

IndigoRenderer

class indigo_renderer.IndigoRenderer(indigo)
renderGridToBuffer(objects, refatoms, ncolumns)

Renders grid to buffer

Parameters
  • objects (IndigoObject) – array of objects

  • refatoms (list) – array or reference atoms

  • ncolumns (int) – number of columns

Raises

IndigoException – if any error while rendering

Returns

buffer byte array

Return type

list

renderGridToFile(objects, refatoms, ncolumns, filename)

Renders grid to file

Parameters
  • objects (IndigoObject) – array of objects

  • refatoms (list) – array or reference atoms

  • ncolumns (int) – number of columns

  • filename (str) – full file path

Raises

IndigoException – if any error while rendering

renderToBuffer(obj)

Renders object to buffer

Parameters

obj (IndigoObject) – object to render

Returns

buffer with byte array

Return type

list

renderToFile(obj, filename)

Renders to file

Parameters
  • obj (IndigoObject) – object to render

  • filename (str) – full file path

renderToString(obj)

Renders object to string

Parameters

obj (IndigoObject) – object to render

Returns

string with rendered data

Return type

str

IndigoInchi

class indigo_inchi.IndigoInchi(indigo)
getAuxInfo()

Returns aux info for the Inchi

Returns

InChi aux info string

Return type

str

getInchi(molecule)

Returns InChi string for given molecule

Parameters

molecule (IndigoObject) – molecule object

Returns

InChi string

Return type

str

getInchiKey(inchi)

Returns InChi key for the given inchi

Parameters

inchi (str) – inchi string

Returns

inchi key

Return type

str

getLog()

Returns logs while InChi calculation

Returns

log string

Return type

str

getWarning()

Returns warning message

Returns

warning string

Return type

str

loadMolecule(inchi)

Loads molecule from inChi string

Parameters

inchi (str) – inchi string

Returns

molecule object

Return type

IndigoObject

resetOptions()

Resets option for inchi

version()

Returns InChi version

Returns

version string

Return type

str