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

Driver for the fragment-based generation of 3D starting conformers. More...

#include <FragmentAssembler.hpp>

Public Types

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

Public Member Functions

 FragmentAssembler ()
 Constructs the FragmentAssembler instance. More...
 
 FragmentAssembler (const FragmentAssembler &)=delete
 
 ~FragmentAssembler ()
 Destructor. More...
 
FragmentAssembleroperator= (const FragmentAssembler &)=delete
 
const FragmentAssemblerSettingsgetSettings () const
 Returns the current assembler settings. More...
 
FragmentAssemblerSettingsgetSettings ()
 Returns the current assembler 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 assembly. More...
 
void setAbortCallback (const CallbackFunction &func)
 Sets the callback invoked periodically to allow the processing 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 receiving log messages emitted by the assembler. More...
 
const LogMessageCallbackFunctiongetLogMessageCallback () const
 Returns the currently configured log-message callback. More...
 
unsigned int assemble (const Chem::MolecularGraph &molgraph)
 Assembles 3D conformer(s) for molgraph from fragment building blocks. More...
 
unsigned int assemble (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &fixed_substr, const Math::Vector3DArray &fixed_substr_coords)
 Assembles 3D conformer(s) for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates. More...
 
std::size_t getNumConformers () const
 Returns the number of assembled 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 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...
 

Detailed Description

Driver for the fragment-based generation of 3D starting conformers.

The assembler decomposes a molecular graph into chain and ring fragments, looks up pre-built conformers from a ConfGen::FragmentLibrary for each fragment (generating them on the fly when no library entry is available) and reassembles them into full 3D structures. The conformers produced this way are intended to serve as starting conformers for subsequent torsion driving — they are not (in general) a final conformer ensemble.

See also
ConfGen::TorsionDriver, ConfGen::ConformerGenerator

Member Typedef Documentation

◆ ConstConformerIterator

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

A constant iterator over the assembled conformers.

◆ ConformerIterator

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

A mutable iterator over the assembled conformers.

Constructor & Destructor Documentation

◆ FragmentAssembler() [1/2]

CDPL::ConfGen::FragmentAssembler::FragmentAssembler ( )

Constructs the FragmentAssembler instance.

◆ FragmentAssembler() [2/2]

CDPL::ConfGen::FragmentAssembler::FragmentAssembler ( const FragmentAssembler )
delete

◆ ~FragmentAssembler()

CDPL::ConfGen::FragmentAssembler::~FragmentAssembler ( )

Destructor.

Member Function Documentation

◆ operator=()

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

◆ getSettings() [1/2]

const FragmentAssemblerSettings& CDPL::ConfGen::FragmentAssembler::getSettings ( ) const

Returns the current assembler settings.

Returns
A const reference to the settings.

◆ getSettings() [2/2]

FragmentAssemblerSettings& CDPL::ConfGen::FragmentAssembler::getSettings ( )

Returns the current assembler settings (mutable).

Returns
A reference to the settings.

◆ clearFragmentLibraries()

void CDPL::ConfGen::FragmentAssembler::clearFragmentLibraries ( )

Removes all configured fragment libraries.

◆ addFragmentLibrary()

void CDPL::ConfGen::FragmentAssembler::addFragmentLibrary ( const FragmentLibrary::SharedPointer lib)

Adds lib to the list of fragment libraries consulted during assembly.

Parameters
libThe fragment library to add.

◆ setAbortCallback()

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

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

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

Returns the currently configured abort-check callback.

Returns
A const reference to the abort-check callback.

◆ setTimeoutCallback()

void CDPL::ConfGen::FragmentAssembler::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::FragmentAssembler::getTimeoutCallback ( ) const

Returns the currently configured timeout-check callback.

Returns
A const reference to the timeout-check callback.

◆ setLogMessageCallback()

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

Sets the callback receiving log messages emitted by the assembler.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

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

Returns the currently configured log-message callback.

Returns
A const reference to the log-message callback.

◆ assemble() [1/2]

unsigned int CDPL::ConfGen::FragmentAssembler::assemble ( const Chem::MolecularGraph molgraph)

Assembles 3D conformer(s) for molgraph from fragment building blocks.

Parameters
molgraphThe input molecular graph.
Returns
A ConfGen::ReturnCode value reporting the outcome of the assembly.

◆ assemble() [2/2]

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

Assembles 3D conformer(s) for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates.

Parameters
molgraphThe input molecular graph.
fixed_substrThe substructure that must retain the supplied 3D coordinates.
fixed_substr_coordsThe 3D coordinates assigned to fixed_substr.
Returns
A ConfGen::ReturnCode value reporting the outcome of the assembly.
Since
1.1

◆ getNumConformers()

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

Returns the number of assembled conformers.

Returns
The conformer count.

◆ getConformer() [1/2]

const ConformerData& CDPL::ConfGen::FragmentAssembler::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::FragmentAssembler::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::FragmentAssembler::getConformersBegin ( ) const

Returns a constant iterator pointing to the first conformer.

Returns
A constant iterator pointing to the first conformer.

◆ getConformersEnd() [1/2]

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

Returns a constant iterator pointing one past the last conformer.

Returns
A constant iterator pointing one past the last conformer.

◆ getConformersBegin() [2/2]

ConformerIterator CDPL::ConfGen::FragmentAssembler::getConformersBegin ( )

Returns a mutable iterator pointing to the first conformer.

Returns
A mutable iterator pointing to the first conformer.

◆ getConformersEnd() [2/2]

ConformerIterator CDPL::ConfGen::FragmentAssembler::getConformersEnd ( )

Returns a mutable iterator pointing one past the last conformer.

Returns
A mutable iterator pointing one past the last conformer.

◆ begin() [1/2]

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

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

Returns
A constant iterator pointing to the first conformer.

◆ end() [1/2]

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

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

Returns
A constant iterator pointing one past the last conformer.

◆ begin() [2/2]

ConformerIterator CDPL::ConfGen::FragmentAssembler::begin ( )

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

Returns
A mutable iterator pointing to the first conformer.

◆ end() [2/2]

ConformerIterator CDPL::ConfGen::FragmentAssembler::end ( )

Returns a mutable iterator pointing one past the last 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: