![]() |
RDKit
Open-source cheminformatics and machine learning.
|
#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) |
Definition at line 128 of file ShapeInput.h.
|
explicit |
Create the ShapeInput object.
| 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().
| RDKit::GaussianShape::ShapeInput::ShapeInput | ( | const ShapeInput & | other, |
| unsigned int | shapeNum ) |
Create a ShapeInput object with a single shape copied from other.
| other | the ShapeInput that supplies the shape |
| shapeNum | the number of the shape of interest. |
References ShapeInput().
|
inlineexplicit |
Definition at line 145 of file ShapeInput.h.
References PRECONDITION.
| RDKit::GaussianShape::ShapeInput::ShapeInput | ( | const ShapeInput & | other | ) |
References ShapeInput().
|
default |
References ShapeInput().
|
default |
| 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().
| const std::array< double, 9 > & RDKit::GaussianShape::ShapeInput::calcCanonicalRotation | ( | ) |
Get the canonical rotation for the current active shape.
| const std::array< double, 3 > & RDKit::GaussianShape::ShapeInput::calcCanonicalTranslation | ( | ) |
Get the canonical translation for the current active shape.
| const std::array< double, 3 > & RDKit::GaussianShape::ShapeInput::calcEigenValues | ( | ) |
Get the eigen values for the coordinates matrix.
| 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.
| 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.
|
inline |
Definition at line 179 of file ShapeInput.h.
|
inline |
Get the alpha values for the atoms and color features in the shape.
Definition at line 192 of file ShapeInput.h.
| std::vector< RDGeom::Point3D > RDKit::GaussianShape::ShapeInput::getAtomPoints | ( | bool | includeColors = false | ) | const |
Fetch the coordinates of the atoms and optionally features.
|
inline |
Get the flags for which atoms have a carbon radius.
Definition at line 227 of file ShapeInput.h.
|
inline |
Get the volume of the color features in the current active shape.
Definition at line 221 of file ShapeInput.h.
| double RDKit::GaussianShape::ShapeInput::getColorVolume | ( | unsigned int | shapeNum | ) | const |
Get the volume of the color features for the given shape number.
|
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.
|
inline |
Return the feature types of all atoms/features in the shape. Atoms have type 0.
Definition at line 205 of file ShapeInput.h.
|
inline |
Return whether the coordinates for the current active shape are normalized.
Definition at line 202 of file ShapeInput.h.
|
inline |
Get the number of atoms in the shape.
Definition at line 207 of file ShapeInput.h.
|
inline |
Get the number of color features in the shape.
Definition at line 209 of file ShapeInput.h.
|
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.
|
inline |
Get the volume of the atoms in the current active shape.
Definition at line 215 of file ShapeInput.h.
| double RDKit::GaussianShape::ShapeInput::getShapeVolume | ( | unsigned int | shapeNum | ) | const |
Get the volume for the atoms for the given shape number.
|
inline |
Definition at line 178 of file ShapeInput.h.
| 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().
| 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().
| 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.
| 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.
| ShapeInput & RDKit::GaussianShape::ShapeInput::operator= | ( | const ShapeInput & | other | ) |
References ShapeInput().
|
default |
References ShapeInput().
| void RDKit::GaussianShape::ShapeInput::pruneShapes | ( | double | simThreshold | ) |
Prune the shapes so none a more similar to each other than the threshold.
| void RDKit::GaussianShape::ShapeInput::setActiveShape | ( | unsigned int | newShape | ) |
Set the currently active conformation to the new value.
| newShape | the number of the conformation to be used for future calculations. Counts from 0, obviously. If invalid, throws a runtime error. |
| 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.
|
inline |
Definition at line 167 of file ShapeInput.h.
References PRECONDITION.
| void RDKit::GaussianShape::ShapeInput::transformCoords | ( | RDGeom::Transform3D & | xform | ) |
Applies the given transformation to the current active shape.