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

High-level driver for the generation of low-energy conformer ensembles of molecular graphs. More...

+ Inheritance diagram for CDPL.ConfGen.ConformerGenerator:

Public Member Functions

None __init__ ()
 Constructs the ConformerGenerator instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
ConformerGeneratorSettings getSettings ()
 Returns the current generator settings (mutable). More...
 
None clearFragmentLibraries ()
 Removes all configured fragment libraries.
 
None addFragmentLibrary (FragmentLibrary lib)
 Adds lib to the list of fragment libraries consulted during fragment-based 3D structure generation. More...
 
None clearTorsionLibraries ()
 Removes all configured torsion libraries.
 
None addTorsionLibrary (TorsionLibrary lib)
 Adds lib to the list of torsion libraries consulted during torsion driving. More...
 
None setAbortCallback (CallbackFunction func)
 Sets the callback invoked periodically to allow the generation to be aborted by the user. More...
 
CallbackFunction getAbortCallback ()
 Returns the currently configured abort-check callback. More...
 
None setTimeoutCallback (CallbackFunction func)
 Sets the callback invoked periodically to check whether the configured timeout has elapsed. More...
 
CallbackFunction getTimeoutCallback ()
 Returns the currently configured timeout-check callback. More...
 
None setLogMessageCallback (LogMessageCallbackFunction func)
 Sets the callback receiving log messages emitted by the generator. More...
 
LogMessageCallbackFunction getLogMessageCallback ()
 Returns the currently configured log-message callback. More...
 
int generate (Chem.MolecularGraph molgraph)
 Generates a conformer ensemble for molgraph. More...
 
int generate (Chem.MolecularGraph molgraph, Chem.MolecularGraph fixed_substr)
 Generates a conformer ensemble for molgraph while keeping the substructure fixed_substr at its current 3D coordinates. More...
 
int generate (Chem.MolecularGraph molgraph, Chem.MolecularGraph fixed_substr, Math.Vector3DArray fixed_substr_coords)
 Generates a conformer ensemble for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates fixed_substr_coords. More...
 
None setConformers (Chem.MolecularGraph molgraph)
 Transfers the generated conformer ensemble onto molgraph. More...
 
int getNumConformers ()
 Returns the number of generated conformers. More...
 
ConformerData getConformer (int conf_idx)
 
ConformerData __getitem__ (int conf_idx)
 

Properties

 objectID = property(getObjectID)
 
 numConformers = property(getNumConformers)
 
 settings = property(getSettings)
 
 abortCallback = property(getAbortCallback, setAbortCallback)
 
 timeoutCallback = property(getTimeoutCallback, setTimeoutCallback)
 
 logMessageCallback = property(getLogMessageCallback, setLogMessageCallback)
 

Detailed Description

High-level driver for the generation of low-energy conformer ensembles of molecular graphs.

The generator implements two complementary sampling strategies for producing the conformer ensemble:

Both strategies share a common downstream pipeline of MMFF94-based energy minimization, RMSD-based clustering and energy window filtering. Behaviour is controlled by the embedded conformer generation settings instance, the configured fragment and torsion libraries and the optional abort/timeout/log callbacks.

See also
[CFRG]

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.ConformerGenerator.getObjectID ( )

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

Different Python ConformerGenerator 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 ConformerGenerator 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.

◆ getSettings()

ConformerGeneratorSettings CDPL.ConfGen.ConformerGenerator.getSettings ( )

Returns the current generator settings (mutable).

Returns
A reference to the settings.

◆ addFragmentLibrary()

None CDPL.ConfGen.ConformerGenerator.addFragmentLibrary ( FragmentLibrary  lib)

Adds lib to the list of fragment libraries consulted during fragment-based 3D structure generation.

Parameters
libThe fragment library to add.

◆ addTorsionLibrary()

None CDPL.ConfGen.ConformerGenerator.addTorsionLibrary ( TorsionLibrary  lib)

Adds lib to the list of torsion libraries consulted during torsion driving.

Parameters
libThe torsion library to add.

◆ setAbortCallback()

None CDPL.ConfGen.ConformerGenerator.setAbortCallback ( CallbackFunction  func)

Sets the callback invoked periodically to allow the generation to be aborted by the user.

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

CallbackFunction CDPL.ConfGen.ConformerGenerator.getAbortCallback ( )

Returns the currently configured abort-check callback.

Returns
A reference to the abort-check callback.

◆ setTimeoutCallback()

None CDPL.ConfGen.ConformerGenerator.setTimeoutCallback ( CallbackFunction  func)

Sets the callback invoked periodically to check whether the configured timeout has elapsed.

Parameters
funcThe timeout-check callback.

◆ getTimeoutCallback()

CallbackFunction CDPL.ConfGen.ConformerGenerator.getTimeoutCallback ( )

Returns the currently configured timeout-check callback.

Returns
A reference to the timeout-check callback.

◆ setLogMessageCallback()

None CDPL.ConfGen.ConformerGenerator.setLogMessageCallback ( LogMessageCallbackFunction  func)

Sets the callback receiving log messages emitted by the generator.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

LogMessageCallbackFunction CDPL.ConfGen.ConformerGenerator.getLogMessageCallback ( )

Returns the currently configured log-message callback.

Returns
A reference to the log-message callback.

◆ generate() [1/3]

int CDPL.ConfGen.ConformerGenerator.generate ( Chem.MolecularGraph  molgraph)

Generates a conformer ensemble for molgraph.

Parameters
molgraphThe input molecular graph.
Returns
A ConfGen.ReturnCode value reporting the outcome of the generation.

◆ generate() [2/3]

int CDPL.ConfGen.ConformerGenerator.generate ( Chem.MolecularGraph  molgraph,
Chem.MolecularGraph  fixed_substr 
)

Generates a conformer ensemble for molgraph while keeping the substructure fixed_substr at its current 3D coordinates.

Parameters
molgraphThe input molecular graph.
fixed_substrThe substructure that must retain its current 3D coordinates.
Returns
A ConfGen.ReturnCode value reporting the outcome of the generation.
Since
1.1

◆ generate() [3/3]

int CDPL.ConfGen.ConformerGenerator.generate ( Chem.MolecularGraph  molgraph,
Chem.MolecularGraph  fixed_substr,
Math.Vector3DArray  fixed_substr_coords 
)

Generates a conformer ensemble for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates fixed_substr_coords.

Parameters
molgraphThe input molecular graph.
fixed_substrThe substructure that must retain the supplied 3D coordinates.
fixed_substr_coordsThe 3D coordinates assigned to fixed_substr.
Returns
A ConfGen.ReturnCode value reporting the outcome of the generation.
Since
1.1

◆ setConformers()

None CDPL.ConfGen.ConformerGenerator.setConformers ( Chem.MolecularGraph  molgraph)

Transfers the generated conformer ensemble onto molgraph.

The per-conformer 3D coordinates are written to each atom's 3D-coordinates array (via Chem.set3DCoordinatesArray) and the corresponding per-conformer energies are attached to the molecular graph (via Chem.setConformerEnergies).

Parameters
molgraphThe molecular graph that receives the conformer coordinates and energies.

◆ getNumConformers()

int CDPL.ConfGen.ConformerGenerator.getNumConformers ( )

Returns the number of generated conformers.

Returns
The conformer count.

◆ getConformer()

ConformerData CDPL.ConfGen.ConformerGenerator.getConformer ( int  conf_idx)
Parameters
conf_idx
Returns

◆ __getitem__()

ConformerData CDPL.ConfGen.ConformerGenerator.__getitem__ ( int  conf_idx)
Parameters
conf_idx
Returns