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

Functions

RDKIT_SHAPEHELPERS_EXPORT void EncodeShape (const ROMol &mol, RDGeom::UniformGrid3D &grid, int confId=-1, const RDGeom::Transform3D *trans=nullptr, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true)
 Encode the shape of a molecule on to a grid.
 
RDKIT_SHAPEHELPERS_EXPORT void EncodeShape (const Conformer &conf, RDGeom::UniformGrid3D &grid, const RDGeom::Transform3D *trans=nullptr, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true)
 Emcode the shape of a conformer on to a grid.
 
RDKIT_SHAPEHELPERS_EXPORT void computeConfDimsAndOffset (const Conformer &conf, RDGeom::Point3D &dims, RDGeom::Point3D &offSet, const RDGeom::Transform3D *trans=nullptr, double padding=2.5)
 
RDKIT_SHAPEHELPERS_EXPORT void computeConfBox (const Conformer &conf, RDGeom::Point3D &leftBottom, RDGeom::Point3D &rightTop, const RDGeom::Transform3D *trans=nullptr, double padding=2.5)
 Compute the box that will fit the conformer.
 
RDKIT_SHAPEHELPERS_EXPORT void computeUnionBox (const RDGeom::Point3D &leftBottom1, const RDGeom::Point3D &rightTop1, const RDGeom::Point3D &leftBottom2, const RDGeom::Point3D &rightTop2, RDGeom::Point3D &uLeftBottom, RDGeom::Point3D &uRightTop)
 Compute the union of two boxes.
 
RDKIT_SHAPEHELPERS_EXPORT std::vector< doublegetConfDimensions (const Conformer &conf, double padding=2.5, const RDGeom::Point3D *center=nullptr, bool ignoreHs=true)
 Compute dimensions of a conformer.
 
RDKIT_SHAPEHELPERS_EXPORT double tverskyIndex (const ROMol &mol1, const ROMol &mol2, double alpha, double beta, int confId1=-1, int confId2=-1, double gridSpacing=0.5, DiscreteValueVect::DiscreteValueType bitsPerPoint=DiscreteValueVect::TWOBITVALUE, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true)
 
RDKIT_SHAPEHELPERS_EXPORT double tverskyIndex (const Conformer &conf1, const Conformer &conf2, double alpha, double beta, double gridSpacing=0.5, DiscreteValueVect::DiscreteValueType bitsPerPoint=DiscreteValueVect::TWOBITVALUE, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true)
 
RDKIT_SHAPEHELPERS_EXPORT double tanimotoDistance (const ROMol &mol1, const ROMol &mol2, int confId1=-1, int confId2=-1, double gridSpacing=0.5, DiscreteValueVect::DiscreteValueType bitsPerPoint=DiscreteValueVect::TWOBITVALUE, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true)
 
RDKIT_SHAPEHELPERS_EXPORT double tanimotoDistance (const Conformer &conf1, const Conformer &conf2, double gridSpacing=0.5, DiscreteValueVect::DiscreteValueType bitsPerPoint=DiscreteValueVect::TWOBITVALUE, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true)
 
RDKIT_SHAPEHELPERS_EXPORT double protrudeDistance (const ROMol &mol1, const ROMol &mol2, int confId1=-1, int confId2=-1, double gridSpacing=0.5, DiscreteValueVect::DiscreteValueType bitsPerPoint=DiscreteValueVect::TWOBITVALUE, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true, bool allowReordering=true)
 
RDKIT_SHAPEHELPERS_EXPORT double protrudeDistance (const Conformer &conf1, const Conformer &conf2, double gridSpacing=0.5, DiscreteValueVect::DiscreteValueType bitsPerPoint=DiscreteValueVect::TWOBITVALUE, double vdwScale=0.8, double stepSize=0.25, int maxLayers=-1, bool ignoreHs=true, bool allowReordering=true)
 

Function Documentation

◆ computeConfBox()

RDKIT_SHAPEHELPERS_EXPORT void RDKit::MolShapes::computeConfBox ( const Conformer & conf,
RDGeom::Point3D & leftBottom,
RDGeom::Point3D & rightTop,
const RDGeom::Transform3D * trans = nullptr,
double padding = 2.5 )

Compute the box that will fit the conformer.

Parameters
confThe conformer of interest
leftBottomStorage for one extremity of the box
rightTopStorage for other extremity of the box
transOptional transformation to be applied to the atom coordinates
paddingPadding added on the sides around the conformer

◆ computeConfDimsAndOffset()

RDKIT_SHAPEHELPERS_EXPORT void RDKit::MolShapes::computeConfDimsAndOffset ( const Conformer & conf,
RDGeom::Point3D & dims,
RDGeom::Point3D & offSet,
const RDGeom::Transform3D * trans = nullptr,
double padding = 2.5 )

Compute the size of the box that can fit the conformation, and offset of the box from the origin

◆ computeUnionBox()

RDKIT_SHAPEHELPERS_EXPORT void RDKit::MolShapes::computeUnionBox ( const RDGeom::Point3D & leftBottom1,
const RDGeom::Point3D & rightTop1,
const RDGeom::Point3D & leftBottom2,
const RDGeom::Point3D & rightTop2,
RDGeom::Point3D & uLeftBottom,
RDGeom::Point3D & uRightTop )

Compute the union of two boxes.

◆ EncodeShape() [1/2]

RDKIT_SHAPEHELPERS_EXPORT void RDKit::MolShapes::EncodeShape ( const Conformer & conf,
RDGeom::UniformGrid3D & grid,
const RDGeom::Transform3D * trans = nullptr,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true )

Emcode the shape of a conformer on to a grid.

Parameters
confThe conformer of interest
gridGrid onto which the molecule is encoded
transOptional 3D transform to be applied to this conformation
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the layers outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process

◆ EncodeShape() [2/2]

RDKIT_SHAPEHELPERS_EXPORT void RDKit::MolShapes::EncodeShape ( const ROMol & mol,
RDGeom::UniformGrid3D & grid,
int confId = -1,
const RDGeom::Transform3D * trans = nullptr,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true )

Encode the shape of a molecule on to a grid.

Parameters
molThe molecule of interest
gridGrid onto which the molecule is encoded
confIdId of the conformation on the molecule to be encoded
transOptional 3D transform to be applied to this conformation
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the layers outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process

◆ getConfDimensions()

RDKIT_SHAPEHELPERS_EXPORT std::vector< double > RDKit::MolShapes::getConfDimensions ( const Conformer & conf,
double padding = 2.5,
const RDGeom::Point3D * center = nullptr,
bool ignoreHs = true )

Compute dimensions of a conformer.

Parameters
confConformer of interest
paddingPadding added to the atom coordinates on all sides
centerOptionally specify the center
ignoreHsif true, ignore the hydrogen atoms in computing the centroid

◆ protrudeDistance() [1/2]

RDKIT_SHAPEHELPERS_EXPORT double RDKit::MolShapes::protrudeDistance ( const Conformer & conf1,
const Conformer & conf2,
double gridSpacing = 0.5,
DiscreteValueVect::DiscreteValueType bitsPerPoint = DiscreteValueVect::TWOBITVALUE,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true,
bool allowReordering = true )

Compute the shape protrusion distance between two conformers based on a predefined alignment

Parameters
conf1The first conformer of interest
conf2The second conformer of interest
gridSpacingresolution of the grid used to encode the molecular shapes
bitsPerPointnumber of bit used to encode the occupancy at each grid point
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the each layer outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process
allowReorderingif set the order will be automatically updated so that the value calculated is the protrusion of the smaller shape from the larger one.

◆ protrudeDistance() [2/2]

RDKIT_SHAPEHELPERS_EXPORT double RDKit::MolShapes::protrudeDistance ( const ROMol & mol1,
const ROMol & mol2,
int confId1 = -1,
int confId2 = -1,
double gridSpacing = 0.5,
DiscreteValueVect::DiscreteValueType bitsPerPoint = DiscreteValueVect::TWOBITVALUE,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true,
bool allowReordering = true )

Compute the shape protrusion distance between two molecule based on a predefined alignment

Parameters
mol1The first molecule of interest
mol2The second molecule of interest
confId1Conformer in the first molecule (defaults to first conformer)
confId2Conformer in the second molecule (defaults to first conformer)
gridSpacingresolution of the grid used to encode the molecular shapes
bitsPerPointnumber of bit used to encode the occupancy at each grid point defaults to two bits per grid point
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the each layer outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process
allowReorderingif set the order will be automatically updated so that the value calculated is the protrusion of the smaller shape from the larger one.

◆ tanimotoDistance() [1/2]

RDKIT_SHAPEHELPERS_EXPORT double RDKit::MolShapes::tanimotoDistance ( const Conformer & conf1,
const Conformer & conf2,
double gridSpacing = 0.5,
DiscreteValueVect::DiscreteValueType bitsPerPoint = DiscreteValueVect::TWOBITVALUE,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true )

Compute the shape tanimoto distance between two conformers based on a predefined alignment

Parameters
conf1The first conformer of interest
conf2The second conformer of interest
gridSpacingresolution of the grid used to encode the molecular shapes
bitsPerPointnumber of bit used to encode the occupancy at each grid point
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the each layer outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process

◆ tanimotoDistance() [2/2]

RDKIT_SHAPEHELPERS_EXPORT double RDKit::MolShapes::tanimotoDistance ( const ROMol & mol1,
const ROMol & mol2,
int confId1 = -1,
int confId2 = -1,
double gridSpacing = 0.5,
DiscreteValueVect::DiscreteValueType bitsPerPoint = DiscreteValueVect::TWOBITVALUE,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true )

Compute the shape tanimoto distance between two molecule based on a predefined alignment

Parameters
mol1The first molecule of interest
mol2The second molecule of interest
confId1Conformer in the first molecule (defaults to first conformer)
confId2Conformer in the second molecule (defaults to first conformer)
gridSpacingresolution of the grid used to encode the molecular shapes
bitsPerPointnumber of bit used to encode the occupancy at each grid point defaults to two bits per grid point
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the each layer outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process

◆ tverskyIndex() [1/2]

RDKIT_SHAPEHELPERS_EXPORT double RDKit::MolShapes::tverskyIndex ( const Conformer & conf1,
const Conformer & conf2,
double alpha,
double beta,
double gridSpacing = 0.5,
DiscreteValueVect::DiscreteValueType bitsPerPoint = DiscreteValueVect::TWOBITVALUE,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true )

Compute the shape tversky index between two conformers based on a predefined alignment

Parameters
conf1The first conformer of interest
conf2The second conformer of interest
alpha
beta
gridSpacingresolution of the grid used to encode the molecular shapes
bitsPerPointnumber of bit used to encode the occupancy at each grid point
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the each layer outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process

◆ tverskyIndex() [2/2]

RDKIT_SHAPEHELPERS_EXPORT double RDKit::MolShapes::tverskyIndex ( const ROMol & mol1,
const ROMol & mol2,
double alpha,
double beta,
int confId1 = -1,
int confId2 = -1,
double gridSpacing = 0.5,
DiscreteValueVect::DiscreteValueType bitsPerPoint = DiscreteValueVect::TWOBITVALUE,
double vdwScale = 0.8,
double stepSize = 0.25,
int maxLayers = -1,
bool ignoreHs = true )

Compute the shape tversky index between two molecule based on a predefined alignment

Parameters
mol1The first molecule of interest
mol2The second molecule of interest
alpha
beta
confId1Conformer in the first molecule (defaults to first conformer)
confId2Conformer in the second molecule (defaults to first conformer)
gridSpacingresolution of the grid used to encode the molecular shapes
bitsPerPointnumber of bit used to encode the occupancy at each grid point defaults to two bits per grid point
vdwScaleScaling factor for the radius of the atoms to determine the base radius used in the encoding - grid points inside this sphere carry the maximum occupancy
stepSizethickness of the each layer outside the base radius, the occupancy value is decreased from layer to layer from the maximum value
maxLayersthe maximum number of layers - defaults to the number allowed the number of bits use per grid point - e.g. two bits per grid point will allow 3 layers
ignoreHsif true, ignore the hydrogen atoms in the shape encoding process