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

Driver for the fragment-based generation of 3D starting conformers. More...

+ Inheritance diagram for CDPL.ConfGen.FragmentAssembler:

Public Member Functions

None __init__ ()
 Constructs the FragmentAssembler instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
FragmentAssemblerSettings getSettings ()
 Returns the current assembler settings (mutable). More...
 
None clearFragmentLibraries ()
 Removes all configured fragment libraries.
 
None addFragmentLibrary (FragmentLibrary lib)
 Adds lib to the list of fragment libraries consulted during assembly. More...
 
None setAbortCallback (CallbackFunction func)
 Sets the callback invoked periodically to allow the processing 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 assembler. More...
 
LogMessageCallbackFunction getLogMessageCallback ()
 Returns the currently configured log-message callback. More...
 
int assemble (Chem.MolecularGraph molgraph)
 Assembles 3D conformer(s) for molgraph from fragment building blocks. More...
 
int assemble (Chem.MolecularGraph molgraph, Chem.MolecularGraph fixed_substr, Math.Vector3DArray fixed_substr_coords)
 Assembles 3D conformer(s) for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates. More...
 
int getNumConformers ()
 Returns the number of assembled 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 fragment-based generation of 3D starting conformers.

The assembler decomposes a molecular graph into chain and ring fragments, looks up pre-built conformers from a ConfGen.FragmentLibrary for each fragment (generating them on the fly when no library entry is available) and reassembles them into full 3D structures. The conformers produced this way are intended to serve as starting conformers for subsequent torsion driving — they are not (in general) a final conformer ensemble.

See also
ConfGen.TorsionDriver, ConfGen.ConformerGenerator

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.FragmentAssembler.getObjectID ( )

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

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

FragmentAssemblerSettings CDPL.ConfGen.FragmentAssembler.getSettings ( )

Returns the current assembler settings (mutable).

Returns
A reference to the settings.

◆ addFragmentLibrary()

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

Adds lib to the list of fragment libraries consulted during assembly.

Parameters
libThe fragment library to add.

◆ setAbortCallback()

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

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

CallbackFunction CDPL.ConfGen.FragmentAssembler.getAbortCallback ( )

Returns the currently configured abort-check callback.

Returns
A reference to the abort-check callback.

◆ setTimeoutCallback()

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

Returns the currently configured timeout-check callback.

Returns
A reference to the timeout-check callback.

◆ setLogMessageCallback()

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

Sets the callback receiving log messages emitted by the assembler.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

LogMessageCallbackFunction CDPL.ConfGen.FragmentAssembler.getLogMessageCallback ( )

Returns the currently configured log-message callback.

Returns
A reference to the log-message callback.

◆ assemble() [1/2]

int CDPL.ConfGen.FragmentAssembler.assemble ( Chem.MolecularGraph  molgraph)

Assembles 3D conformer(s) for molgraph from fragment building blocks.

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

◆ assemble() [2/2]

int CDPL.ConfGen.FragmentAssembler.assemble ( Chem.MolecularGraph  molgraph,
Chem.MolecularGraph  fixed_substr,
Math.Vector3DArray  fixed_substr_coords 
)

Assembles 3D conformer(s) for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates.

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 assembly.
Since
1.1

◆ getNumConformers()

int CDPL.ConfGen.FragmentAssembler.getNumConformers ( )

Returns the number of assembled conformers.

Returns
The conformer count.

◆ getConformer()

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

◆ __getitem__()

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