RDKit
Open-source cheminformatics and machine learning.
RDKit::MolAlign Namespace Reference

Classes

class  LAP
 
class  MolAlignException
 
class  MolHistogram
 
class  O3A
 
class  O3AConstraint
 
class  O3AConstraintVect
 
struct  O3AFuncData
 
class  SDM
 

Typedefs

typedef struct RDKit::MolAlign::O3AFuncData O3AFuncData
 

Enumerations

enum  { O3_USE_MMFF_WEIGHTS = (1 << 0), O3_ACCURACY_MASK = (1 << 0 | 1 << 1), O3_LOCAL_ONLY = (1 << 2) }
 

Functions

double getAlignmentTransform (const ROMol &prbMol, const ROMol &refMol, RDGeom::Transform3D &trans, int prbCid=-1, int refCid=-1, const MatchVectType *atomMap=0, const RDNumeric::DoubleVector *weights=0, bool reflect=false, unsigned int maxIters=50)
 Alignment functions. More...
 
double alignMol (ROMol &prbMol, const ROMol &refMol, int prbCid=-1, int refCid=-1, const MatchVectType *atomMap=0, const RDNumeric::DoubleVector *weights=0, bool reflect=false, unsigned int maxIters=50)
 Optimally (minimum RMSD) align a molecule to another molecule. More...
 
void alignMolConformers (ROMol &mol, const std::vector< unsigned int > *atomIds=0, const std::vector< unsigned int > *confIds=0, const RDNumeric::DoubleVector *weights=0, bool reflect=false, unsigned int maxIters=50, std::vector< double > *RMSlist=0)
 Align the conformations of a molecule using a common set of atoms. If. More...
 
bool isDoubleZero (const double x)
 
void randomTransform (ROMol &mol, const int cid=-1, const int seed=-1)
 
const RDGeom::POINT3D_VECTreflect (const Conformer &conf)
 
int o3aMMFFCostFunc (const unsigned int prbIdx, const unsigned int refIdx, double hSum, void *data)
 
double o3aMMFFWeightFunc (const unsigned int prbIdx, const unsigned int refIdx, void *data)
 
double o3aMMFFScoringFunc (const unsigned int prbIdx, const unsigned int refIdx, void *data)
 
int o3aCrippenCostFunc (const unsigned int prbIdx, const unsigned int refIdx, double hSum, void *data)
 
double o3aCrippenWeightFunc (const unsigned int prbIdx, const unsigned int refIdx, void *data)
 
double o3aCrippenScoringFunc (const unsigned int prbIdx, const unsigned int refIdx, void *data)
 
void getO3AForProbeConfs (ROMol &prbMol, const ROMol &refMol, void *prbProp, void *refProp, std::vector< boost::shared_ptr< O3A > > &res, int numThreads=1, O3A::AtomTypeScheme atomTypes=O3A::MMFF94, const int refCid=-1, const bool reflect=false, const unsigned int maxIters=50, unsigned int options=0, const MatchVectType *constraintMap=NULL, const RDNumeric::DoubleVector *constraintWeights=NULL)
 

Variables

const int O3_DUMMY_COST = 100000
 
const int O3_LARGE_NEGATIVE_WEIGHT = -1e9
 
const int O3_DEFAULT_CONSTRAINT_WEIGHT = 100.0
 
const unsigned int O3_MAX_H_BINS = 20
 
const unsigned int O3_MAX_SDM_ITERATIONS = 100
 
const unsigned int O3_MAX_SDM_THRESHOLD_ITER = 3
 
const double O3_RANDOM_TRANS_COEFF = 5.0
 
const double O3_THRESHOLD_DIFF_DISTANCE = 0.1
 
const double O3_SDM_THRESHOLD_START = 0.7
 
const double O3_SDM_THRESHOLD_STEP = 0.3
 
const double O3_CHARGE_WEIGHT = 10.0
 
const double O3_CRIPPEN_WEIGHT = 10.0
 
const double O3_RMSD_THRESHOLD = 1.0e-04
 
const double O3_SCORE_THRESHOLD = 0.01
 
const double O3_SCORING_FUNCTION_ALPHA = 5.0
 
const double O3_SCORING_FUNCTION_BETA = 0.5
 
const double O3_CHARGE_COEFF = 5.0
 
const double O3_CRIPPEN_COEFF = 1.0
 
const int O3_MAX_WEIGHT_COEFF = 5
 

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator
O3_USE_MMFF_WEIGHTS 
O3_ACCURACY_MASK 
O3_LOCAL_ONLY 

Definition at line 126 of file O3AAlignMolecules.h.

Function Documentation

double RDKit::MolAlign::alignMol ( ROMol prbMol,
const ROMol refMol,
int  prbCid = -1,
int  refCid = -1,
const MatchVectType atomMap = 0,
const RDNumeric::DoubleVector weights = 0,
bool  reflect = false,
unsigned int  maxIters = 50 
)

Optimally (minimum RMSD) align a molecule to another molecule.

The 3D transformation required to align the specied conformation in the probe molecule to a specified conformation in the reference molecule is computed so that the root mean squared distance between a specified set of atoms is minimized. This transforms is them applied to the specified conformation in the probe molecule

Parameters
prbMolmolecule that is to be aligned
refMolmolecule used as the reference for the alignment
prbCidID of the conformation in the probe to be used for the alignment (defaults to first conformation)
refCidID of the conformation in the ref molecule to which the alignment is computed (defaults to first conformation)
atomMapa vector of pairs of atom IDs (probe AtomId, ref AtomId) used to compute the alignments. If this mapping is not specified an attempt is made to generate on by substructure matching
weightsOptionally specify weights for each of the atom pairs
reflectif true reflect the conformation of the probe molecule
maxItersmaximum number of iteration used in mimizing the RMSD

Returns RMSD value

Referenced by RDKit::MolAlign::MolAlignException::~MolAlignException().

void RDKit::MolAlign::alignMolConformers ( ROMol mol,
const std::vector< unsigned int > *  atomIds = 0,
const std::vector< unsigned int > *  confIds = 0,
const RDNumeric::DoubleVector weights = 0,
bool  reflect = false,
unsigned int  maxIters = 50,
std::vector< double > *  RMSlist = 0 
)

Align the conformations of a molecule using a common set of atoms. If.

Parameters
molThe molecule of interest.
atomIdsvector of atoms to be used to generate the alignment. All atoms will be used is not specified
confIdsvector of conformations to align - defaults to all
weightsvector of weights to applied to particular atom pairs defaults to all weights = 1
reflecttoggles reflecting (about the origin) the alignment
maxItersthe maximum number of iterations to attempt
RMSlistif nonzero, this will be used to return the RMS values between the reference conformation and the other aligned conformations

Referenced by RDKit::MolAlign::MolAlignException::~MolAlignException().

double RDKit::MolAlign::getAlignmentTransform ( const ROMol prbMol,
const ROMol refMol,
RDGeom::Transform3D trans,
int  prbCid = -1,
int  refCid = -1,
const MatchVectType atomMap = 0,
const RDNumeric::DoubleVector weights = 0,
bool  reflect = false,
unsigned int  maxIters = 50 
)

Alignment functions.

Compute the transformation required to align a molecule

The 3D transformation required to align the specied conformation in the probe molecule to a specified conformation in the reference molecule is computed so that the root mean squared distance between a specified set of atoms is minimized

Parameters
prbMolmolecule that is to be aligned
refMolmolecule used as the reference for the alignment
transstorage for the computed transform
prbCidID of the conformation in the probe to be used for the alignment (defaults to first conformation)
refCidID of the conformation in the ref molecule to which the alignment is computed (defaults to first conformation)
atomMapa vector of pairs of atom IDs (probe AtomId, ref AtomId) used to compute the alignments. If this mapping is not specified an attempt is made to generate on by substructure matching
weightsOptionally specify weights for each of the atom pairs
reflectif true reflect the conformation of the probe molecule
maxItersmaximum number of iteration used in mimizing the RMSD

Returns RMSD value

Referenced by RDKit::MolAlign::MolAlignException::~MolAlignException().

void RDKit::MolAlign::getO3AForProbeConfs ( ROMol prbMol,
const ROMol refMol,
void *  prbProp,
void *  refProp,
std::vector< boost::shared_ptr< O3A > > &  res,
int  numThreads = 1,
O3A::AtomTypeScheme  atomTypes = O3A::MMFF94,
const int  refCid = -1,
const bool  reflect = false,
const unsigned int  maxIters = 50,
unsigned int  options = 0,
const MatchVectType constraintMap = NULL,
const RDNumeric::DoubleVector constraintWeights = NULL 
)
bool RDKit::MolAlign::isDoubleZero ( const double  x)
inline

Definition at line 39 of file O3AAlignMolecules.h.

int RDKit::MolAlign::o3aCrippenCostFunc ( const unsigned int  prbIdx,
const unsigned int  refIdx,
double  hSum,
void *  data 
)
double RDKit::MolAlign::o3aCrippenScoringFunc ( const unsigned int  prbIdx,
const unsigned int  refIdx,
void *  data 
)
double RDKit::MolAlign::o3aCrippenWeightFunc ( const unsigned int  prbIdx,
const unsigned int  refIdx,
void *  data 
)
int RDKit::MolAlign::o3aMMFFCostFunc ( const unsigned int  prbIdx,
const unsigned int  refIdx,
double  hSum,
void *  data 
)
double RDKit::MolAlign::o3aMMFFScoringFunc ( const unsigned int  prbIdx,
const unsigned int  refIdx,
void *  data 
)
double RDKit::MolAlign::o3aMMFFWeightFunc ( const unsigned int  prbIdx,
const unsigned int  refIdx,
void *  data 
)
void RDKit::MolAlign::randomTransform ( ROMol mol,
const int  cid = -1,
const int  seed = -1 
)

Variable Documentation

const double RDKit::MolAlign::O3_CHARGE_COEFF = 5.0

Definition at line 123 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_CHARGE_WEIGHT = 10.0

Definition at line 117 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_CRIPPEN_COEFF = 1.0

Definition at line 124 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_CRIPPEN_WEIGHT = 10.0

Definition at line 118 of file O3AAlignMolecules.h.

const int RDKit::MolAlign::O3_DEFAULT_CONSTRAINT_WEIGHT = 100.0

Definition at line 109 of file O3AAlignMolecules.h.

const int RDKit::MolAlign::O3_DUMMY_COST = 100000

Definition at line 107 of file O3AAlignMolecules.h.

const int RDKit::MolAlign::O3_LARGE_NEGATIVE_WEIGHT = -1e9

Definition at line 108 of file O3AAlignMolecules.h.

const unsigned int RDKit::MolAlign::O3_MAX_H_BINS = 20

Definition at line 110 of file O3AAlignMolecules.h.

const unsigned int RDKit::MolAlign::O3_MAX_SDM_ITERATIONS = 100

Definition at line 111 of file O3AAlignMolecules.h.

const unsigned int RDKit::MolAlign::O3_MAX_SDM_THRESHOLD_ITER = 3

Definition at line 112 of file O3AAlignMolecules.h.

const int RDKit::MolAlign::O3_MAX_WEIGHT_COEFF = 5

Definition at line 125 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_RANDOM_TRANS_COEFF = 5.0

Definition at line 113 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_RMSD_THRESHOLD = 1.0e-04

Definition at line 119 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_SCORE_THRESHOLD = 0.01

Definition at line 120 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_SCORING_FUNCTION_ALPHA = 5.0

Definition at line 121 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_SCORING_FUNCTION_BETA = 0.5

Definition at line 122 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_SDM_THRESHOLD_START = 0.7

Definition at line 115 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_SDM_THRESHOLD_STEP = 0.3

Definition at line 116 of file O3AAlignMolecules.h.

const double RDKit::MolAlign::O3_THRESHOLD_DIFF_DISTANCE = 0.1

Definition at line 114 of file O3AAlignMolecules.h.