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

Driver for populating a ConfGen::FragmentLibrary with conformers of canonicalized molecular fragments. More...

#include <FragmentLibraryGenerator.hpp>

Public Member Functions

 FragmentLibraryGenerator ()
 Constructs the FragmentLibraryGenerator instance without an associated fragment library. More...
 
 FragmentLibraryGenerator (const FragmentLibrary::SharedPointer &lib)
 Constructs the FragmentLibraryGenerator instance and associates it with lib. More...
 
 FragmentLibraryGenerator (const FragmentLibraryGenerator &)=delete
 
FragmentLibraryGeneratoroperator= (const FragmentLibraryGenerator &)=delete
 
void setFragmentLibrary (const FragmentLibrary::SharedPointer &lib)
 Sets the fragment library to populate. More...
 
const FragmentLibrary::SharedPointergetFragmentLibrary () const
 Returns the currently associated fragment library. More...
 
FragmentConformerGeneratorSettingsgetSettings ()
 Returns a reference to the fragment conformer generation settings. More...
 
const FragmentConformerGeneratorSettingsgetSettings () const
 Returns a const reference to the fragment conformer generation settings. More...
 
void setAbortCallback (const CallbackFunction &func)
 Sets the callback invoked periodically to allow conformer generation to be aborted. 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 fragment processing. More...
 
const LogMessageCallbackFunctiongetLogMessageCallback () const
 Returns the currently configured log-message callback. More...
 
unsigned int process (const Chem::MolecularGraph &frag, const Chem::MolecularGraph &parent)
 Adds a library entry for the fragment frag of the parent molecular graph parent. More...
 
std::size_t getNumGeneratedConformers () const
 Returns the number of conformers generated during the last process() call. More...
 
std::uint64_t getLibraryEntryHashCode () const
 Returns the hash code of the library entry created during the last process() call. More...
 

Detailed Description

Driver for populating a ConfGen::FragmentLibrary with conformers of canonicalized molecular fragments.

For each input fragment the generator constructs the corresponding ConfGen::CanonicalFragment, computes its hash code and SMILES string, generates a representative conformer ensemble using ConfGen::FragmentConformerGenerator and stores the result as a new FragmentLibraryEntry in the associated FragmentLibrary. Already-present entries (identified by hash code) are skipped.

Constructor & Destructor Documentation

◆ FragmentLibraryGenerator() [1/3]

CDPL::ConfGen::FragmentLibraryGenerator::FragmentLibraryGenerator ( )

Constructs the FragmentLibraryGenerator instance without an associated fragment library.

◆ FragmentLibraryGenerator() [2/3]

CDPL::ConfGen::FragmentLibraryGenerator::FragmentLibraryGenerator ( const FragmentLibrary::SharedPointer lib)

Constructs the FragmentLibraryGenerator instance and associates it with lib.

Parameters
libThe fragment library to populate.

◆ FragmentLibraryGenerator() [3/3]

CDPL::ConfGen::FragmentLibraryGenerator::FragmentLibraryGenerator ( const FragmentLibraryGenerator )
delete

Member Function Documentation

◆ operator=()

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

◆ setFragmentLibrary()

void CDPL::ConfGen::FragmentLibraryGenerator::setFragmentLibrary ( const FragmentLibrary::SharedPointer lib)

Sets the fragment library to populate.

Parameters
libThe new fragment library.

◆ getFragmentLibrary()

const FragmentLibrary::SharedPointer& CDPL::ConfGen::FragmentLibraryGenerator::getFragmentLibrary ( ) const

Returns the currently associated fragment library.

Returns
A const reference to the fragment library smart pointer.

◆ getSettings() [1/2]

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

Returns a reference to the fragment conformer generation settings.

Returns
A reference to the settings.

◆ getSettings() [2/2]

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

Returns a const reference to the fragment conformer generation settings.

Returns
A const reference to the settings.

◆ setAbortCallback()

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

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

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

Returns the currently configured abort-check callback.

Returns
A const reference to the abort-check callback.

◆ setTimeoutCallback()

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

Returns the currently configured timeout-check callback.

Returns
A const reference to the timeout-check callback.

◆ setLogMessageCallback()

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

Sets the callback that receives log messages produced during fragment processing.

Parameters
funcThe log-message callback.

◆ getLogMessageCallback()

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

Returns the currently configured log-message callback.

Returns
A const reference to the log-message callback.

◆ process()

unsigned int CDPL::ConfGen::FragmentLibraryGenerator::process ( const Chem::MolecularGraph frag,
const Chem::MolecularGraph parent 
)

Adds a library entry for the fragment frag of the parent molecular graph parent.

Parameters
fragThe fragment to add.
parentThe parent molecular graph the fragment was derived from.
Returns
A status code defined in ConfGen::ReturnCode.

◆ getNumGeneratedConformers()

std::size_t CDPL::ConfGen::FragmentLibraryGenerator::getNumGeneratedConformers ( ) const

Returns the number of conformers generated during the last process() call.

Returns
The number of generated conformers.

◆ getLibraryEntryHashCode()

std::uint64_t CDPL::ConfGen::FragmentLibraryGenerator::getLibraryEntryHashCode ( ) const

Returns the hash code of the library entry created during the last process() call.

Returns
The hash code of the library entry.

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