Chemical Data Processing Library C++ API - Version 1.4.0
Namespaces | Classes | Typedefs | Functions
CDPL::ConfGen Namespace Reference

Contains classes and functions related to conformer ensemble generation. More...

Namespaces

 ConformerSamplingMode
 Provides constants used to specify the employed conformer sampling method.
 
 ControlParameter
 Provides keys for built-in control-parameters.
 
 ControlParameterDefault
 Provides default values for built-in control-parameters.
 
 DataFormat
 Provides preinitialized Base::DataFormat objects for all supported data formats.
 
 ForceFieldType
 Provides constants used to specify the forcefield that shall be used for 3D coordinates refinement and energy calculations.
 
 FragmentType
 Provides constants that are used to describe the nature of fragments used to build-up molecule 3D models.
 
 NitrogenEnumerationMode
 Provides constants for specifying the mode of invertible nitrogen enumeration.
 
 ReturnCode
 Provides constants that are used to describe the result of operations related to conformer generation.
 
 StructureGenerationMode
 Provides constants used to specify the 3D structure generation method that shall be employed.
 

Classes

class  CanonicalFragment
 Data structure representing a canonicalized molecular fragment. More...
 
class  CFLMoleculeReader
 Reader for molecule fragment data stored in the CDPL Conformer Generator Fragment Library (CFL) format. More...
 
class  ConformerData
 Container for the 3D coordinates of a generated conformer plus its associated energy value. More...
 
class  ConformerGenerator
 High-level driver for the generation of low-energy conformer ensembles of molecular graphs. More...
 
class  ConformerGeneratorSettings
 Bundle of configuration parameters for conformer ensemble generation via class ConfGen::ConformerGenerator. More...
 
class  DGConstraintGenerator
 Constructs geometric constraints (distance, planarity, volume) for distance-geometry-based 3D structure generation. More...
 
class  DGConstraintGeneratorSettings
 Bundle of configuration parameters for distance-geometry constraint generation via class ConfGen::DGConstraintGenerator. More...
 
class  DGStructureGenerator
 Distance-geometry-based generation of raw 3D structures for molecular graphs. More...
 
class  DGStructureGeneratorSettings
 Bundle of configuration parameters for raw coordinates generation via class ConfGen::DGStructureGenerator. More...
 
class  FragmentAssembler
 Driver for the fragment-based generation of 3D starting conformers. More...
 
class  FragmentAssemblerSettings
 Bundle of configuration parameters for fragment conformer assembly via class ConfGen::FragmentAssembler. More...
 
class  FragmentConformerGenerator
 Driver for the generation of low-energy conformer ensembles for single molecular fragments (chain, small ring system or macrocycle) More...
 
class  FragmentConformerGeneratorSettings
 Bundle of configuration parameters for fragment conformer ensemble generation via class ConfGen::FragmentConformerGenerator. More...
 
class  FragmentLibrary
 Data structure representing a library of pre-generated molecular fragment conformer ensembles. More...
 
class  FragmentLibraryEntry
 Data structure representing a single entry of a conformer generation fragment library. More...
 
class  FragmentLibraryGenerator
 Driver for populating a ConfGen::FragmentLibrary with conformers of canonicalized molecular fragments. More...
 
class  RMSDConformerSelector
 Greedy RMSD-based conformer-diversity filter. More...
 
class  StructureGenerator
 High-level driver for the generation of a single low-energy 3D structure from a molecular graph. More...
 
class  StructureGeneratorSettings
 Bundle of configuration parameters for single 3D structure generation via class ConfGen::StructureGenerator. More...
 
class  TorsionCategory
 Represents a node of a hierarchical torsion library. More...
 
class  TorsionDriver
 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...
 
class  TorsionDriverSettings
 Bundle of configuration parameters for systematic conformer enumeration via class ConfGen::TorsionDriver. More...
 
class  TorsionLibrary
 Data structure representing a hierarchical library of torsion rules organized into categories. More...
 
class  TorsionRule
 Data structure for the representation of single torsion library rules. More...
 
class  TorsionRuleMatch
 A single match of a ConfGen::TorsionRule against a rotatable bond: the rule, the bond and the four atoms that span the torsion. More...
 
class  TorsionRuleMatcher
 Finds torsion rules from a TorsionLibrary that apply to a given rotatable bond. More...
 

Typedefs

typedef std::function< bool()> CallbackFunction
 Generic wrapper for storing user-defined callback functions returning a bool status flag (see [FUNWRP]). More...
 
typedef Util::DefaultDataInputHandler< CFLMoleculeReader, DataFormat::CFLCFLMoleculeInputHandler
 Handler for the input of molecule fragments stored in the CDPL Conformer Generator Fragment Library (CFL) format. More...
 
typedef std::vector< ConformerData::SharedPointerConformerDataArray
 Dynamically-sized array of shared pointers to ConfGen::ConformerData objects. More...
 
typedef std::function< void(const std::string &)> LogMessageCallbackFunction
 Generic wrapper for storing user-defined log message callback functions (see [FUNWRP]). More...
 

Functions

CDPL_CONFGEN_API bool isFragmentLinkBond (const Chem::Bond &bond, const Chem::MolecularGraph &molgraph)
 Tells whether bond is a link bond between two fragments under the fragment-based conformer generation heuristics. More...
 
CDPL_CONFGEN_API bool isRotatableBond (const Chem::Bond &bond, const Chem::MolecularGraph &molgraph, bool het_h_rotors)
 Tells whether bond is rotatable under the conformer generation rotatable bond heuristics. More...
 
CDPL_CONFGEN_API bool getStrictErrorCheckingParameter (const Base::ControlParameterContainer &cntnr)
 Returns the value of the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter stored in cntnr. More...
 
CDPL_CONFGEN_API void setStrictErrorCheckingParameter (Base::ControlParameterContainer &cntnr, bool strict)
 Sets the value of the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter stored in cntnr. More...
 
CDPL_CONFGEN_API bool hasStrictErrorCheckingParameter (const Base::ControlParameterContainer &cntnr)
 Tells whether the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter is set on cntnr. More...
 
CDPL_CONFGEN_API void clearStrictErrorCheckingParameter (Base::ControlParameterContainer &cntnr)
 Removes the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter from cntnr. More...
 
CDPL_CONFGEN_API std::size_t createFragmentLinkBondMask (const Chem::MolecularGraph &molgraph, Util::BitSet &bond_mask, bool reset=true)
 Sets bits in bond_mask for every fragment-link bond of molgraph (see ConfGen::isFragmentLinkBond()). More...
 
CDPL_CONFGEN_API std::size_t createRotatableBondMask (const Chem::MolecularGraph &molgraph, Util::BitSet &bond_mask, bool het_h_rotors, bool reset=true)
 Sets bits in bond_mask for every rotatable bond of molgraph (see ConfGen::isRotatableBond()). More...
 
CDPL_CONFGEN_API std::size_t createRotatableBondMask (const Chem::MolecularGraph &molgraph, const Util::BitSet &excl_bond_mask, Util::BitSet &bond_mask, bool het_h_rotors, bool reset=true)
 Sets bits in bond_mask for every rotatable bond of molgraph that is not already marked in excl_bond_mask. More...
 
CDPL_CONFGEN_API std::size_t getRotatableBondCount (const Chem::MolecularGraph &molgraph, bool het_h_rotors)
 Returns the number of rotatable bonds in molgraph (see ConfGen::isRotatableBond()). More...
 
CDPL_CONFGEN_API unsigned int perceiveFragmentType (const Chem::MolecularGraph &molgraph)
 Classifies molgraph as a ConfGen::FragmentType (chain, flexible ring, rigid ring, etc.). More...
 
CDPL_CONFGEN_API unsigned int parameterizeMMFF94Interactions (const Chem::MolecularGraph &molgraph, ForceField::MMFF94InteractionParameterizer &parameterizer, ForceField::MMFF94InteractionData &param_data, unsigned int ff_type, bool strict, double estat_de_const, double estat_dist_expo)
 Parameterizes the MMFF94 interactions of molgraph via parameterizer and stores them in param_data. More...
 
CDPL_CONFGEN_API void setConformers (Chem::MolecularGraph &molgraph, const ConformerDataArray &conf_array)
 Transfers the conformer ensemble stored in conf_array onto molgraph (sets the per-atom 3D coordinates and conformer energies). More...
 
CDPL_CONFGEN_API std::size_t setupFixedSubstructureData (const Chem::SubstructureSearch &sub_search, std::size_t max_num_matches, Chem::MolecularGraph &molgraph, Chem::Fragment &fixed_substr, Math::Vector3DArray *fixed_substr_coords)
 Configures the fixed-substructure handling of molgraph using the matches produced by sub_search. More...
 
CDPL_CONFGEN_API std::size_t setupFixedSubstructureData (const Chem::CommonConnectedSubstructureSearch &sub_search, std::size_t max_num_matches, Chem::MolecularGraph &molgraph, Chem::Fragment &fixed_substr, Math::Vector3DArray *fixed_substr_coords)
 Configures the fixed-substructure handling of molgraph using the matches produced by sub_search. More...
 
CDPL_CONFGEN_API void initFixedSubstructureTemplate (Chem::MolecularGraph &molgraph, bool init_match_expr)
 Initializes molgraph as a fixed-substructure template (perception of atom/bond properties and optionally match expressions). More...
 
CDPL_CONFGEN_API bool initFixedSubstructurePattern (Chem::MolecularGraph &molgraph, const Chem::MolecularGraph *tmplt)
 Initializes molgraph as a fixed-substructure pattern matched against the supplied tmplt template. More...
 
CDPL_CONFGEN_API void prepareForConformerGeneration (Chem::Molecule &mol, bool canonicalize=false)
 Prepares mol for conformer generation by completing its hydrogens, perceiving SSSR, ring flags, implicit hydrogen counts, hybridization states, aromaticity and (optionally) canonicalizing the atom ordering. More...
 

Detailed Description

Contains classes and functions related to conformer ensemble generation.

Typedef Documentation

◆ CallbackFunction

typedef std::function<bool()> CDPL::ConfGen::CallbackFunction

Generic wrapper for storing user-defined callback functions returning a bool status flag (see [FUNWRP]).

Used by the conformer generation pipeline (Chem::ConformerGenerator, Chem::TorsionDriver, etc.) for the periodic abort and timeout-check callbacks: returning false signals the pipeline to abort.

◆ CFLMoleculeInputHandler

Handler for the input of molecule fragments stored in the CDPL Conformer Generator Fragment Library (CFL) format.

◆ ConformerDataArray

Dynamically-sized array of shared pointers to ConfGen::ConformerData objects.

◆ LogMessageCallbackFunction

typedef std::function<void(const std::string&)> CDPL::ConfGen::LogMessageCallbackFunction

Generic wrapper for storing user-defined log message callback functions (see [FUNWRP]).

Used by the conformer generation pipeline (Chem::ConformerGenerator, Chem::FragmentConformerGenerator, Chem::FragmentLibraryGenerator) to forward textual log messages to the caller.

Function Documentation

◆ isFragmentLinkBond()

CDPL_CONFGEN_API bool CDPL::ConfGen::isFragmentLinkBond ( const Chem::Bond bond,
const Chem::MolecularGraph molgraph 
)

Tells whether bond is a link bond between two fragments under the fragment-based conformer generation heuristics.

Parameters
bondThe bond to test.
molgraphThe parent molecular graph.
Returns
true if bond connects two fragments, and false otherwise.

◆ isRotatableBond()

CDPL_CONFGEN_API bool CDPL::ConfGen::isRotatableBond ( const Chem::Bond bond,
const Chem::MolecularGraph molgraph,
bool  het_h_rotors 
)

Tells whether bond is rotatable under the conformer generation rotatable bond heuristics.

Parameters
bondThe bond to test.
molgraphThe parent molecular graph.
het_h_rotorsIf true, rotors involving only heteroatom-bound hydrogens are also counted as rotatable.
Returns
true if bond is rotatable, and false otherwise.

◆ getStrictErrorCheckingParameter()

CDPL_CONFGEN_API bool CDPL::ConfGen::getStrictErrorCheckingParameter ( const Base::ControlParameterContainer cntnr)

Returns the value of the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter stored in cntnr.

Parameters
cntnrThe control-parameter container to query.
Returns
The current value of the STRICT_ERROR_CHECKING parameter (the ConfGen::ControlParameterDefault::STRICT_ERROR_CHECKING value if the parameter is unset).

◆ setStrictErrorCheckingParameter()

CDPL_CONFGEN_API void CDPL::ConfGen::setStrictErrorCheckingParameter ( Base::ControlParameterContainer cntnr,
bool  strict 
)

Sets the value of the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter stored in cntnr.

Parameters
cntnrThe control-parameter container to update.
strictThe new STRICT_ERROR_CHECKING value.

◆ hasStrictErrorCheckingParameter()

CDPL_CONFGEN_API bool CDPL::ConfGen::hasStrictErrorCheckingParameter ( const Base::ControlParameterContainer cntnr)

Tells whether the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter is set on cntnr.

Parameters
cntnrThe control-parameter container to query.
Returns
true if the parameter is set, and false otherwise.

◆ clearStrictErrorCheckingParameter()

CDPL_CONFGEN_API void CDPL::ConfGen::clearStrictErrorCheckingParameter ( Base::ControlParameterContainer cntnr)

Removes the ConfGen::ControlParameter::STRICT_ERROR_CHECKING parameter from cntnr.

Parameters
cntnrThe control-parameter container to update.

◆ createFragmentLinkBondMask()

CDPL_CONFGEN_API std::size_t CDPL::ConfGen::createFragmentLinkBondMask ( const Chem::MolecularGraph molgraph,
Util::BitSet bond_mask,
bool  reset = true 
)

Sets bits in bond_mask for every fragment-link bond of molgraph (see ConfGen::isFragmentLinkBond()).

Parameters
molgraphThe molecular graph.
bond_maskThe output bit mask sized to the number of bonds in molgraph.
resetIf true, the output mask is cleared before bits are set.
Returns
The number of fragment-link bonds encountered.

◆ createRotatableBondMask() [1/2]

CDPL_CONFGEN_API std::size_t CDPL::ConfGen::createRotatableBondMask ( const Chem::MolecularGraph molgraph,
Util::BitSet bond_mask,
bool  het_h_rotors,
bool  reset = true 
)

Sets bits in bond_mask for every rotatable bond of molgraph (see ConfGen::isRotatableBond()).

Parameters
molgraphThe molecular graph.
bond_maskThe output bit mask sized to the number of bonds in molgraph.
het_h_rotorsIf true, rotors involving only heteroatom-bound hydrogens are also counted as rotatable.
resetIf true, the output mask is cleared before bits are set.
Returns
The number of rotatable bonds encountered.

◆ createRotatableBondMask() [2/2]

CDPL_CONFGEN_API std::size_t CDPL::ConfGen::createRotatableBondMask ( const Chem::MolecularGraph molgraph,
const Util::BitSet excl_bond_mask,
Util::BitSet bond_mask,
bool  het_h_rotors,
bool  reset = true 
)

Sets bits in bond_mask for every rotatable bond of molgraph that is not already marked in excl_bond_mask.

Parameters
molgraphThe molecular graph.
excl_bond_maskThe bit mask of bonds to exclude from rotatable bond consideration.
bond_maskThe output bit mask sized to the number of bonds in molgraph.
het_h_rotorsIf true, rotors involving only heteroatom-bound hydrogens are also counted as rotatable.
resetIf true, the output mask is cleared before bits are set.
Returns
The number of rotatable bonds encountered.

◆ getRotatableBondCount()

CDPL_CONFGEN_API std::size_t CDPL::ConfGen::getRotatableBondCount ( const Chem::MolecularGraph molgraph,
bool  het_h_rotors 
)

Returns the number of rotatable bonds in molgraph (see ConfGen::isRotatableBond()).

Parameters
molgraphThe molecular graph.
het_h_rotorsIf true, rotors involving only heteroatom-bound hydrogens are also counted as rotatable.
Returns
The rotatable bond count.

◆ perceiveFragmentType()

CDPL_CONFGEN_API unsigned int CDPL::ConfGen::perceiveFragmentType ( const Chem::MolecularGraph molgraph)

Classifies molgraph as a ConfGen::FragmentType (chain, flexible ring, rigid ring, etc.).

Parameters
molgraphThe molecular graph.
Returns
The ConfGen::FragmentType identifier.

◆ parameterizeMMFF94Interactions()

CDPL_CONFGEN_API unsigned int CDPL::ConfGen::parameterizeMMFF94Interactions ( const Chem::MolecularGraph molgraph,
ForceField::MMFF94InteractionParameterizer parameterizer,
ForceField::MMFF94InteractionData param_data,
unsigned int  ff_type,
bool  strict,
double  estat_de_const,
double  estat_dist_expo 
)

Parameterizes the MMFF94 interactions of molgraph via parameterizer and stores them in param_data.

Parameters
molgraphThe molecular graph.
parameterizerThe MMFF94 interaction parameterizer.
param_dataThe output interaction-data structure.
ff_typeThe MMFF94 force field variant (see ForceField::MMFF94InteractionParameterizer for valid values).
strictIf true, missing parameters are treated as fatal errors. Otherwise, in case of parameterization problems, suitable fallback parameters will be used.
estat_de_constThe dielectric constant used in the electrostatic energy term.
estat_dist_expoThe distance exponent used in the electrostatic energy term.
Returns
A ConfGen::ReturnCode value reporting the outcome of the parameterization.

◆ setConformers()

CDPL_CONFGEN_API void CDPL::ConfGen::setConformers ( Chem::MolecularGraph molgraph,
const ConformerDataArray conf_array 
)

Transfers the conformer ensemble stored in conf_array onto molgraph (sets the per-atom 3D coordinates and conformer energies).

Parameters
molgraphThe molecular graph receiving the conformer data.
conf_arrayThe conformer ensemble to attach.

◆ setupFixedSubstructureData() [1/2]

CDPL_CONFGEN_API std::size_t CDPL::ConfGen::setupFixedSubstructureData ( const Chem::SubstructureSearch sub_search,
std::size_t  max_num_matches,
Chem::MolecularGraph molgraph,
Chem::Fragment fixed_substr,
Math::Vector3DArray fixed_substr_coords 
)

Configures the fixed-substructure handling of molgraph using the matches produced by sub_search.

Parameters
sub_searchThe substructure search engine providing the matches.
max_num_matchesThe maximum number of matches to process (0 means unlimited).
molgraphThe molecular graph that holds the input atoms (modified in place).
fixed_substrThe output fragment receiving the matched atoms/bonds.
fixed_substr_coordsOptional output array receiving the 3D coordinates of the fixed substructure atoms.
Returns
The number of matches processed.
Since
1.1

◆ setupFixedSubstructureData() [2/2]

CDPL_CONFGEN_API std::size_t CDPL::ConfGen::setupFixedSubstructureData ( const Chem::CommonConnectedSubstructureSearch sub_search,
std::size_t  max_num_matches,
Chem::MolecularGraph molgraph,
Chem::Fragment fixed_substr,
Math::Vector3DArray fixed_substr_coords 
)

Configures the fixed-substructure handling of molgraph using the matches produced by sub_search.

Parameters
sub_searchThe common-connected-substructure search engine providing the matches.
max_num_matchesThe maximum number of matches to process (0 means unlimited).
molgraphThe molecular graph that holds the input atoms (modified in place).
fixed_substrThe output fragment receiving the matched atoms/bonds.
fixed_substr_coordsOptional output array receiving the 3D coordinates of the fixed substructure atoms.
Returns
The number of matches processed.
Since
1.1

◆ initFixedSubstructureTemplate()

CDPL_CONFGEN_API void CDPL::ConfGen::initFixedSubstructureTemplate ( Chem::MolecularGraph molgraph,
bool  init_match_expr 
)

Initializes molgraph as a fixed-substructure template (perception of atom/bond properties and optionally match expressions).

Parameters
molgraphThe molecular graph that will serve as the template.
init_match_exprIf true, atom/bond match expressions are also generated.
Since
1.1

◆ initFixedSubstructurePattern()

CDPL_CONFGEN_API bool CDPL::ConfGen::initFixedSubstructurePattern ( Chem::MolecularGraph molgraph,
const Chem::MolecularGraph tmplt 
)

Initializes molgraph as a fixed-substructure pattern matched against the supplied tmplt template.

Parameters
molgraphThe molecular graph to initialize.
tmpltThe template molecular graph (may be nullptr).
Returns
true if the initialization succeeded, and false otherwise.
Since
1.1

◆ prepareForConformerGeneration()

CDPL_CONFGEN_API void CDPL::ConfGen::prepareForConformerGeneration ( Chem::Molecule mol,
bool  canonicalize = false 
)

Prepares mol for conformer generation by completing its hydrogens, perceiving SSSR, ring flags, implicit hydrogen counts, hybridization states, aromaticity and (optionally) canonicalizing the atom ordering.

Parameters
molThe molecule to prepare (modified in place).
canonicalizeIf true, the atom ordering of mol is canonicalized.