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

High-level driver for the generation of a single low-energy 3D structure from a molecular graph. More...

#include <StructureGenerator.hpp>

Public Member Functions

 StructureGenerator ()
 Constructs the StructureGenerator instance. More...
 
 StructureGenerator (const StructureGenerator &)=delete
 
 ~StructureGenerator ()
 Destructor. More...
 
StructureGeneratoroperator= (const StructureGenerator &)=delete
 
const StructureGeneratorSettingsgetSettings () const
 Returns the current generator settings. More...
 
StructureGeneratorSettingsgetSettings ()
 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 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 generator. More...
 
const LogMessageCallbackFunctiongetLogMessageCallback () const
 Returns the currently configured log-message callback. More...
 
unsigned int generate (const Chem::MolecularGraph &molgraph)
 Generates a single 3D structure for molgraph. More...
 
unsigned int generate (const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &fixed_substr)
 Generates a single 3D structure 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 single 3D structure for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates fixed_substr_coords. More...
 
void setCoordinates (Chem::MolecularGraph &molgraph) const
 Transfers the generated 3D coordinates onto the atoms of molgraph (via Chem::set3DCoordinates). More...
 
const ConformerDatagetCoordinates () const
 Returns the conformer data produced by the most recent generate() call. More...
 

Detailed Description

High-level driver for the generation of a single low-energy 3D structure from a molecular graph.

Internally delegates to the same pipeline as class ConfGen::ConformerGenerator but stops after the first acceptable conformer has been produced.

Constructor & Destructor Documentation

◆ StructureGenerator() [1/2]

CDPL::ConfGen::StructureGenerator::StructureGenerator ( )

Constructs the StructureGenerator instance.

◆ StructureGenerator() [2/2]

CDPL::ConfGen::StructureGenerator::StructureGenerator ( const StructureGenerator )
delete

◆ ~StructureGenerator()

CDPL::ConfGen::StructureGenerator::~StructureGenerator ( )

Destructor.

Member Function Documentation

◆ operator=()

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

◆ getSettings() [1/2]

const StructureGeneratorSettings& CDPL::ConfGen::StructureGenerator::getSettings ( ) const

Returns the current generator settings.

Returns
A const reference to the settings.

◆ getSettings() [2/2]

StructureGeneratorSettings& CDPL::ConfGen::StructureGenerator::getSettings ( )

Returns the current generator settings (mutable).

Returns
A reference to the settings.

◆ clearFragmentLibraries()

void CDPL::ConfGen::StructureGenerator::clearFragmentLibraries ( )

Removes all configured fragment libraries.

◆ addFragmentLibrary()

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

Adds lib to the list of fragment libraries consulted during fragment-based 3D structure generation.

Parameters
libThe fragment library to add.

◆ clearTorsionLibraries()

void CDPL::ConfGen::StructureGenerator::clearTorsionLibraries ( )

Removes all configured torsion libraries.

◆ addTorsionLibrary()

void CDPL::ConfGen::StructureGenerator::addTorsionLibrary ( const TorsionLibrary::SharedPointer lib)

Adds lib to the list of torsion libraries consulted during torsion driving.

Parameters
libThe torsion library to add.

◆ setAbortCallback()

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

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

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

Returns the currently configured abort-check callback.

Returns
A const reference to the abort-check callback.

◆ setTimeoutCallback()

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

Returns the currently configured timeout-check callback.

Returns
A const reference to the timeout-check callback.

◆ setLogMessageCallback()

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

Sets the callback receiving log messages emitted by the generator.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

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

Returns the currently configured log-message callback.

Returns
A const reference to the log-message callback.

◆ generate() [1/3]

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

Generates a single 3D structure for molgraph.

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

◆ generate() [2/3]

unsigned int CDPL::ConfGen::StructureGenerator::generate ( const Chem::MolecularGraph molgraph,
const Chem::MolecularGraph fixed_substr 
)

Generates a single 3D structure for molgraph while keeping the substructure fixed_substr at its current 3D coordinates.

Parameters
molgraphThe input molecular graph.
fixed_substrThe substructure that must retain its current 3D coordinates.
Returns
A ConfGen::ReturnCode value reporting the outcome of the generation.
Since
1.1

◆ generate() [3/3]

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

Generates a single 3D structure for molgraph while keeping the substructure fixed_substr at the supplied 3D coordinates fixed_substr_coords.

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 generation.
Since
1.1

◆ setCoordinates()

void CDPL::ConfGen::StructureGenerator::setCoordinates ( Chem::MolecularGraph molgraph) const

Transfers the generated 3D coordinates onto the atoms of molgraph (via Chem::set3DCoordinates).

Parameters
molgraphThe molecular graph receiving the 3D coordinates.

◆ getCoordinates()

const ConformerData& CDPL::ConfGen::StructureGenerator::getCoordinates ( ) const

Returns the conformer data produced by the most recent generate() call.

Returns
A const reference to the conformer data.

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