A class that implements RMSD calculations This is a class that implements the various infrastructure to calculate the RMSD or MSD respect a given frame. More...
#include <RMSD.h>
Public Member Functions | |
RMSD () | |
Constructor. More... | |
void | clear () |
clear the structure More... | |
void | set (const PDB &, std::string mytype) |
set reference, align and displace from input pdb structure More... | |
void | setType (std::string mytype) |
set the type of alignment we are doing More... | |
void | setReference (const std::vector< Vector > &reference) |
set reference coordinates More... | |
void | setAlign (const std::vector< double > &align) |
set weights More... | |
void | setDisplace (const std::vector< double > &displace) |
set align More... | |
std::string | getMethod () |
double | simpleAlignment (const std::vector< double > &align, const std::vector< double > &displace, const std::vector< Vector > &positions, const std::vector< Vector > &reference, std::vector< Vector > &derivatives, bool squared=false) const |
template<bool safe, bool alEqDis> | |
double | optimalAlignment (const std::vector< double > &align, const std::vector< double > &displace, const std::vector< Vector > &positions, const std::vector< Vector > &reference, std::vector< Vector > &derivatives, bool squared=false) const |
double | calculate (const std::vector< Vector > &positions, std::vector< Vector > &derivatives, bool squared=false) const |
Compute rmsd. More... | |
Private Types | |
enum | AlignmentMethod { SIMPLE, OPTIMAL, OPTIMAL_FAST } |
Private Attributes | |
AlignmentMethod | alignmentMethod |
std::vector< Vector > | reference |
std::vector< double > | align |
std::vector< double > | displace |
A class that implements RMSD calculations This is a class that implements the various infrastructure to calculate the RMSD or MSD respect a given frame.
It can be done through an optimal alignment scheme as Kearsley or, more simply, by resetting the center of mass. This is the class that decides this. A very simple use is
#include "tools/PDB.h" #include "tools/RMSD.h" #include "tools/Vector.h" using namespace PLMD; RMSD rmsd; PDB pdb; // get the pdb (see PDB documentation) pdb.read("file.pdb",true,1.0); string type; type.assign("OPTIMAL"); // set the reference and the type rmsd.set(pdb,type); // this calculates the rmsd and the derivatives vector<Vector> derivs; double val; val=rmsd.calculate(getPositions(),derivs,true);
|
private |
PLMD::RMSD::RMSD | ( | ) |
Constructor.
double PLMD::RMSD::calculate | ( | const std::vector< Vector > & | positions, |
std::vector< Vector > & | derivatives, | ||
bool | squared = false |
||
) | const |
Compute rmsd.
void PLMD::RMSD::clear | ( | ) |
clear the structure
string PLMD::RMSD::getMethod | ( | ) |
double PLMD::RMSD::optimalAlignment | ( | const std::vector< double > & | align, |
const std::vector< double > & | displace, | ||
const std::vector< Vector > & | positions, | ||
const std::vector< Vector > & | reference, | ||
std::vector< Vector > & | derivatives, | ||
bool | squared = false |
||
) | const |
void PLMD::RMSD::set | ( | const PDB & | pdb, |
std::string | mytype | ||
) |
set reference, align and displace from input pdb structure
void PLMD::RMSD::setAlign | ( | const std::vector< double > & | align | ) |
set weights
void PLMD::RMSD::setDisplace | ( | const std::vector< double > & | displace | ) |
set align
void PLMD::RMSD::setReference | ( | const std::vector< Vector > & | reference | ) |
set reference coordinates
void PLMD::RMSD::setType | ( | std::string | mytype | ) |
set the type of alignment we are doing
double PLMD::RMSD::simpleAlignment | ( | const std::vector< double > & | align, |
const std::vector< double > & | displace, | ||
const std::vector< Vector > & | positions, | ||
const std::vector< Vector > & | reference, | ||
std::vector< Vector > & | derivatives, | ||
bool | squared = false |
||
) | const |
|
private |
|
private |
|
private |
|
private |
Hosted by GitHub | 1.8.7 |