Loading...
Searching...
No Matches
RDKit::GaussianShape::ShapeInput Class Reference

`#include <ShapeInput.h>`

## Public Member Functions

| ShapeInput (const ROMol &mol, int confId=-1, const ShapeInputOptions &opts=ShapeInputOptions(), const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions())
| ShapeInput (const ShapeInput &other, unsigned int shapeNum)
| ShapeInput (const std::string &str)
| ShapeInput (const ShapeInput &other)
| ShapeInput (ShapeInput &&other)=default
ShapeInput & | operator= (const ShapeInput &other)
ShapeInput & | operator= (ShapeInput &&other)=default
| ~ShapeInput ()=default
void | merge (ShapeInput &&other)
std::string | toString () const
const std::string | getSmiles () const
unsigned int | getActiveShape () const
void | setActiveShape (unsigned int newShape)
const std::vector< double > & | getCoords () const
const std::vector< double > & | getAlphas () const
| Get the alpha values for the atoms and color features in the shape.
void | negateAlpha (unsigned int alphaNum)
std::vector< RDGeom::Point3D > | getAtomPoints (bool includeColors=false) const
| Fetch the coordinates of the atoms and optionally features.
bool | getIsNormalized () const
const std::vector< int > & | getFeatureTypes () const
unsigned int | getNumAtoms () const
| Get the number of atoms in the shape.
unsigned int | getNumFeatures () const
| Get the number of color features in the shape.
unsigned int | getNumShapes () const
double | getShapeVolume () const
| Get the volume of the atoms in the current active shape.
double | getShapeVolume (unsigned int shapeNum) const
| Get the volume for the atoms for the given shape number.
double | getColorVolume () const
| Get the volume of the color features in the current active shape.
double | getColorVolume (unsigned int shapeNum) const
| Get the volume of the color features for the given shape number.
const boost::dynamic_bitset * | getCarbonRadii () const
| Get the flags for which atoms have a carbon radius.
const std::array< double, 9 > & | calcCanonicalRotation ()
| Get the canonical rotation for the current active shape.
const std::array< double, 3 > & | calcCanonicalTranslation ()
| Get the canonical translation for the current active shape.
const std::array< double, 3 > & | calcEigenValues ()
| Get the eigen values for the coordinates matrix.
const std::array< size_t, 6 > & | calcExtremes ()
std::array< double, 3 > | calcMomentsOfInertia (bool includeColors=false) const
void | normalizeCoords ()
void | transformCoords (RDGeom::Transform3D &xform)
| Applies the given transformation to the current active shape.
std::unique_ptr< RWMol > | shapeToMol (bool includeColors=false, bool withBonds=true) const
std::array< double, 3 > | bestSimilarity (const ShapeInput &fitShape, unsigned int &bestThisShape, unsigned int &bestFitShape, RDGeom::Transform3D &bestXform, double threshold=-1.0, const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions())
double | maxPossibleSimilarity (const ShapeInput &fitShape, const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions()) const
void | pruneShapes (double simThreshold)

## Detailed Description

Definition at line 128 of file ShapeInput.h.

## Constructor & Destructor Documentation

## ShapeInput() [1/5]

RDKit::GaussianShape::ShapeInput::ShapeInput | ( | const ROMol & | mol,
|  | int | confId = -1,
|  | const ShapeInputOptions & | opts = ShapeInputOptions(),
|  | const ShapeOverlayOptions & | overlayOpts = ShapeOverlayOptions() )

explicit

Create the ShapeInput object.

Parameters

  mol | The molecule of interest
  confId | The conformer to use. If -1, uses all conformers.
  opts | Options for setting up the shape
  overlayOpts | Options for controlling overlays. The distance cutoff elements are used in the self-overlap calculations.

Referenced by bestSimilarity(), maxPossibleSimilarity(), merge(), operator=(), operator=(), ShapeInput(), ShapeInput(), and ShapeInput().

## ShapeInput() [2/5]

RDKit::GaussianShape::ShapeInput::ShapeInput | ( | const ShapeInput & | other,
|  | unsigned int | shapeNum )

Create a ShapeInput object with a single shape copied from other.

Parameters

  other | the ShapeInput that supplies the shape
  shapeNum | the number of the shape of interest.

References ShapeInput().

## ShapeInput() [3/5]

RDKit::GaussianShape::ShapeInput::ShapeInput | ( | const std::string & | str | ) |

inline explicit

Definition at line 145 of file ShapeInput.h.

References PRECONDITION.

## ShapeInput() [4/5]

RDKit::GaussianShape::ShapeInput::ShapeInput | ( | const ShapeInput & | other | ) |

References ShapeInput().

## ShapeInput() [5/5]

RDKit::GaussianShape::ShapeInput::ShapeInput | ( | ShapeInput && | other | ) |

default

References ShapeInput().

## ~ShapeInput()

RDKit::GaussianShape::ShapeInput::~ShapeInput | ( |  | ) |

default

## Member Function Documentation

## bestSimilarity()

std::array< double, 3 > RDKit::GaussianShape::ShapeInput::bestSimilarity | ( | const ShapeInput & | fitShape,
|  | unsigned int & | bestThisShape,
|  | unsigned int & | bestFitShape,
|  | RDGeom::Transform3D & | bestXform,
|  | double | threshold = -1.0,
|  | const ShapeOverlayOptions & | overlayOpts = ShapeOverlayOptions() )

Find the best similarity score between all shapes in this shape and the other one. Stops as soon as it gets something above the threshold. The score runs between 0.0 and 1.0, so the default threshold of -1.0 means no threshold. Fills in the shape numbers of the two that were responsible if there is something above the threshold, and the transformation that did it. Returns -1.0 for the similarity if there was nothing above the threshold. Note that the shape numbers are not necessarily the same as the original molecule conformation numbers.

References ShapeInput().

## calcCanonicalRotation()

const std::array< double, 9 > & RDKit::GaussianShape::ShapeInput::calcCanonicalRotation | ( |  | ) |

Get the canonical rotation for the current active shape.

## calcCanonicalTranslation()

const std::array< double, 3 > & RDKit::GaussianShape::ShapeInput::calcCanonicalTranslation | ( |  | ) |

Get the canonical translation for the current active shape.

## calcEigenValues()

const std::array< double, 3 > & RDKit::GaussianShape::ShapeInput::calcEigenValues | ( |  | ) |

Get the eigen values for the coordinates matrix.

## calcExtremes()

const std::array< size_t, 6 > & RDKit::GaussianShape::ShapeInput::calcExtremes | ( |  | ) |

Get the numbers of the points at the extremes of x, y and z for the current active shape. In the order minimum x, minimum y, minimum z, then the maxima.

## calcMomentsOfInertia()

std::array< double, 3 > RDKit::GaussianShape::ShapeInput::calcMomentsOfInertia | ( | bool | includeColors = false | ) | const

Return the principal moments of inertia, if Eigen3 is available, and the eigenvalues of the canonical transformation if not, for the current active shape.

## getActiveShape()

unsigned int RDKit::GaussianShape::ShapeInput::getActiveShape | ( |  | ) | const

inline

Definition at line 179 of file ShapeInput.h.

## getAlphas()

const std::vector< double > & RDKit::GaussianShape::ShapeInput::getAlphas | ( |  | ) | const

inline

Get the alpha values for the atoms and color features in the shape.

Definition at line 192 of file ShapeInput.h.

## getAtomPoints()

std::vector< RDGeom::Point3D > RDKit::GaussianShape::ShapeInput::getAtomPoints | ( | bool | includeColors = false | ) | const

Fetch the coordinates of the atoms and optionally features.

## getCarbonRadii()

const boost::dynamic_bitset * RDKit::GaussianShape::ShapeInput::getCarbonRadii | ( |  | ) | const

inline

Get the flags for which atoms have a carbon radius.

Definition at line 227 of file ShapeInput.h.

## getColorVolume() [1/2]

double RDKit::GaussianShape::ShapeInput::getColorVolume | ( |  | ) | const

inline

Get the volume of the color features in the current active shape.

Definition at line 221 of file ShapeInput.h.

## getColorVolume() [2/2]

double RDKit::GaussianShape::ShapeInput::getColorVolume | ( | unsigned int | shapeNum | ) | const

Get the volume of the color features for the given shape number.

## getCoords()

const std::vector< double > & RDKit::GaussianShape::ShapeInput::getCoords | ( |  | ) | const

inline

Return the coordinates of the currently active shape. Note that the coords are returned as a vector size 3*getNumAtoms()

Definition at line 188 of file ShapeInput.h.

## getFeatureTypes()

const std::vector< int > & RDKit::GaussianShape::ShapeInput::getFeatureTypes | ( |  | ) | const

inline

Return the feature types of all atoms/features in the shape. Atoms have type 0.

Definition at line 205 of file ShapeInput.h.

## getIsNormalized()

bool RDKit::GaussianShape::ShapeInput::getIsNormalized | ( |  | ) | const

inline

Return whether the coordinates for the current active shape are normalized.

Definition at line 202 of file ShapeInput.h.

## getNumAtoms()

unsigned int RDKit::GaussianShape::ShapeInput::getNumAtoms | ( |  | ) | const

inline

Get the number of atoms in the shape.

Definition at line 207 of file ShapeInput.h.

## getNumFeatures()

unsigned int RDKit::GaussianShape::ShapeInput::getNumFeatures | ( |  | ) | const

inline

Get the number of color features in the shape.

Definition at line 209 of file ShapeInput.h.

## getNumShapes()

unsigned int RDKit::GaussianShape::ShapeInput::getNumShapes | ( |  | ) | const

inline

Get the number of shapes/conformations in the shape object. This may be smaller than the number of conformations in the input molecule if shape pruning was performed.

Definition at line 213 of file ShapeInput.h.

## getShapeVolume() [1/2]

double RDKit::GaussianShape::ShapeInput::getShapeVolume | ( |  | ) | const

inline

Get the volume of the atoms in the current active shape.

Definition at line 215 of file ShapeInput.h.

## getShapeVolume() [2/2]

double RDKit::GaussianShape::ShapeInput::getShapeVolume | ( | unsigned int | shapeNum | ) | const

Get the volume for the atoms for the given shape number.

## getSmiles()

const std::string RDKit::GaussianShape::ShapeInput::getSmiles | ( |  | ) | const

inline

Definition at line 178 of file ShapeInput.h.

## maxPossibleSimilarity()

double RDKit::GaussianShape::ShapeInput::maxPossibleSimilarity | ( | const ShapeInput & | fitShape,
|  | const ShapeOverlayOptions & | overlayOpts = ShapeOverlayOptions() ) const

Return the maximum similarity achievable between the 2 shapes. The maximum similarity is when one shape is entirely inside the other. This returns the similarity in that case, which is the upper bound on what is achievable between these 2 shapes.

References ShapeInput().

## merge()

void RDKit::GaussianShape::ShapeInput::merge | ( | ShapeInput && | other | ) |

Merge the other ShapeInput, assuming it has the correct number of atoms etc. Empties other, unless they can't be merged in which case it returns unscathed. The merge can only be done if other has the same

References ShapeInput().

## negateAlpha()

void RDKit::GaussianShape::ShapeInput::negateAlpha | ( | unsigned int | alphaNum | ) |

Multiply the alpha value for the given atom/feature by -1.0 which will toggle whether the atom/feature is used in the volume calculation or not. For temporarily "turning off" an atom or feature.

## normalizeCoords()

void RDKit::GaussianShape::ShapeInput::normalizeCoords | ( |  | ) |

Align the principal axes to the cartesian axes and centre on the origin for the current active shape. Doesn't require that the shape was created from a molecule. Creates the necessary transformation if not already done.

## operator=() [1/2]

ShapeInput & RDKit::GaussianShape::ShapeInput::operator= | ( | const ShapeInput & | other | ) |

References ShapeInput().

## operator=() [2/2]

ShapeInput & RDKit::GaussianShape::ShapeInput::operator= | ( | ShapeInput && | other | ) |

default

References ShapeInput().

## pruneShapes()

void RDKit::GaussianShape::ShapeInput::pruneShapes | ( | double | simThreshold | ) |

Prune the shapes so none a more similar to each other than the threshold.

## setActiveShape()

void RDKit::GaussianShape::ShapeInput::setActiveShape | ( | unsigned int | newShape | ) |

Set the currently active conformation to the new value.

Parameters

  newShape | the number of the conformation to be used for future calculations. Counts from 0, obviously. If invalid, throws a runtime error.

## shapeToMol()

std::unique_ptr< RWMol > RDKit::GaussianShape::ShapeInput::shapeToMol | ( | bool | includeColors = false,
|  | bool | withBonds = true ) const

Make a molecule from the current active shape. If required, features are added as xenon atoms. If withBonds is false, just makes a molecule from the atoms, otherwise builds a full molecule.

## toString()

std::string RDKit::GaussianShape::ShapeInput::toString | ( |  | ) | const

inline

Definition at line 167 of file ShapeInput.h.

References PRECONDITION.

## transformCoords()

void RDKit::GaussianShape::ShapeInput::transformCoords | ( | RDGeom::Transform3D & | xform | ) |

Applies the given transformation to the current active shape.

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

- ShapeInput.h