MTK++ Latest version: 0.2.0

Public Member Functions | Protected Member Functions | Protected Attributes
MTKpp::superimpose Class Reference

Functions to align molecules. More...

#include <mtkpp/src/Molecule/superimpose.h>

Collaboration diagram for MTKpp::superimpose:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 superimpose ()
 superimpose Constructor
 superimpose (int i)
 superimpose Constructor
virtual ~superimpose ()
 superimpose Destructor.
double fit (molecule *pMoleculeA, molecule *pMoleculeB)
 Superimposes molecule B onto molecule A and reports an rmsd.
double fit (double coordsA[][3], double coordsB[][3], int n)
 Superimposes coordinates B onto coordinates A and reports an rmsd.
int fit (molecule *pMoleculeA, molecule *pMoleculeB, std::vector< int > cor, int type)
 Superimposes molecule B onto molecule A using a correspondence vector.
double rmsd (molecule *pMoleculeA, molecule *pMoleculeB)
 Computes the rmsd between molecule A and molecule B however does not transform the coordinates after the fit.
double rmsd (molecule *pMoleculeA, molecule *pMoleculeB, std::vector< std::vector< int > > &correspondenceMatrices)
 Computes the lowest rmsd between molecule A and molecule B using the correspondence matrices and does not transform the coordinates after the fit.
double rmsd (molecule *pMoleculeA, std::vector< vector3d > &molBCoords, std::vector< std::vector< int > > &correspondenceMatrices, int &cor)
 Computes the lowest rmsd between molecule A and molecule B using the correspondence matrices and does not transform the coordinates after the fit.
double rmsdNoFit (molecule *pMoleculeA, std::vector< vector3d > &molBCoords, std::vector< std::vector< int > > &correspondenceMatrices)
 Computes the lowest rmsd between molecule A and molecule B using the correspondence matrices.
void getRotationMatrix (double centerA[3], double centerB[3], double rotMat[][3])
 Get Rotation matrix and centers of A and B.
int getRotationMatrix (double coordsA[][3], double coordsB[][3], int n, double rotMat[][3])
 Get Rotation matrix which superimpose B onto A.
int getRotationMatrix (double coordsA[][3], double coordsB[][3], double centerA[3], double centerB[3], int n, double rotMat[][3])
 Get Rotation matrix which superimpose B onto A.
double calculateRMSD (double coordsA[][3], double coordsB[][3])
 Calculate rmsd between two sets of coordinates.
double minRMSD (molecule *pMoleculeA, molecule *pMoleculeB, int type, int &nFittedAtoms)
 Calculate rmsd between two sets of coordinates.
int initializeCorrespondences (molecule *pMol, int type, std::vector< std::vector< int > > &correspondenceMatrices)
 Initialize the correspondences between the atoms in a molecule.
int initializeCorrespondences (molecule *pMolB, molecule *pMolA, int type, std::vector< std::vector< int > > &correspondenceMatrices)
void center (double coords[][3], double center[3])
 Calculate the center of mass.
void updateCoords (double coords[][3], int n, double c1[3], double c2[3], double rotMat[][3])
 Update coordinates.

Protected Member Functions

void coordinateDiff (double coordsA[][3], double coordsB[][3], double itsDXM[][3], double itsDXP[][3])
void buildQuaternion (Eigen::MatrixXd &quaternion, double itsDXM[][3], double itsDXP[][3])
 Constructs the quaternion matrix.
void buildRotation (double t[][3], Eigen::MatrixXd eigenvectors)
 Builds rotation matrix, t, from the decomposed Quaternion matrix.

Protected Attributes

moleculepMoleculeA
 molecule pointer
moleculepMoleculeB
 molecule pointer
int nAtoms
 Number of atoms.
double centerA [3]
 Center of mass, MoleculeA.
double centerB [3]
 Center of mass, MoleculeB.
double rotMat [3][3]
 Rotation matrix.
double dRMSD
 Root mean squared deviation.
int * genMatchMatrix
 match matrix
int correspondenceType
int nHeavyAtomsA
 Number of Heavy Atoms.
int * heavyAtomIndicesA
 Heavy Atom indices.
int nHeavyAtomsB
 Number of Heavy Atoms.
int * heavyAtomIndicesB
 Heavy Atom indices.

Detailed Description

Functions to align molecules.

Author:
Martin Peters
Date:
2006

Constructor & Destructor Documentation

MTKpp::superimpose::superimpose ( )

superimpose Constructor

MTKpp::superimpose::superimpose ( int  i)

superimpose Constructor

Parameters:
inumber of atoms
MTKpp::superimpose::~superimpose ( ) [virtual]

superimpose Destructor.


Member Function Documentation

double MTKpp::superimpose::fit ( molecule pMoleculeA,
molecule pMoleculeB 
)

Superimposes molecule B onto molecule A and reports an rmsd.

Parameters:
pMoleculeAFixed molecule
pMoleculeBMolecule to be moved
Returns:
rmsd value

References MTKpp::molecule::getAtomList(), MTKpp::molecule::getCoordinates(), and MTKpp::molecule::getNumAtoms().

Referenced by main().

double MTKpp::superimpose::fit ( double  coordsA[][3],
double  coordsB[][3],
int  n 
)

Superimposes coordinates B onto coordinates A and reports an rmsd.

Parameters:
coordsAFixed coordinates
coordsBCoordinates to be moved
nNumber of coordinates
Returns:
rmsd value

References MTKpp::eigenValueSort().

int MTKpp::superimpose::fit ( molecule pMoleculeA,
molecule pMoleculeB,
std::vector< int >  cor,
int  type 
)

Superimposes molecule B onto molecule A using a correspondence vector.

Parameters:
pMoleculeAMolecule A
pMoleculeBMolecule B
corcorrespondence
typeof matching
  • 0 match based on atom type
  • 1 match based on atom symbol
  • 2 match based on heavy atom type
  • 3 match based on heavy atom symbol
Returns:
success

References MTKpp::eigenValueSort(), MTKpp::molecule::getAtomList(), MTKpp::molecule::getCoordinates(), MTKpp::molecule::getHeavyAtomIndices(), MTKpp::molecule::getNumAtoms(), and MTKpp::molecule::getNumHeavyAtoms().

double MTKpp::superimpose::rmsd ( molecule pMoleculeA,
molecule pMoleculeB 
)

Computes the rmsd between molecule A and molecule B however does not transform the coordinates after the fit.

Parameters:
pMoleculeAFixed molecule
pMoleculeBMolecule to be moved
Returns:
rmsd value

References MTKpp::molecule::getCoordinates(), and MTKpp::molecule::getNumAtoms().

Referenced by MTKpp::collection::assignMetalParameters(), and main().

double MTKpp::superimpose::rmsd ( molecule pMoleculeA,
molecule pMoleculeB,
std::vector< std::vector< int > > &  correspondenceMatrices 
)

Computes the lowest rmsd between molecule A and molecule B using the correspondence matrices and does not transform the coordinates after the fit.

Parameters:
pMoleculeAFixed molecule
pMoleculeBMolecule to be moved
correspondenceMatricesCorrespondence Matrices
Returns:
rmsd value

References MTKpp::BIGNUM.

double MTKpp::superimpose::rmsd ( molecule pMoleculeA,
std::vector< vector3d > &  molBCoords,
std::vector< std::vector< int > > &  correspondenceMatrices,
int &  cor 
)

Computes the lowest rmsd between molecule A and molecule B using the correspondence matrices and does not transform the coordinates after the fit.

Parameters:
pMoleculeAFixed molecule
molBCoordsMolecule to be moved coordinates
correspondenceMatricesCorrespondence Matrices
corfinal correspondence
Returns:
rmsd value

References MTKpp::BIGNUM, MTKpp::molecule::getCoordinates(), and MTKpp::molecule::getNumAtoms().

double MTKpp::superimpose::rmsdNoFit ( molecule pMoleculeA,
std::vector< vector3d > &  molBCoords,
std::vector< std::vector< int > > &  correspondenceMatrices 
)

Computes the lowest rmsd between molecule A and molecule B using the correspondence matrices.

Parameters:
pMoleculeAFixed molecule
molBCoordsMolecule to be moved coordinates
correspondenceMatricesCorrespondence Matrices
Returns:
rmsd value

References MTKpp::BIGNUM, and MTKpp::molecule::getCoordinates().

Referenced by main().

void MTKpp::superimpose::getRotationMatrix ( double  centerA[3],
double  centerB[3],
double  rotMat[][3] 
)

Get Rotation matrix and centers of A and B.

Parameters:
centerACenter of A
centerBCenter of B
rotMatRotation Matrix

Referenced by main().

int MTKpp::superimpose::getRotationMatrix ( double  coordsA[][3],
double  coordsB[][3],
int  n,
double  rotMat[][3] 
)

Get Rotation matrix which superimpose B onto A.

Parameters:
coordsAFixed coordinates
coordsBCoordinates to be moved
nNumber of coordinates
rotMatRotation Matrix
Returns:
success

References MTKpp::eigenValueSort().

int MTKpp::superimpose::getRotationMatrix ( double  coordsA[][3],
double  coordsB[][3],
double  centerA[3],
double  centerB[3],
int  n,
double  rotMat[][3] 
)

Get Rotation matrix which superimpose B onto A.

Parameters:
coordsAFixed coordinates
coordsBCoordinates to be moved
centerAcenter of B
centerBcenter of A
nNumber of coordinates
rotMatRotation Matrix
Returns:
success

References MTKpp::eigenValueSort().

double MTKpp::superimpose::calculateRMSD ( double  coordsA[][3],
double  coordsB[][3] 
)

Calculate rmsd between two sets of coordinates.

Parameters:
coordsACoordinate set A
coordsBCoordinate set B
Returns:
rmsd between coordsA and coordsB

Referenced by main().

double MTKpp::superimpose::minRMSD ( molecule pMoleculeA,
molecule pMoleculeB,
int  type,
int &  nFittedAtoms 
)

Calculate rmsd between two sets of coordinates.

Parameters:
pMoleculeAmolecule A
pMoleculeBmolecule B
typeof matching -0 match based on atom type -1 match based on atom symbol
nFittedAtomsnumber of atoms used to determine the rmsd
Returns:
minimum rmsd between two different molecule

References MTKpp::BIGNUM, MTKpp::molecule::getAtomList(), MTKpp::molecule::getAtomSymbols(), MTKpp::molecule::getAtomTypes(), MTKpp::molecule::getCoordinates(), and MTKpp::molecule::getNumAtoms().

Referenced by main().

int MTKpp::superimpose::initializeCorrespondences ( molecule pMol,
int  type,
std::vector< std::vector< int > > &  correspondenceMatrices 
)

Initialize the correspondences between the atoms in a molecule.

Parameters:
pMolmolecule pointer
typeof matching
  • 0 match based on atom type
  • 1 match based on atom symbol
  • 2 match based on heavy atom type
  • 3 match based on heavy atom symbol
correspondenceMatricesCorrespondence Matrices
Returns:
success

References MTKpp::molecule::generateHeavyAdjMatrix(), MTKpp::molecule::getAdjMatrix(), MTKpp::molecule::getAtomSymbols(), MTKpp::molecule::getHeavyAdjMatrix(), MTKpp::molecule::getHeavyAtomIndices(), MTKpp::molecule::getHeavyAtomSymbols(), MTKpp::molecule::getHeavyAtomTypes(), MTKpp::molecule::getNumAtoms(), MTKpp::molecule::getNumHeavyAtoms(), and MTKpp::functionalize::ullmann().

Referenced by MTKpp::collection::assignMetalParameters(), and main().

int MTKpp::superimpose::initializeCorrespondences ( molecule pMolB,
molecule pMolA,
int  type,
std::vector< std::vector< int > > &  correspondenceMatrices 
)
void MTKpp::superimpose::center ( double  coords[][3],
double  center[3] 
)

Calculate the center of mass.

Parameters:
coordsCoordinate set
centerCenter of mass

Referenced by main().

void MTKpp::superimpose::updateCoords ( double  coords[][3],
int  n,
double  c1[3],
double  c2[3],
double  rotMat[][3] 
)

Update coordinates.

Parameters:
coordsCoordinate set
nnumber of atoms
c1first center
c2second center
rotMatrotation matrix

Referenced by main().

void MTKpp::superimpose::coordinateDiff ( double  coordsA[][3],
double  coordsB[][3],
double  itsDXM[][3],
double  itsDXP[][3] 
) [protected]
Parameters:
coordsACoordinate set A
coordsBCoordinate set B
itsDXMWork array
itsDXPWork array
void MTKpp::superimpose::buildQuaternion ( Eigen::MatrixXd &  quaternion,
double  itsDXM[][3],
double  itsDXP[][3] 
) [protected]

Constructs the quaternion matrix.

Parameters:
quaternionQuaternion matrix
itsDXMWork array
itsDXPWork array
void MTKpp::superimpose::buildRotation ( double  t[][3],
Eigen::MatrixXd  eigenvectors 
) [protected]

Builds rotation matrix, t, from the decomposed Quaternion matrix.

Parameters:
tRotation matrix
eigenvectorsDecomposed Quaternion matrix

Member Data Documentation

molecule pointer

molecule pointer

int MTKpp::superimpose::nAtoms [protected]

Number of atoms.

double MTKpp::superimpose::centerA[3] [protected]

Center of mass, MoleculeA.

double MTKpp::superimpose::centerB[3] [protected]

Center of mass, MoleculeB.

double MTKpp::superimpose::rotMat[3][3] [protected]

Rotation matrix.

double MTKpp::superimpose::dRMSD [protected]

Root mean squared deviation.

match matrix

Correspondence Type

  • 0
  • 1
  • 2
  • 3

Number of Heavy Atoms.

Heavy Atom indices.

Number of Heavy Atoms.

Heavy Atom indices.


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

Generated on Fri Dec 23 2011 09:28:57 for MTK++ by Doxygen 1.7.5.1