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

Greedy RMSD-based conformer-diversity filter. More...

#include <RMSDConformerSelector.hpp>

Public Member Functions

 RMSDConformerSelector ()
 Constructs the RMSDConformerSelector instance. More...
 
 RMSDConformerSelector (const RMSDConformerSelector &)=delete
 
RMSDConformerSelectoroperator= (const RMSDConformerSelector &)=delete
 
void setMinRMSD (double min_rmsd)
 Sets the minimum RMSD that a candidate conformer must keep from every already-selected conformer to be accepted. More...
 
double getMinRMSD () const
 Returns the currently configured minimum RMSD threshold. More...
 
void setAbortCallback (const CallbackFunction &func)
 Sets the callback invoked periodically to allow the selection to be aborted by the user. More...
 
const CallbackFunctiongetAbortCallback () const
 Returns the currently configured abort-check callback. More...
 
std::size_t getNumSymmetryMappings () const
 Returns the number of symmetry (automorphism) mappings enumerated during the last setup() call. More...
 
void setMaxNumSymmetryMappings (std::size_t max_num)
 Sets the maximum number of symmetry mappings to enumerate per setup() call. More...
 
std::size_t getMaxNumSymmetryMappings () const
 Returns the currently configured maximum number of symmetry mappings. More...
 
void setup (const Chem::MolecularGraph &molgraph, const Util::BitSet &atom_mask)
 Sets up the selector for the subgraph of molgraph defined by atom_mask. More...
 
void setup (const Chem::MolecularGraph &molgraph, const Util::BitSet &atom_mask, const Util::BitSet &stable_config_atom_mask, const Math::Vector3DArray &coords)
 Sets up the selector for the subgraph of molgraph defined by atom_mask while restricting the enumerated automorphisms to those that preserve the chirality of atoms in stable_config_atom_mask with respect to the supplied 3D coordinates coords. More...
 
bool selected (const Math::Vector3DArray &conf_coords)
 Tests whether conf_coords is sufficiently different from already-selected conformers and, if so, adds it to the selected set. More...
 

Static Public Attributes

static constexpr std::size_t DEF_MAX_NUM_SYMMETRY_MAPPINGS = 32768
 Default maximum number of considered automorphism (symmetry) mappings per setup() call. More...
 

Detailed Description

Greedy RMSD-based conformer-diversity filter.

For each candidate conformer the selector computes the minimum symmetry-equivalent RMSD against the set of already-selected conformers. A new conformer is accepted (added to the selected set) only if its minimum RMSD exceeds the configured threshold.

Constructor & Destructor Documentation

◆ RMSDConformerSelector() [1/2]

CDPL::ConfGen::RMSDConformerSelector::RMSDConformerSelector ( )

Constructs the RMSDConformerSelector instance.

◆ RMSDConformerSelector() [2/2]

CDPL::ConfGen::RMSDConformerSelector::RMSDConformerSelector ( const RMSDConformerSelector )
delete

Member Function Documentation

◆ operator=()

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

◆ setMinRMSD()

void CDPL::ConfGen::RMSDConformerSelector::setMinRMSD ( double  min_rmsd)

Sets the minimum RMSD that a candidate conformer must keep from every already-selected conformer to be accepted.

Parameters
min_rmsdThe new minimum RMSD.

◆ getMinRMSD()

double CDPL::ConfGen::RMSDConformerSelector::getMinRMSD ( ) const

Returns the currently configured minimum RMSD threshold.

Returns
The minimum RMSD threshold.

◆ setAbortCallback()

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

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

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

Returns the currently configured abort-check callback.

Returns
A const reference to the abort-check callback.

◆ getNumSymmetryMappings()

std::size_t CDPL::ConfGen::RMSDConformerSelector::getNumSymmetryMappings ( ) const

Returns the number of symmetry (automorphism) mappings enumerated during the last setup() call.

Returns
The symmetry-mapping count.

◆ setMaxNumSymmetryMappings()

void CDPL::ConfGen::RMSDConformerSelector::setMaxNumSymmetryMappings ( std::size_t  max_num)

Sets the maximum number of symmetry mappings to enumerate per setup() call.

Parameters
max_numThe new maximum number of mappings.

◆ getMaxNumSymmetryMappings()

std::size_t CDPL::ConfGen::RMSDConformerSelector::getMaxNumSymmetryMappings ( ) const

Returns the currently configured maximum number of symmetry mappings.

Returns
The maximum number of mappings.

◆ setup() [1/2]

void CDPL::ConfGen::RMSDConformerSelector::setup ( const Chem::MolecularGraph molgraph,
const Util::BitSet atom_mask 
)

Sets up the selector for the subgraph of molgraph defined by atom_mask.

Parameters
molgraphThe parent molecular graph.
atom_maskThe bit mask selecting atoms considered during RMSD computation.

◆ setup() [2/2]

void CDPL::ConfGen::RMSDConformerSelector::setup ( const Chem::MolecularGraph molgraph,
const Util::BitSet atom_mask,
const Util::BitSet stable_config_atom_mask,
const Math::Vector3DArray coords 
)

Sets up the selector for the subgraph of molgraph defined by atom_mask while restricting the enumerated automorphisms to those that preserve the chirality of atoms in stable_config_atom_mask with respect to the supplied 3D coordinates coords.

Parameters
molgraphThe parent molecular graph.
atom_maskThe bit mask selecting atoms considered during RMSD computation.
stable_config_atom_maskThe bit mask of atoms whose stereo-configuration must be preserved.
coordsThe 3D coordinates used to determine the stereo-configurations.

◆ selected()

bool CDPL::ConfGen::RMSDConformerSelector::selected ( const Math::Vector3DArray conf_coords)

Tests whether conf_coords is sufficiently different from already-selected conformers and, if so, adds it to the selected set.

Parameters
conf_coordsThe candidate conformer's 3D coordinates.
Returns
true if the conformer was selected, and false otherwise.

Member Data Documentation

◆ DEF_MAX_NUM_SYMMETRY_MAPPINGS

constexpr std::size_t CDPL::ConfGen::RMSDConformerSelector::DEF_MAX_NUM_SYMMETRY_MAPPINGS = 32768
staticconstexpr

Default maximum number of considered automorphism (symmetry) mappings per setup() call.


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