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

Driver for the systematic enumeration of conformers obtained by rotating around rotatable bonds of a molecular graph, using preferred torsion angles taken from configured ConfGen.TorsionLibrary instances. More...

+ Inheritance diagram for CDPL.ConfGen.TorsionDriver:

Public Member Functions

None __init__ ()
 Constructs the TorsionDriver instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
TorsionDriverSettings getSettings ()
 Returns the current driver settings (mutable). 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...
 
int setup (Chem.MolecularGraph molgraph)
 Sets up the driver for molgraph with the default rotatable bond perception. More...
 
int setup (Chem.MolecularGraph molgraph, Util.BitSet bond_mask)
 Sets up the driver for molgraph using only the bonds whose corresponding bit is set in bond_mask as rotatable. More...
 
None clearInputCoordinates ()
 Removes all stored input coordinates.
 
None clearInputCoordinates (int frag_idx)
 Removes all input coordinates of the fragment at index frag_idx. More...
 
None addInputCoordinates (Math.Vector3DArray coords)
 Adds coords as a new starting conformation that the driver will torsion-drive. More...
 
None addInputCoordinates (Math.Vector3DArray coords, int frag_idx)
 Adds coords as a new starting conformation restricted to the fragment at index frag_idx. More...
 
None addInputCoordinates (ConformerData conf_data, int frag_idx)
 Adds the conformer data shared reference conf_data as a new starting conformation restricted to the fragment at index frag_idx. 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 driver. More...
 
LogMessageCallbackFunction getLogMessageCallback ()
 Returns the currently configured log-message callback. More...
 
int generateConformers ()
 Runs the torsion-driving conformer enumeration. 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

Driver for the systematic enumeration of conformers obtained by rotating around rotatable bonds of a molecular graph, using preferred torsion angles taken from configured ConfGen.TorsionLibrary instances.

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.TorsionDriver.getObjectID ( )

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

Different Python TorsionDriver 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 TorsionDriver 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()

TorsionDriverSettings CDPL.ConfGen.TorsionDriver.getSettings ( )

Returns the current driver settings (mutable).

Returns
A reference to the settings.

◆ addTorsionLibrary()

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

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

Parameters
libThe torsion library to add.

◆ setup() [1/2]

int CDPL.ConfGen.TorsionDriver.setup ( Chem.MolecularGraph  molgraph)

Sets up the driver for molgraph with the default rotatable bond perception.

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

◆ setup() [2/2]

int CDPL.ConfGen.TorsionDriver.setup ( Chem.MolecularGraph  molgraph,
Util.BitSet  bond_mask 
)

Sets up the driver for molgraph using only the bonds whose corresponding bit is set in bond_mask as rotatable.

Parameters
molgraphThe input molecular graph.
bond_maskThe bit mask of rotatable bonds (one bit per bond of molgraph).
Returns
A ConfGen.ReturnCode value reporting the outcome of the setup.

◆ clearInputCoordinates()

None CDPL.ConfGen.TorsionDriver.clearInputCoordinates ( int  frag_idx)

Removes all input coordinates of the fragment at index frag_idx.

Parameters
frag_idxThe zero-based fragment index.

◆ addInputCoordinates() [1/3]

None CDPL.ConfGen.TorsionDriver.addInputCoordinates ( Math.Vector3DArray  coords)

Adds coords as a new starting conformation that the driver will torsion-drive.

Parameters
coordsThe input 3D coordinates.

◆ addInputCoordinates() [2/3]

None CDPL.ConfGen.TorsionDriver.addInputCoordinates ( Math.Vector3DArray  coords,
int  frag_idx 
)

Adds coords as a new starting conformation restricted to the fragment at index frag_idx.

Parameters
coordsThe input 3D coordinates of the fragment.
frag_idxThe zero-based fragment index.

◆ addInputCoordinates() [3/3]

None CDPL.ConfGen.TorsionDriver.addInputCoordinates ( ConformerData  conf_data,
int  frag_idx 
)

Adds the conformer data shared reference conf_data as a new starting conformation restricted to the fragment at index frag_idx.

Parameters
conf_dataThe input conformer data.
frag_idxThe zero-based fragment index.

◆ setAbortCallback()

None CDPL.ConfGen.TorsionDriver.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.TorsionDriver.getAbortCallback ( )

Returns the currently configured abort-check callback.

Returns
A reference to the abort-check callback.

◆ setTimeoutCallback()

None CDPL.ConfGen.TorsionDriver.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.TorsionDriver.getTimeoutCallback ( )

Returns the currently configured timeout-check callback.

Returns
A reference to the timeout-check callback.

◆ setLogMessageCallback()

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

Sets the callback receiving log messages emitted by the driver.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

LogMessageCallbackFunction CDPL.ConfGen.TorsionDriver.getLogMessageCallback ( )

Returns the currently configured log-message callback.

Returns
A reference to the log-message callback.

◆ generateConformers()

int CDPL.ConfGen.TorsionDriver.generateConformers ( )

Runs the torsion-driving conformer enumeration.

Returns
A ConfGen.ReturnCode value reporting the outcome of the generation.

◆ getNumConformers()

int CDPL.ConfGen.TorsionDriver.getNumConformers ( )

Returns the number of generated conformers.

Returns
The conformer count.

◆ getConformer()

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

◆ __getitem__()

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