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

Driver for populating a ConfGen.FragmentLibrary with conformers of canonicalized molecular fragments. More...

+ Inheritance diagram for CDPL.ConfGen.FragmentLibraryGenerator:

Public Member Functions

None __init__ ()
 Constructs the FragmentLibraryGenerator instance without an associated fragment library.
 
None __init__ (FragmentLibrary lib)
 Constructs the FragmentLibraryGenerator instance and associates it with lib. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None setFragmentLibrary (FragmentLibrary lib)
 Sets the fragment library to populate. More...
 
FragmentLibrary getFragmentLibrary ()
 Returns the currently associated fragment library. More...
 
None setAbortCallback (CallbackFunction func)
 Sets the callback invoked periodically to allow conformer generation to be aborted. 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 that receives log messages produced during fragment processing. More...
 
LogMessageCallbackFunction getLogMessageCallback ()
 Returns the currently configured log-message callback. More...
 
int process (MolecularGraph self, Chem.MolecularGraph frag)
 
int getNumGeneratedConformers ()
 Returns the number of conformers generated during the last process() call. More...
 
int getLibraryEntryHashCode ()
 Returns the hash code of the library entry created during the last process() call. More...
 
FragmentConformerGeneratorSettings getSettings ()
 Returns a reference to the fragment conformer generation settings. More...
 

Properties

 objectID = property(getObjectID)
 
 settings = property(getSettings)
 
 abortCallback = property(getAbortCallback, setAbortCallback)
 
 timeoutCallback = property(getTimeoutCallback, setTimeoutCallback)
 
 fragmentLibrary = property(getFragmentLibrary, setFragmentLibrary)
 
 numGeneratedConformers = property(getNumGeneratedConformers)
 
 libraryEntryHashCode = property(getLibraryEntryHashCode)
 
 logMessageCallback = property(getLogMessageCallback, setLogMessageCallback)
 

Detailed Description

Driver for populating a ConfGen.FragmentLibrary with conformers of canonicalized molecular fragments.

For each input fragment the generator constructs the corresponding ConfGen.CanonicalFragment, computes its hash code and SMILES string, generates a representative conformer ensemble using ConfGen.FragmentConformerGenerator and stores the result as a new FragmentLibraryEntry in the associated FragmentLibrary. Already-present entries (identified by hash code) are skipped.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.ConfGen.FragmentLibraryGenerator.__init__ ( FragmentLibrary  lib)

Constructs the FragmentLibraryGenerator instance and associates it with lib.

Parameters
libThe fragment library to populate.

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.FragmentLibraryGenerator.getObjectID ( )

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

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

◆ setFragmentLibrary()

None CDPL.ConfGen.FragmentLibraryGenerator.setFragmentLibrary ( FragmentLibrary  lib)

Sets the fragment library to populate.

Parameters
libThe new fragment library.

◆ getFragmentLibrary()

FragmentLibrary CDPL.ConfGen.FragmentLibraryGenerator.getFragmentLibrary ( )

Returns the currently associated fragment library.

Returns
A reference to the fragment library smart reference.

◆ setAbortCallback()

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

Sets the callback invoked periodically to allow conformer generation to be aborted.

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

CallbackFunction CDPL.ConfGen.FragmentLibraryGenerator.getAbortCallback ( )

Returns the currently configured abort-check callback.

Returns
A reference to the abort-check callback.

◆ setTimeoutCallback()

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

Returns the currently configured timeout-check callback.

Returns
A reference to the timeout-check callback.

◆ setLogMessageCallback()

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

Sets the callback that receives log messages produced during fragment processing.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

LogMessageCallbackFunction CDPL.ConfGen.FragmentLibraryGenerator.getLogMessageCallback ( )

Returns the currently configured log-message callback.

Returns
A reference to the log-message callback.

◆ process()

int CDPL.ConfGen.FragmentLibraryGenerator.process ( MolecularGraph  self,
Chem.MolecularGraph  frag 
)
Parameters
arg1
frag
Returns

◆ getNumGeneratedConformers()

int CDPL.ConfGen.FragmentLibraryGenerator.getNumGeneratedConformers ( )

Returns the number of conformers generated during the last process() call.

Returns
The number of generated conformers.

◆ getLibraryEntryHashCode()

int CDPL.ConfGen.FragmentLibraryGenerator.getLibraryEntryHashCode ( )

Returns the hash code of the library entry created during the last process() call.

Returns
The hash code of the library entry.

◆ getSettings()

FragmentConformerGeneratorSettings CDPL.ConfGen.FragmentLibraryGenerator.getSettings ( )

Returns a reference to the fragment conformer generation settings.

Returns
A reference to the settings.