Chemical Data Processing Library Python API - Version 1.4.0
Classes | Public Member Functions | Properties | List of all members
CDPL.ConfGen.DGConstraintGenerator Class Reference

Constructs geometric constraints (distance, planarity, volume) for distance-geometry-based 3D structure generation. More...

+ Inheritance diagram for CDPL.ConfGen.DGConstraintGenerator:

Classes

class  StereoCenterData
 Pair holding an atom or bond index plus the associated stereo descriptor. More...
 

Public Member Functions

None __init__ ()
 Constructs the DGConstraintGenerator instance.
 
None __init__ (DGConstraintGenerator gen)
 Initializes a copy of the DGConstraintGenerator instance gen. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
DGConstraintGenerator assign (DGConstraintGenerator gen)
 Replaces the current state of self with a copy of the state of the DGConstraintGenerator instance gen. More...
 
Util.BitSet getExcludedHydrogenMask ()
 Returns the bit mask of hydrogen atoms that have been excluded from constraint generation. More...
 
None setup (Chem.MolecularGraph molgraph)
 Initializes the generator for the molecular graph molgraph using default geometry data. More...
 
None setup (Chem.MolecularGraph molgraph, ForceField.MMFF94InteractionData ia_data)
 Initializes the generator for the molecular graph molgraph using bond lengths and angles obtained from ia_data. More...
 
int getNumAtomStereoCenters ()
 Returns the number of registered atom stereo centers. More...
 
StereoCenterData getAtomStereoCenterData (int idx)
 Returns the stereo-center data for the atom stereo center at index idx. More...
 
StereoCenterData getBondStereoCenterData (int idx)
 Returns the stereo-center data for the bond stereo center at index idx. More...
 
int getNumBondStereoCenters ()
 Returns the number of registered bond stereo centers. More...
 
None addBondLengthConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds bond-length distance constraints to coords_gen. More...
 
None addBondAngleConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds bond-angle (1,3) distance constraints to coords_gen. More...
 
None add14DistanceConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds 1,4-distance constraints (cis/trans bounds) to coords_gen. More...
 
None addDefaultDistanceConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds default (Van der Waals-derived) lower/upper distance constraints between all non-bonded atom pairs to coords_gen. More...
 
None addAtomPlanarityConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds planarity (zero-volume) constraints for sp2-hybridized / aromatic atoms to coords_gen. More...
 
None addBondPlanarityConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds planarity (zero-volume) constraints for double and aromatic bonds to coords_gen. More...
 
None addAtomConfigurationConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds volume constraints enforcing the registered atom stereo-center configurations to coords_gen. More...
 
None addBondConfigurationConstraints (Util.DG3DCoordinatesGenerator coords_gen)
 Adds distance and volume constraints enforcing the registered bond stereo-center configurations to coords_gen. More...
 
DGConstraintGeneratorSettings getSettings ()
 Returns a reference to the constraint-generation settings. More...
 

Properties

 objectID = property(getObjectID)
 
 settings = property(getSettings)
 
 numAtomStereoCenters = property(getNumAtomStereoCenters)
 
 numBondStereoCenters = property(getNumBondStereoCenters)
 
 exclHydrogenMask = property(getExcludedHydrogenMask)
 

Detailed Description

Constructs geometric constraints (distance, planarity, volume) for distance-geometry-based 3D structure generation.

Given a molecular graph (and optionally an MMFF94 force field interaction parameter set) the generator derives ideal bond lengths, bond angles and 1,4-distances, identifies atom and bond stereo centers and emits the corresponding constraints into a Util.DG3DCoordinatesGenerator. The constraint set is used by ConfGen.DGStructureGenerator to produce a 3D embedding of the molecular graph.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.ConfGen.DGConstraintGenerator.__init__ ( DGConstraintGenerator  gen)

Initializes a copy of the DGConstraintGenerator instance gen.

Parameters
genThe DGConstraintGenerator instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.DGConstraintGenerator.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python DGConstraintGenerator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two DGConstraintGenerator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ assign()

DGConstraintGenerator CDPL.ConfGen.DGConstraintGenerator.assign ( DGConstraintGenerator  gen)

Replaces the current state of self with a copy of the state of the DGConstraintGenerator instance gen.

Parameters
genThe DGConstraintGenerator instance to copy.
Returns
self

◆ getExcludedHydrogenMask()

Util.BitSet CDPL.ConfGen.DGConstraintGenerator.getExcludedHydrogenMask ( )

Returns the bit mask of hydrogen atoms that have been excluded from constraint generation.

Returns
A reference to the excluded-hydrogen bit mask.

◆ setup() [1/2]

None CDPL.ConfGen.DGConstraintGenerator.setup ( Chem.MolecularGraph  molgraph)

Initializes the generator for the molecular graph molgraph using default geometry data.

Parameters
molgraphThe molecular graph to process.

◆ setup() [2/2]

None CDPL.ConfGen.DGConstraintGenerator.setup ( Chem.MolecularGraph  molgraph,
ForceField.MMFF94InteractionData  ia_data 
)

Initializes the generator for the molecular graph molgraph using bond lengths and angles obtained from ia_data.

Parameters
molgraphThe molecular graph to process.
ia_dataMMFF94 interaction data providing the reference bond lengths and angles.

◆ getNumAtomStereoCenters()

int CDPL.ConfGen.DGConstraintGenerator.getNumAtomStereoCenters ( )

Returns the number of registered atom stereo centers.

Returns
The number of atom stereo centers.

◆ getAtomStereoCenterData()

StereoCenterData CDPL.ConfGen.DGConstraintGenerator.getAtomStereoCenterData ( int  idx)

Returns the stereo-center data for the atom stereo center at index idx.

Parameters
idxThe zero-based stereo-center index.
Returns
A reference to the stereo-center data.
Exceptions
Base.IndexErrorif the number of atom stereo centers is zero or idx is not in the range [0, getNumAtomStereoCenters() - 1].

◆ getBondStereoCenterData()

StereoCenterData CDPL.ConfGen.DGConstraintGenerator.getBondStereoCenterData ( int  idx)

Returns the stereo-center data for the bond stereo center at index idx.

Parameters
idxThe zero-based stereo-center index.
Returns
A reference to the stereo-center data.
Exceptions
Base.IndexErrorif the number of bond stereo centers is zero or idx is not in the range [0, getNumBondStereoCenters() - 1].

◆ getNumBondStereoCenters()

int CDPL.ConfGen.DGConstraintGenerator.getNumBondStereoCenters ( )

Returns the number of registered bond stereo centers.

Returns
The number of bond stereo centers.

◆ addBondLengthConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addBondLengthConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds bond-length distance constraints to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ addBondAngleConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addBondAngleConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds bond-angle (1,3) distance constraints to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ add14DistanceConstraints()

None CDPL.ConfGen.DGConstraintGenerator.add14DistanceConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds 1,4-distance constraints (cis/trans bounds) to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ addDefaultDistanceConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addDefaultDistanceConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds default (Van der Waals-derived) lower/upper distance constraints between all non-bonded atom pairs to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ addAtomPlanarityConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addAtomPlanarityConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds planarity (zero-volume) constraints for sp2-hybridized / aromatic atoms to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ addBondPlanarityConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addBondPlanarityConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds planarity (zero-volume) constraints for double and aromatic bonds to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ addAtomConfigurationConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addAtomConfigurationConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds volume constraints enforcing the registered atom stereo-center configurations to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ addBondConfigurationConstraints()

None CDPL.ConfGen.DGConstraintGenerator.addBondConfigurationConstraints ( Util.DG3DCoordinatesGenerator  coords_gen)

Adds distance and volume constraints enforcing the registered bond stereo-center configurations to coords_gen.

Parameters
coords_genThe coordinates generator to add the constraints to.

◆ getSettings()

DGConstraintGeneratorSettings CDPL.ConfGen.DGConstraintGenerator.getSettings ( )

Returns a reference to the constraint-generation settings.

Returns
A reference to the settings.