RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::GaussianShape Namespace Reference

Classes

struct  CustomFeature
 
class  ShapeInput
 
struct  ShapeInputOptions
 
struct  ShapeOverlayOptions
 
struct  SingleConformerAlignment
 

Functions

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > AlignShape (const ShapeInput &refShape, ShapeInput &fitShape, RDGeom::Transform3D *xform=nullptr, const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions())
 Align a shape onto a reference shape.
 
RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > AlignMolecule (const ShapeInput &refShape, ROMol &fit, const ShapeInputOptions &fitOpts=ShapeInputOptions(), RDGeom::Transform3D *xform=nullptr, const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions(), int fitConfId=-1)
 Align a molecule to a reference shape.
 
RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > AlignMolecule (const ROMol &ref, ROMol &fit, const ShapeInputOptions &refOpts=ShapeInputOptions(), const ShapeInputOptions &fitOpts=ShapeInputOptions(), RDGeom::Transform3D *xform=nullptr, const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions(), int refConfId=-1, int fitConfId=-1)
 Align a molecule to a reference molecule.
 
RDKIT_GAUSSIANSHAPE_EXPORT void ScoreMoleculeAllConformers (const ROMol &ref, const ROMol &fit, int &refConfId, int &fitConfId, std::vector< std::vector< double > > &combScores, const ShapeInputOptions &refOpts=ShapeInputOptions(), const ShapeInputOptions &fitOpts=ShapeInputOptions(), const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions(), RDGeom::Transform3D *xform=nullptr)
 
RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > ScoreShape (const ShapeInput &refShape, const ShapeInput &fitShape, const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions(), std::pair< double, double > *overlapVols=nullptr)
 Score the overlap of a shape to a reference shape without moving.
 
RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > ScoreMolecule (const ShapeInput &refShape, const ROMol &fit, const ShapeInputOptions &fitOpts=ShapeInputOptions(), const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions(), int fitConfId=-1, std::pair< double, double > *overlapVols=nullptr)
 Score the overlap of a molecule to a reference shape without moving.
 
RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > ScoreMolecule (const ROMol &ref, const ROMol &fit, const ShapeInputOptions &refOpts=ShapeInputOptions(), const ShapeInputOptions &fitOpts=ShapeInputOptions(), const ShapeOverlayOptions &overlayOpts=ShapeOverlayOptions(), int refConfId=-1, int fitConfId=-1, std::pair< double, double > *overlapVols=nullptr)
 Score the overlap of a molecule to a reference molecule without moving.
 
RDKIT_GAUSSIANSHAPE_EXPORT void findFeatures (const Conformer &conf, std::vector< CustomFeature > &features, const std::optional< std::vector< unsigned int > > &atomSubset=std::nullopt)
 
RDKIT_GAUSSIANSHAPE_EXPORT RDGeom::Point3D computeFeaturePos (const Conformer &conf, const std::vector< unsigned int > &ats)
 
RDKIT_GAUSSIANSHAPE_EXPORT RDGeom::Transform3D quatTransToTransform (const double *quat, const double *trans)
 
RDKIT_GAUSSIANSHAPE_EXPORT void applyTransformToShape (std::vector< double > &shape, const RDGeom::Transform3D &xform)
 
RDKIT_GAUSSIANSHAPE_EXPORT void applyTransformToShape (const double *inShape, double *outShape, size_t numPoints, const RDGeom::Transform3D &xform)
 
RDKIT_GAUSSIANSHAPE_EXPORT void translateShape (std::vector< double > &shape, const RDGeom::Point3D &translation)
 
RDKIT_GAUSSIANSHAPE_EXPORT void translateShape (const double *inShape, double *outShape, size_t numPoints, const RDGeom::Point3D &translation)
 
RDKIT_GAUSSIANSHAPE_EXPORT double maxScore (double v1, double v2, double c1, double c2, const ShapeOverlayOptions &overlayOpts)
 
std::ostream & operator<< (std::ostream &os, const StartMode &sm)
 
RDKIT_GAUSSIANSHAPE_EXPORT double calcVolAndGrads (const double *ref, const double *refAlphas, int numRefPts, const boost::dynamic_bitset<> *refCarbonRadii, const double *fit, const double *fitAlphas, int numFitPts, const boost::dynamic_bitset<> *fitCarbonRadii, std::vector< double > &gradConverters, const bool useCutoff, const double distCutoff2, const double *quat=nullptr, double *gradients=nullptr)
 
RDKIT_GAUSSIANSHAPE_EXPORT double calcVolAndGrads (const double *ref, const double *refAlphas, int numRefPts, const int *refTypes, const double *fit, const double *fitAlphas, int numFitPts, const int *fitTypes, int numFitShape, std::vector< double > &gradConverters, const bool useCutoff, const double distCutoff2, const double *quat, double *gradients)
 

Variables

constexpr double CARBON_RAD = 1.70
 
constexpr double DUMMY_RAD = 2.16
 
constexpr double P = 2.7
 
constexpr double KAPPA = 2.41798793102
 

Function Documentation

◆ AlignMolecule() [1/2]

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > RDKit::GaussianShape::AlignMolecule ( const ROMol & ref,
ROMol & fit,
const ShapeInputOptions & refOpts = ShapeInputOptions(),
const ShapeInputOptions & fitOpts = ShapeInputOptions(),
RDGeom::Transform3D * xform = nullptr,
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions(),
int refConfId = -1,
int fitConfId = -1 )

Align a molecule to a reference molecule.

Parameters
refthe reference molecule
fitthe molecule to align
refOptsthe options for creating the ref shape
fitOptsthe options for creating the fit shape
xformif passed in as non-null, will be populated with the transformation matrix that aligns fit onto ref.
overlayOptsoptions for setting up and running the overlay
refConfId(optional) the conformer to use for the reference molecule
fitConfId(optional) the conformer to use for the fit molecule
Returns
an array of the combination score of the shape Tversky value and the color Tversky value (zero if colors not used) and the individual values. If using color features, defaults to RDKit pharmacophore types for the features.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ AlignMolecule() [2/2]

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > RDKit::GaussianShape::AlignMolecule ( const ShapeInput & refShape,
ROMol & fit,
const ShapeInputOptions & fitOpts = ShapeInputOptions(),
RDGeom::Transform3D * xform = nullptr,
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions(),
int fitConfId = -1 )

Align a molecule to a reference shape.

Parameters
refShapethe reference shape
fitthe molecule to align
fitOptsthe options for creating the fit shape
xformif passed in as non-null, will be populated with the transformation matrix that aligns fit onto ref.
overlayOptsoptions for setting up and running the overlay
fitConfId(optional) the conformer to use for the fit molecule
Returns
an array of the combination score of the shape Tversky value and the color Tversky value (zero if colors not used) and the individual values. If using color features, defaults to RDKit pharmacophore types for the features.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ AlignShape()

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > RDKit::GaussianShape::AlignShape ( const ShapeInput & refShape,
ShapeInput & fitShape,
RDGeom::Transform3D * xform = nullptr,
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions() )

Align a shape onto a reference shape.

Parameters
refShapethe reference shape
fitShapethe shape to align
xformif passed in as non-null, will be populated with the transformation matrix that aligns fit onto ref.
overlayOptsoptions for the overlay
Returns
an array of the combination score of the shape Tversky value and the color Tversky value (zero if colors not used) and the individual values. If using color features, defaults to RDKit pharmacophore types for the features.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ applyTransformToShape() [1/2]

RDKIT_GAUSSIANSHAPE_EXPORT void RDKit::GaussianShape::applyTransformToShape ( const double * inShape,
double * outShape,
size_t numPoints,
const RDGeom::Transform3D & xform )

◆ applyTransformToShape() [2/2]

RDKIT_GAUSSIANSHAPE_EXPORT void RDKit::GaussianShape::applyTransformToShape ( std::vector< double > & shape,
const RDGeom::Transform3D & xform )

◆ calcVolAndGrads() [1/2]

RDKIT_GAUSSIANSHAPE_EXPORT double RDKit::GaussianShape::calcVolAndGrads ( const double * ref,
const double * refAlphas,
int numRefPts,
const boost::dynamic_bitset<> * refCarbonRadii,
const double * fit,
const double * fitAlphas,
int numFitPts,
const boost::dynamic_bitset<> * fitCarbonRadii,
std::vector< double > & gradConverters,
const bool useCutoff,
const double distCutoff2,
const double * quat = nullptr,
double * gradients = nullptr )

◆ calcVolAndGrads() [2/2]

RDKIT_GAUSSIANSHAPE_EXPORT double RDKit::GaussianShape::calcVolAndGrads ( const double * ref,
const double * refAlphas,
int numRefPts,
const int * refTypes,
const double * fit,
const double * fitAlphas,
int numFitPts,
const int * fitTypes,
int numFitShape,
std::vector< double > & gradConverters,
const bool useCutoff,
const double distCutoff2,
const double * quat,
double * gradients )

◆ computeFeaturePos()

RDKIT_GAUSSIANSHAPE_EXPORT RDGeom::Point3D RDKit::GaussianShape::computeFeaturePos ( const Conformer & conf,
const std::vector< unsigned int > & ats )

◆ findFeatures()

RDKIT_GAUSSIANSHAPE_EXPORT void RDKit::GaussianShape::findFeatures ( const Conformer & conf,
std::vector< CustomFeature > & features,
const std::optional< std::vector< unsigned int > > & atomSubset = std::nullopt )

◆ maxScore()

RDKIT_GAUSSIANSHAPE_EXPORT double RDKit::GaussianShape::maxScore ( double v1,
double v2,
double c1,
double c2,
const ShapeOverlayOptions & overlayOpts )

◆ operator<<()

std::ostream & RDKit::GaussianShape::operator<< ( std::ostream & os,
const StartMode & sm )
inline

Definition at line 86 of file ShapeOverlayOptions.h.

◆ quatTransToTransform()

RDKIT_GAUSSIANSHAPE_EXPORT RDGeom::Transform3D RDKit::GaussianShape::quatTransToTransform ( const double * quat,
const double * trans )

◆ ScoreMolecule() [1/2]

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > RDKit::GaussianShape::ScoreMolecule ( const ROMol & ref,
const ROMol & fit,
const ShapeInputOptions & refOpts = ShapeInputOptions(),
const ShapeInputOptions & fitOpts = ShapeInputOptions(),
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions(),
int refConfId = -1,
int fitConfId = -1,
std::pair< double, double > * overlapVols = nullptr )

Score the overlap of a molecule to a reference molecule without moving.

Parameters
refthe reference molecule
fitthe molecule to score
refOptsthe options for creating the ref shape
fitOptsthe options for creating the fit shape
overlayOptsoptions for controlling the volume calculation
refConfId(optional) the conformer to use for the reference molecule
fitConfId(optional) the conformer to use for the fit molecule
overlapVolsif not-null, is filled with the raw overlap volumes
Returns
an array of the combination score of the shape Tverksy value and the color Tversky value (zero if colors not used) and the individual values. If using color features, defaults to RDKit pharmacophore types for the features.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ ScoreMolecule() [2/2]

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > RDKit::GaussianShape::ScoreMolecule ( const ShapeInput & refShape,
const ROMol & fit,
const ShapeInputOptions & fitOpts = ShapeInputOptions(),
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions(),
int fitConfId = -1,
std::pair< double, double > * overlapVols = nullptr )

Score the overlap of a molecule to a reference shape without moving.

Parameters
refShapethe reference shape
fitthe molecule to score
fitOptsthe options for creating the fit shape
overlayOptsoptions for controlling the volume calculation
fitConfId(optional) the conformer to use for the fit molecule
overlapVolsif not-null, is filled with the raw overlap volumes
Returns
an array of the combination score of the shape Tversky value and the color Tversky value (zero if colors not used) and the individual values. If using color features, defaults to RDKit pharmacophore types for the features.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ ScoreMoleculeAllConformers()

RDKIT_GAUSSIANSHAPE_EXPORT void RDKit::GaussianShape::ScoreMoleculeAllConformers ( const ROMol & ref,
const ROMol & fit,
int & refConfId,
int & fitConfId,
std::vector< std::vector< double > > & combScores,
const ShapeInputOptions & refOpts = ShapeInputOptions(),
const ShapeInputOptions & fitOpts = ShapeInputOptions(),
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions(),
RDGeom::Transform3D * xform = nullptr )

Calculate scores for the alignment of all conformers of one molecule onto another. Returns a matrix of the combination scores, the conformer numbers of the two molecules that gave the best overlay and the transformation matrix for that overlay if requested. The molecules themselves are not altered. scores[0][1] is the score of aligning fit conformer 1 onto ref conformer 0

Parameters
refthe reference molecule
fitthe molecule to align
refConfIdreturns the reference conformer for the best scoring overlay
fitConfIdreturns the fit conformer for the best scoring overlay
combScoresthe scores for all the overlays. Will be returned sized by the number of conformers of the ref and fit molecules. combScores[i][j] will be the score for the jth fit conformer onto the ith ref conformer.
refOptsthe options for creating the ref shape
fitOptsthe options for creating the fit shape
overlayOptsoptions for setting up and running the overlay
xformif passed in as non-null, will be populated with the transformation matrix that gives the best-scoring overlay.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ ScoreShape()

RDKIT_GAUSSIANSHAPE_EXPORT std::array< double, 3 > RDKit::GaussianShape::ScoreShape ( const ShapeInput & refShape,
const ShapeInput & fitShape,
const ShapeOverlayOptions & overlayOpts = ShapeOverlayOptions(),
std::pair< double, double > * overlapVols = nullptr )

Score the overlap of a shape to a reference shape without moving.

Parameters
refShapethe reference shape
fitShapethe shape to score
overlayOptsoptions for controlling the volume calculation
overlapVolsif not-null, is filled with the raw overlap volumes
Returns
an array of the combination score of the shape Tversky value and the color Tversky value (zero if colors not used) and the individual values. If using color features, defaults to RDKit pharmacophore types for the features.

References RDKIT_GAUSSIANSHAPE_EXPORT.

◆ translateShape() [1/2]

RDKIT_GAUSSIANSHAPE_EXPORT void RDKit::GaussianShape::translateShape ( const double * inShape,
double * outShape,
size_t numPoints,
const RDGeom::Point3D & translation )

◆ translateShape() [2/2]

RDKIT_GAUSSIANSHAPE_EXPORT void RDKit::GaussianShape::translateShape ( std::vector< double > & shape,
const RDGeom::Point3D & translation )

Variable Documentation

◆ CARBON_RAD

double RDKit::GaussianShape::CARBON_RAD = 1.70
constexpr

Definition at line 71 of file ShapeInput.h.

◆ DUMMY_RAD

double RDKit::GaussianShape::DUMMY_RAD = 2.16
constexpr

Definition at line 72 of file ShapeInput.h.

◆ KAPPA

double RDKit::GaussianShape::KAPPA = 2.41798793102
constexpr

Definition at line 75 of file ShapeInput.h.

◆ P

double RDKit::GaussianShape::P = 2.7
constexpr

Definition at line 74 of file ShapeInput.h.