Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.ConfGen.RMSDConformerSelector Class Reference

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

+ Inheritance diagram for CDPL.ConfGen.RMSDConformerSelector:

Public Member Functions

None __init__ ()
 Constructs the RMSDConformerSelector instance.
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None setMinRMSD (float min_rmsd)
 Sets the minimum RMSD that a candidate conformer must keep from every already-selected conformer to be accepted. More...
 
float getMinRMSD ()
 Returns the currently configured minimum RMSD threshold. More...
 
None setAbortCallback (CallbackFunction func)
 Sets the callback invoked periodically to allow the selection to be aborted by the user. More...
 
CallbackFunction getAbortCallback ()
 Returns the currently configured abort-check callback. More...
 
int getNumSymmetryMappings ()
 Returns the number of symmetry (automorphism) mappings enumerated during the last setup() call. More...
 
None setMaxNumSymmetryMappings (int max_num)
 Sets the maximum number of symmetry mappings to enumerate per setup() call. More...
 
int getMaxNumSymmetryMappings ()
 Returns the currently configured maximum number of symmetry mappings. More...
 
None setup (Chem.MolecularGraph molgraph, Util.BitSet atom_mask, Util.BitSet stable_config_atom_mask, 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...
 
None setup (Chem.MolecularGraph molgraph, Util.BitSet atom_mask)
 Sets up the selector for the subgraph of molgraph defined by atom_mask. More...
 
bool selected (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

int DEF_MAX_NUM_SYMMETRY_MAPPINGS = 32768
 Default maximum number of considered automorphism (symmetry) mappings per setup() call.
 

Properties

 objectID = property(getObjectID)
 
 abortCallback = property(getAbortCallback, setAbortCallback)
 
 numSymmetryMappings = property(getNumSymmetryMappings)
 
 maxNumSymmetryMappings = property(getMaxNumSymmetryMappings, setMaxNumSymmetryMappings)
 
 minRMSD = property(getMinRMSD, setMinRMSD)
 

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.

Member Function Documentation

◆ getObjectID()

int CDPL.ConfGen.RMSDConformerSelector.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python RMSDConformerSelector instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two RMSDConformerSelector instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ setMinRMSD()

None CDPL.ConfGen.RMSDConformerSelector.setMinRMSD ( float  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()

float CDPL.ConfGen.RMSDConformerSelector.getMinRMSD ( )

Returns the currently configured minimum RMSD threshold.

Returns
The minimum RMSD threshold.

◆ setAbortCallback()

None CDPL.ConfGen.RMSDConformerSelector.setAbortCallback ( CallbackFunction  func)

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

Parameters
funcThe abort-check callback.

◆ getAbortCallback()

CallbackFunction CDPL.ConfGen.RMSDConformerSelector.getAbortCallback ( )

Returns the currently configured abort-check callback.

Returns
A reference to the abort-check callback.

◆ getNumSymmetryMappings()

int CDPL.ConfGen.RMSDConformerSelector.getNumSymmetryMappings ( )

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

Returns
The symmetry-mapping count.

◆ setMaxNumSymmetryMappings()

None CDPL.ConfGen.RMSDConformerSelector.setMaxNumSymmetryMappings ( int  max_num)

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

Parameters
max_numThe new maximum number of mappings.

◆ getMaxNumSymmetryMappings()

int CDPL.ConfGen.RMSDConformerSelector.getMaxNumSymmetryMappings ( )

Returns the currently configured maximum number of symmetry mappings.

Returns
The maximum number of mappings.

◆ setup() [1/2]

None CDPL.ConfGen.RMSDConformerSelector.setup ( Chem.MolecularGraph  molgraph,
Util.BitSet  atom_mask,
Util.BitSet  stable_config_atom_mask,
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.

◆ setup() [2/2]

None CDPL.ConfGen.RMSDConformerSelector.setup ( Chem.MolecularGraph  molgraph,
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.

◆ selected()

bool CDPL.ConfGen.RMSDConformerSelector.selected ( 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.