Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::ConfGen::FragmentConformerGenerator Class Reference

Driver for the generation of low-energy conformer ensembles for single molecular fragments (chain, small ring system or macrocycle) More...

#include <FragmentConformerGenerator.hpp>

Public Types

typedef boost::indirect_iterator< ConformerDataArray::const_iterator, const ConformerDataConstConformerIterator
 A constant iterator over the generated conformers. More...
 
typedef boost::indirect_iterator< ConformerDataArray::const_iterator, ConformerDataConformerIterator
 A mutable iterator over the generated conformers. More...
 

Public Member Functions

 FragmentConformerGenerator ()
 Constructs the FragmentConformerGenerator instance. More...
 
 FragmentConformerGenerator (const FragmentConformerGenerator &)=delete
 
 ~FragmentConformerGenerator ()
 Destructor. More...
 
FragmentConformerGeneratoroperator= (const FragmentConformerGenerator &)=delete
 
FragmentConformerGeneratorSettingsgetSettings ()
 Returns the current generator settings (mutable). More...
 
const FragmentConformerGeneratorSettingsgetSettings () const
 Returns the current generator settings. More...
 
void setAbortCallback (const CallbackFunction &func)
 Sets the callback invoked periodically to allow conformer generation to be aborted by the user. More...
 
const CallbackFunctiongetAbortCallback () 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 CallbackFunctiongetTimeoutCallback () const
 Returns the currently configured timeout-check callback. More...
 
void setLogMessageCallback (const LogMessageCallbackFunction &func)
 Sets the callback that receives log messages produced during conformer generation. More...
 
const LogMessageCallbackFunctiongetLogMessageCallback () const
 Returns the currently configured log-message callback. More...
 
unsigned int generate (const Chem::MolecularGraph &molgraph)
 Generates a conformer ensemble for the fragment molgraph (the fragment type is perceived automatically). More...
 
unsigned int generate (const Chem::MolecularGraph &molgraph, unsigned int frag_type)
 Generates a conformer ensemble for the fragment molgraph using the fragment-type-specific settings selected by frag_type. More...
 
unsigned int generate (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &fixed_substr, const Math::Vector3DArray &fixed_substr_coords)
 Generates a conformer ensemble for the fragment molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates. More...
 
unsigned int generate (const Chem::MolecularGraph &molgraph, unsigned int frag_type, const Chem::MolecularGraph &fixed_substr, const Math::Vector3DArray &fixed_substr_coords)
 Generates a conformer ensemble for the fragment molgraph using the fragment-type-specific settings selected by frag_type while keeping the substructure fixed_substr at the supplied 3D coordinates. 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 ConformerDatagetConformer (std::size_t idx) const
 Returns the conformer at index idx. More...
 
ConformerDatagetConformer (std::size_t idx)
 Returns the conformer at index idx. More...
 
ConstConformerIterator getConformersBegin () const
 Returns a constant iterator pointing to the first generated conformer. More...
 
ConstConformerIterator getConformersEnd () const
 Returns a constant iterator pointing one past the last generated conformer. More...
 
ConformerIterator getConformersBegin ()
 Returns a mutable iterator pointing to the first generated conformer. More...
 
ConformerIterator getConformersEnd ()
 Returns a mutable iterator pointing one past the last generated conformer. More...
 
ConstConformerIterator begin () const
 Returns a constant iterator pointing to the first generated conformer (range-based for support). More...
 
ConstConformerIterator end () const
 Returns a constant iterator pointing one past the last generated conformer (range-based for support). More...
 
ConformerIterator begin ()
 Returns a mutable iterator pointing to the first generated conformer (range-based for support). More...
 
ConformerIterator end ()
 Returns a mutable iterator pointing one past the last generated conformer (range-based for support). More...
 

Detailed Description

Driver for the generation of low-energy conformer ensembles for single molecular fragments (chain, small ring system or macrocycle)

Conformer sampling is done in a stochastic manner using distance-geometry-based raw coordinates generation, MMFF94 energy minimization and conformer RMSD clustering.

See also
[CFRG]

Member Typedef Documentation

◆ ConstConformerIterator

typedef boost::indirect_iterator<ConformerDataArray::const_iterator, const ConformerData> CDPL::ConfGen::FragmentConformerGenerator::ConstConformerIterator

A constant iterator over the generated conformers.

◆ ConformerIterator

typedef boost::indirect_iterator<ConformerDataArray::const_iterator, ConformerData> CDPL::ConfGen::FragmentConformerGenerator::ConformerIterator

A mutable iterator over the generated conformers.

Constructor & Destructor Documentation

◆ FragmentConformerGenerator() [1/2]

CDPL::ConfGen::FragmentConformerGenerator::FragmentConformerGenerator ( )

Constructs the FragmentConformerGenerator instance.

◆ FragmentConformerGenerator() [2/2]

CDPL::ConfGen::FragmentConformerGenerator::FragmentConformerGenerator ( const FragmentConformerGenerator )
delete

◆ ~FragmentConformerGenerator()

CDPL::ConfGen::FragmentConformerGenerator::~FragmentConformerGenerator ( )

Destructor.

Member Function Documentation

◆ operator=()

FragmentConformerGenerator& CDPL::ConfGen::FragmentConformerGenerator::operator= ( const FragmentConformerGenerator )
delete

◆ getSettings() [1/2]

FragmentConformerGeneratorSettings& CDPL::ConfGen::FragmentConformerGenerator::getSettings ( )

Returns the current generator settings (mutable).

Returns
A reference to the settings.

◆ getSettings() [2/2]

const FragmentConformerGeneratorSettings& CDPL::ConfGen::FragmentConformerGenerator::getSettings ( ) const

Returns the current generator settings.

Returns
A const reference to the settings.

◆ setAbortCallback()

void CDPL::ConfGen::FragmentConformerGenerator::setAbortCallback ( const CallbackFunction func)

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

const CallbackFunction& CDPL::ConfGen::FragmentConformerGenerator::getAbortCallback ( ) const

Returns the currently configured abort-check callback.

Returns
A const reference to the abort-check callback.

◆ setTimeoutCallback()

void CDPL::ConfGen::FragmentConformerGenerator::setTimeoutCallback ( const CallbackFunction func)

Sets the callback invoked periodically to check whether the configured timeout has elapsed.

Parameters
funcThe timeout-check callback.

◆ getTimeoutCallback()

const CallbackFunction& CDPL::ConfGen::FragmentConformerGenerator::getTimeoutCallback ( ) const

Returns the currently configured timeout-check callback.

Returns
A const reference to the timeout-check callback.

◆ setLogMessageCallback()

void CDPL::ConfGen::FragmentConformerGenerator::setLogMessageCallback ( const LogMessageCallbackFunction func)

Sets the callback that receives log messages produced during conformer generation.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

const LogMessageCallbackFunction& CDPL::ConfGen::FragmentConformerGenerator::getLogMessageCallback ( ) const

Returns the currently configured log-message callback.

Returns
A const reference to the log-message callback.

◆ generate() [1/4]

unsigned int CDPL::ConfGen::FragmentConformerGenerator::generate ( const Chem::MolecularGraph molgraph)

Generates a conformer ensemble for the fragment molgraph (the fragment type is perceived automatically).

Parameters
molgraphThe fragment to process.
Returns
A status code defined in ConfGen::ReturnCode.

◆ generate() [2/4]

unsigned int CDPL::ConfGen::FragmentConformerGenerator::generate ( const Chem::MolecularGraph molgraph,
unsigned int  frag_type 
)

Generates a conformer ensemble for the fragment molgraph using the fragment-type-specific settings selected by frag_type.

Parameters
molgraphThe fragment to process.
frag_typeOne of the ConfGen::FragmentType values selecting the per-fragment-class settings.
Returns
A status code defined in ConfGen::ReturnCode.

◆ generate() [3/4]

unsigned int CDPL::ConfGen::FragmentConformerGenerator::generate ( const Chem::MolecularGraph molgraph,
const Chem::MolecularGraph fixed_substr,
const Math::Vector3DArray fixed_substr_coords 
)

Generates a conformer ensemble for the fragment molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates.

Parameters
molgraphThe fragment to process.
fixed_substrThe substructure that must retain the supplied 3D coordinates.
fixed_substr_coordsThe 3D coordinates assigned to fixed_substr.
Returns
A status code defined in ConfGen::ReturnCode.
Since
1.1

◆ generate() [4/4]

unsigned int CDPL::ConfGen::FragmentConformerGenerator::generate ( const Chem::MolecularGraph molgraph,
unsigned int  frag_type,
const Chem::MolecularGraph fixed_substr,
const Math::Vector3DArray fixed_substr_coords 
)

Generates a conformer ensemble for the fragment molgraph using the fragment-type-specific settings selected by frag_type while keeping the substructure fixed_substr at the supplied 3D coordinates.

Parameters
molgraphThe fragment to process.
frag_typeOne of the ConfGen::FragmentType values selecting the per-fragment-class settings.
fixed_substrThe substructure that must retain the supplied 3D coordinates.
fixed_substr_coordsThe 3D coordinates assigned to fixed_substr.
Returns
A status code defined in ConfGen::ReturnCode.
Since
1.1

◆ setConformers()

void CDPL::ConfGen::FragmentConformerGenerator::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).

Parameters
molgraphThe molecular graph that receives the conformer coordinates and energies.

◆ getNumConformers()

std::size_t CDPL::ConfGen::FragmentConformerGenerator::getNumConformers ( ) const

Returns the number of generated conformers.

Returns
The conformer count.

◆ getConformer() [1/2]

const ConformerData& CDPL::ConfGen::FragmentConformerGenerator::getConformer ( std::size_t  idx) const

Returns the conformer at index idx.

Parameters
idxThe zero-based conformer index.
Returns
A const reference to the conformer data.
Exceptions
Base::IndexErrorif the number of conformers is zero or idx is not in the range [0, getNumConformers() - 1].

◆ getConformer() [2/2]

ConformerData& CDPL::ConfGen::FragmentConformerGenerator::getConformer ( std::size_t  idx)

Returns the conformer at index idx.

Parameters
idxThe zero-based conformer index.
Returns
A reference to the conformer data.
Exceptions
Base::IndexErrorif the number of conformers is zero or idx is not in the range [0, getNumConformers() - 1].

◆ getConformersBegin() [1/2]

ConstConformerIterator CDPL::ConfGen::FragmentConformerGenerator::getConformersBegin ( ) const

Returns a constant iterator pointing to the first generated conformer.

Returns
A constant iterator pointing to the first conformer.

◆ getConformersEnd() [1/2]

ConstConformerIterator CDPL::ConfGen::FragmentConformerGenerator::getConformersEnd ( ) const

Returns a constant iterator pointing one past the last generated conformer.

Returns
A constant iterator pointing one past the last conformer.

◆ getConformersBegin() [2/2]

ConformerIterator CDPL::ConfGen::FragmentConformerGenerator::getConformersBegin ( )

Returns a mutable iterator pointing to the first generated conformer.

Returns
A mutable iterator pointing to the first conformer.

◆ getConformersEnd() [2/2]

ConformerIterator CDPL::ConfGen::FragmentConformerGenerator::getConformersEnd ( )

Returns a mutable iterator pointing one past the last generated conformer.

Returns
A mutable iterator pointing one past the last conformer.

◆ begin() [1/2]

ConstConformerIterator CDPL::ConfGen::FragmentConformerGenerator::begin ( ) const

Returns a constant iterator pointing to the first generated conformer (range-based for support).

Returns
A constant iterator pointing to the first conformer.

◆ end() [1/2]

ConstConformerIterator CDPL::ConfGen::FragmentConformerGenerator::end ( ) const

Returns a constant iterator pointing one past the last generated conformer (range-based for support).

Returns
A constant iterator pointing one past the last conformer.

◆ begin() [2/2]

ConformerIterator CDPL::ConfGen::FragmentConformerGenerator::begin ( )

Returns a mutable iterator pointing to the first generated conformer (range-based for support).

Returns
A mutable iterator pointing to the first conformer.

◆ end() [2/2]

ConformerIterator CDPL::ConfGen::FragmentConformerGenerator::end ( )

Returns a mutable iterator pointing one past the last generated conformer (range-based for support).

Returns
A mutable iterator pointing one past the last conformer.

The documentation for this class was generated from the following file: