![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
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...
#include <TorsionDriver.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 | |
| TorsionDriver () | |
Constructs the TorsionDriver instance. More... | |
| TorsionDriver (const TorsionDriver &)=delete | |
| ~TorsionDriver () | |
| Destructor. More... | |
| TorsionDriver & | operator= (const TorsionDriver &)=delete |
| const TorsionDriverSettings & | getSettings () const |
| Returns the current driver settings. More... | |
| TorsionDriverSettings & | getSettings () |
| Returns the current driver settings (mutable). 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 driver. More... | |
| const LogMessageCallbackFunction & | getLogMessageCallback () const |
| Returns the currently configured log-message callback. More... | |
| unsigned int | setup (const Chem::MolecularGraph &molgraph) |
| Sets up the driver for molgraph with the default rotatable bond perception. More... | |
| unsigned int | setup (const Chem::MolecularGraph &molgraph, const 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... | |
| void | clearInputCoordinates () |
| Removes all stored input coordinates. More... | |
| void | clearInputCoordinates (std::size_t frag_idx) |
| Removes all input coordinates of the fragment at index frag_idx. More... | |
| void | addInputCoordinates (const Math::Vector3DArray &coords) |
| Adds coords as a new starting conformation that the driver will torsion-drive. More... | |
| void | addInputCoordinates (const Math::Vector3DArray &coords, std::size_t frag_idx) |
| Adds coords as a new starting conformation restricted to the fragment at index frag_idx. More... | |
| void | addInputCoordinates (const ConformerData &conf_data, std::size_t frag_idx) |
| Adds the conformer data conf_data as a new starting conformation restricted to the fragment at index frag_idx. More... | |
| void | addInputCoordinates (const ConformerData::SharedPointer &conf_data, std::size_t frag_idx) |
| Adds the conformer data shared pointer conf_data as a new starting conformation restricted to the fragment at index frag_idx. More... | |
| std::size_t | getNumFragments () const |
| Returns the number of fragments produced by the rotatable bond decomposition. More... | |
| const Chem::Fragment & | getFragment (std::size_t idx) const |
| Returns the fragment at index idx. More... | |
| unsigned int | generateConformers () |
| Runs the torsion-driving conformer enumeration. 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... | |
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.
| typedef boost::indirect_iterator<ConformerDataArray::const_iterator, const ConformerData> CDPL::ConfGen::TorsionDriver::ConstConformerIterator |
A constant iterator over the generated conformers.
| typedef boost::indirect_iterator<ConformerDataArray::const_iterator, ConformerData> CDPL::ConfGen::TorsionDriver::ConformerIterator |
A mutable iterator over the generated conformers.
| CDPL::ConfGen::TorsionDriver::TorsionDriver | ( | ) |
Constructs the TorsionDriver instance.
|
delete |
| CDPL::ConfGen::TorsionDriver::~TorsionDriver | ( | ) |
Destructor.
|
delete |
| const TorsionDriverSettings& CDPL::ConfGen::TorsionDriver::getSettings | ( | ) | const |
Returns the current driver settings.
const reference to the settings. | TorsionDriverSettings& CDPL::ConfGen::TorsionDriver::getSettings | ( | ) |
Returns the current driver settings (mutable).
| void CDPL::ConfGen::TorsionDriver::clearTorsionLibraries | ( | ) |
Removes all configured torsion libraries.
| void CDPL::ConfGen::TorsionDriver::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::TorsionDriver::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::TorsionDriver::getAbortCallback | ( | ) | const |
Returns the currently configured abort-check callback.
const reference to the abort-check callback. | void CDPL::ConfGen::TorsionDriver::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::TorsionDriver::getTimeoutCallback | ( | ) | const |
Returns the currently configured timeout-check callback.
const reference to the timeout-check callback. | void CDPL::ConfGen::TorsionDriver::setLogMessageCallback | ( | const LogMessageCallbackFunction & | func | ) |
Sets the callback receiving log messages emitted by the driver.
| func | The log-message callback. |
| const LogMessageCallbackFunction& CDPL::ConfGen::TorsionDriver::getLogMessageCallback | ( | ) | const |
Returns the currently configured log-message callback.
const reference to the log-message callback. | unsigned int CDPL::ConfGen::TorsionDriver::setup | ( | const Chem::MolecularGraph & | molgraph | ) |
Sets up the driver for molgraph with the default rotatable bond perception.
| molgraph | The input molecular graph. |
| unsigned int CDPL::ConfGen::TorsionDriver::setup | ( | const Chem::MolecularGraph & | molgraph, |
| const Util::BitSet & | bond_mask | ||
| ) |
Sets up the driver for molgraph using only the bonds whose corresponding bit is set in bond_mask as rotatable.
| molgraph | The input molecular graph. |
| bond_mask | The bit mask of rotatable bonds (one bit per bond of molgraph). |
| void CDPL::ConfGen::TorsionDriver::clearInputCoordinates | ( | ) |
Removes all stored input coordinates.
| void CDPL::ConfGen::TorsionDriver::clearInputCoordinates | ( | std::size_t | frag_idx | ) |
Removes all input coordinates of the fragment at index frag_idx.
| frag_idx | The zero-based fragment index. |
| void CDPL::ConfGen::TorsionDriver::addInputCoordinates | ( | const Math::Vector3DArray & | coords | ) |
Adds coords as a new starting conformation that the driver will torsion-drive.
| coords | The input 3D coordinates. |
| void CDPL::ConfGen::TorsionDriver::addInputCoordinates | ( | const Math::Vector3DArray & | coords, |
| std::size_t | frag_idx | ||
| ) |
Adds coords as a new starting conformation restricted to the fragment at index frag_idx.
| coords | The input 3D coordinates of the fragment. |
| frag_idx | The zero-based fragment index. |
| void CDPL::ConfGen::TorsionDriver::addInputCoordinates | ( | const ConformerData & | conf_data, |
| std::size_t | frag_idx | ||
| ) |
Adds the conformer data conf_data as a new starting conformation restricted to the fragment at index frag_idx.
| conf_data | The input conformer data. |
| frag_idx | The zero-based fragment index. |
| void CDPL::ConfGen::TorsionDriver::addInputCoordinates | ( | const ConformerData::SharedPointer & | conf_data, |
| std::size_t | frag_idx | ||
| ) |
Adds the conformer data shared pointer conf_data as a new starting conformation restricted to the fragment at index frag_idx.
| conf_data | The input conformer data. |
| frag_idx | The zero-based fragment index. |
| std::size_t CDPL::ConfGen::TorsionDriver::getNumFragments | ( | ) | const |
Returns the number of fragments produced by the rotatable bond decomposition.
| const Chem::Fragment& CDPL::ConfGen::TorsionDriver::getFragment | ( | std::size_t | idx | ) | const |
Returns the fragment at index idx.
| idx | The zero-based fragment index. |
const reference to the fragment. | Base::IndexError | if the number of fragments is zero or idx is not in the range [0, getNumFragments() - 1]. |
| unsigned int CDPL::ConfGen::TorsionDriver::generateConformers | ( | ) |
Runs the torsion-driving conformer enumeration.
| std::size_t CDPL::ConfGen::TorsionDriver::getNumConformers | ( | ) | const |
Returns the number of generated conformers.
| const ConformerData& CDPL::ConfGen::TorsionDriver::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::TorsionDriver::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::TorsionDriver::getConformersBegin | ( | ) | const |
Returns a constant iterator pointing to the first conformer.
| ConstConformerIterator CDPL::ConfGen::TorsionDriver::getConformersEnd | ( | ) | const |
Returns a constant iterator pointing one past the last conformer.
| ConformerIterator CDPL::ConfGen::TorsionDriver::getConformersBegin | ( | ) |
Returns a mutable iterator pointing to the first conformer.
| ConformerIterator CDPL::ConfGen::TorsionDriver::getConformersEnd | ( | ) |
Returns a mutable iterator pointing one past the last conformer.
| ConstConformerIterator CDPL::ConfGen::TorsionDriver::begin | ( | ) | const |
Returns a constant iterator pointing to the first conformer (range-based for support).
| ConstConformerIterator CDPL::ConfGen::TorsionDriver::end | ( | ) | const |
Returns a constant iterator pointing one past the last conformer (range-based for support).
| ConformerIterator CDPL::ConfGen::TorsionDriver::begin | ( | ) |
Returns a mutable iterator pointing to the first conformer (range-based for support).
| ConformerIterator CDPL::ConfGen::TorsionDriver::end | ( | ) |
Returns a mutable iterator pointing one past the last conformer (range-based for support).