![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
High-level driver for the generation of low-energy conformer ensembles of molecular graphs. More...
#include <ConformerGenerator.hpp>
Public Types | |
| typedef boost::indirect_iterator< ConformerDataArray::const_iterator, const ConformerData > | ConstConformerIterator |
| A constant iterator over the generated conformers. More... | |
| typedef boost::indirect_iterator< ConformerDataArray::const_iterator, ConformerData > | ConformerIterator |
| A mutable iterator over the generated conformers. More... | |
Public Member Functions | |
| ConformerGenerator () | |
Constructs the ConformerGenerator instance. More... | |
| ConformerGenerator (const ConformerGenerator &)=delete | |
| ~ConformerGenerator () | |
| Destructor. More... | |
| ConformerGenerator & | operator= (const ConformerGenerator &)=delete |
| const ConformerGeneratorSettings & | getSettings () const |
| Returns the current generator settings. More... | |
| ConformerGeneratorSettings & | getSettings () |
| Returns the current generator settings (mutable). More... | |
| void | clearFragmentLibraries () |
| Removes all configured fragment libraries. More... | |
| void | addFragmentLibrary (const FragmentLibrary::SharedPointer &lib) |
| Adds lib to the list of fragment libraries consulted during fragment-based 3D structure generation. More... | |
| void | clearTorsionLibraries () |
| Removes all configured torsion libraries. More... | |
| void | addTorsionLibrary (const TorsionLibrary::SharedPointer &lib) |
| Adds lib to the list of torsion libraries consulted during torsion driving. More... | |
| void | setAbortCallback (const CallbackFunction &func) |
| Sets the callback invoked periodically to allow the generation to be aborted by the user. More... | |
| const CallbackFunction & | getAbortCallback () const |
| Returns the currently configured abort-check callback. More... | |
| void | setTimeoutCallback (const CallbackFunction &func) |
| Sets the callback invoked periodically to check whether the configured timeout has elapsed. More... | |
| const CallbackFunction & | getTimeoutCallback () const |
| Returns the currently configured timeout-check callback. More... | |
| void | setLogMessageCallback (const LogMessageCallbackFunction &func) |
| Sets the callback receiving log messages emitted by the generator. More... | |
| const LogMessageCallbackFunction & | getLogMessageCallback () const |
| Returns the currently configured log-message callback. More... | |
| unsigned int | generate (const Chem::MolecularGraph &molgraph) |
| Generates a conformer ensemble for molgraph. More... | |
| unsigned int | generate (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &fixed_substr) |
| Generates a conformer ensemble for molgraph while keeping the substructure fixed_substr at its current 3D coordinates. More... | |
| unsigned int | generate (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &fixed_substr, const 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... | |
| void | setConformers (Chem::MolecularGraph &molgraph) const |
| Transfers the generated conformer ensemble onto molgraph. More... | |
| std::size_t | getNumConformers () const |
| Returns the number of generated conformers. More... | |
| const ConformerData & | getConformer (std::size_t idx) const |
| Returns the conformer at index idx. More... | |
| ConformerData & | getConformer (std::size_t idx) |
| Returns the conformer at index idx. More... | |
| ConstConformerIterator | getConformersBegin () const |
| Returns a constant iterator pointing to the first conformer. More... | |
| ConstConformerIterator | getConformersEnd () const |
| Returns a constant iterator pointing one past the last conformer. More... | |
| ConformerIterator | getConformersBegin () |
| Returns a mutable iterator pointing to the first conformer. More... | |
| ConformerIterator | getConformersEnd () |
| Returns a mutable iterator pointing one past the last conformer. More... | |
| ConstConformerIterator | begin () const |
| Returns a constant iterator pointing to the first conformer (range-based for support). More... | |
| ConstConformerIterator | end () const |
| Returns a constant iterator pointing one past the last conformer (range-based for support). More... | |
| ConformerIterator | begin () |
| Returns a mutable iterator pointing to the first conformer (range-based for support). More... | |
| ConformerIterator | end () |
| Returns a mutable iterator pointing one past the last conformer (range-based for support). More... | |
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.
| typedef boost::indirect_iterator<ConformerDataArray::const_iterator, const ConformerData> CDPL::ConfGen::ConformerGenerator::ConstConformerIterator |
A constant iterator over the generated conformers.
| typedef boost::indirect_iterator<ConformerDataArray::const_iterator, ConformerData> CDPL::ConfGen::ConformerGenerator::ConformerIterator |
A mutable iterator over the generated conformers.
| CDPL::ConfGen::ConformerGenerator::ConformerGenerator | ( | ) |
Constructs the ConformerGenerator instance.
|
delete |
| CDPL::ConfGen::ConformerGenerator::~ConformerGenerator | ( | ) |
Destructor.
|
delete |
| const ConformerGeneratorSettings& CDPL::ConfGen::ConformerGenerator::getSettings | ( | ) | const |
Returns the current generator settings.
const reference to the settings. | ConformerGeneratorSettings& CDPL::ConfGen::ConformerGenerator::getSettings | ( | ) |
Returns the current generator settings (mutable).
| void CDPL::ConfGen::ConformerGenerator::clearFragmentLibraries | ( | ) |
Removes all configured fragment libraries.
| void CDPL::ConfGen::ConformerGenerator::addFragmentLibrary | ( | const FragmentLibrary::SharedPointer & | lib | ) |
Adds lib to the list of fragment libraries consulted during fragment-based 3D structure generation.
| lib | The fragment library to add. |
| void CDPL::ConfGen::ConformerGenerator::clearTorsionLibraries | ( | ) |
Removes all configured torsion libraries.
| void CDPL::ConfGen::ConformerGenerator::addTorsionLibrary | ( | const TorsionLibrary::SharedPointer & | lib | ) |
Adds lib to the list of torsion libraries consulted during torsion driving.
| lib | The torsion library to add. |
| void CDPL::ConfGen::ConformerGenerator::setAbortCallback | ( | const CallbackFunction & | func | ) |
Sets the callback invoked periodically to allow the generation to be aborted by the user.
| func | The abort-check callback. |
| const CallbackFunction& CDPL::ConfGen::ConformerGenerator::getAbortCallback | ( | ) | const |
Returns the currently configured abort-check callback.
const reference to the abort-check callback. | void CDPL::ConfGen::ConformerGenerator::setTimeoutCallback | ( | const CallbackFunction & | func | ) |
Sets the callback invoked periodically to check whether the configured timeout has elapsed.
| func | The timeout-check callback. |
| const CallbackFunction& CDPL::ConfGen::ConformerGenerator::getTimeoutCallback | ( | ) | const |
Returns the currently configured timeout-check callback.
const reference to the timeout-check callback. | void CDPL::ConfGen::ConformerGenerator::setLogMessageCallback | ( | const LogMessageCallbackFunction & | func | ) |
Sets the callback receiving log messages emitted by the generator.
| func | The log-message callback. |
| const LogMessageCallbackFunction& CDPL::ConfGen::ConformerGenerator::getLogMessageCallback | ( | ) | const |
Returns the currently configured log-message callback.
const reference to the log-message callback. | unsigned int CDPL::ConfGen::ConformerGenerator::generate | ( | const Chem::MolecularGraph & | molgraph | ) |
Generates a conformer ensemble for molgraph.
| molgraph | The input molecular graph. |
| unsigned int CDPL::ConfGen::ConformerGenerator::generate | ( | const Chem::MolecularGraph & | molgraph, |
| const Chem::MolecularGraph & | fixed_substr | ||
| ) |
Generates a conformer ensemble for molgraph while keeping the substructure fixed_substr at its current 3D coordinates.
| molgraph | The input molecular graph. |
| fixed_substr | The substructure that must retain its current 3D coordinates. |
| unsigned int CDPL::ConfGen::ConformerGenerator::generate | ( | const Chem::MolecularGraph & | molgraph, |
| const Chem::MolecularGraph & | fixed_substr, | ||
| const 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.
| molgraph | The input molecular graph. |
| fixed_substr | The substructure that must retain the supplied 3D coordinates. |
| fixed_substr_coords | The 3D coordinates assigned to fixed_substr. |
| void CDPL::ConfGen::ConformerGenerator::setConformers | ( | Chem::MolecularGraph & | molgraph | ) | const |
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).
| molgraph | The molecular graph that receives the conformer coordinates and energies. |
| std::size_t CDPL::ConfGen::ConformerGenerator::getNumConformers | ( | ) | const |
Returns the number of generated conformers.
| const ConformerData& CDPL::ConfGen::ConformerGenerator::getConformer | ( | std::size_t | idx | ) | const |
Returns the conformer at index idx.
| idx | The zero-based conformer index. |
const reference to the conformer data. | Base::IndexError | if the number of conformers is zero or idx is not in the range [0, getNumConformers() - 1]. |
| ConformerData& CDPL::ConfGen::ConformerGenerator::getConformer | ( | std::size_t | idx | ) |
Returns the conformer at index idx.
| idx | The zero-based conformer index. |
| Base::IndexError | if the number of conformers is zero or idx is not in the range [0, getNumConformers() - 1]. |
| ConstConformerIterator CDPL::ConfGen::ConformerGenerator::getConformersBegin | ( | ) | const |
Returns a constant iterator pointing to the first conformer.
| ConstConformerIterator CDPL::ConfGen::ConformerGenerator::getConformersEnd | ( | ) | const |
Returns a constant iterator pointing one past the last conformer.
| ConformerIterator CDPL::ConfGen::ConformerGenerator::getConformersBegin | ( | ) |
Returns a mutable iterator pointing to the first conformer.
| ConformerIterator CDPL::ConfGen::ConformerGenerator::getConformersEnd | ( | ) |
Returns a mutable iterator pointing one past the last conformer.
| ConstConformerIterator CDPL::ConfGen::ConformerGenerator::begin | ( | ) | const |
Returns a constant iterator pointing to the first conformer (range-based for support).
| ConstConformerIterator CDPL::ConfGen::ConformerGenerator::end | ( | ) | const |
Returns a constant iterator pointing one past the last conformer (range-based for support).
| ConformerIterator CDPL::ConfGen::ConformerGenerator::begin | ( | ) |
Returns a mutable iterator pointing to the first conformer (range-based for support).
| ConformerIterator CDPL::ConfGen::ConformerGenerator::end | ( | ) |
Returns a mutable iterator pointing one past the last conformer (range-based for support).