Driver for populating a ConfGen.FragmentLibrary with conformers of canonicalized molecular fragments.
More...
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.
◆ __init__()
Constructs the FragmentLibraryGenerator instance and associates it with lib.
- Parameters
-
| lib | The fragment library to populate. |
◆ 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
-
| lib | The 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
-
| func | The abort-check callback. |
◆ 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
-
| func | The timeout-check callback. |
◆ getTimeoutCallback()
Returns the currently configured timeout-check callback.
- Returns
- A reference to the timeout-check callback.
◆ setLogMessageCallback()
Sets the callback that receives log messages produced during fragment processing.
- Parameters
-
| func | The log-message callback. |
◆ 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 |
|
) |
| |
◆ 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()
Returns a reference to the fragment conformer generation settings.
- Returns
- A reference to the settings.