All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
PLMD::RMSD Class Reference

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< Vectorreference
 
std::vector< double > align
 
std::vector< double > displace
 

Detailed Description

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);

Member Enumeration Documentation

Enumerator
SIMPLE 
OPTIMAL 
OPTIMAL_FAST 

Constructor & Destructor Documentation

PLMD::RMSD::RMSD ( )

Constructor.

Member Function Documentation

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 ( )
template<bool safe, bool alEqDis>
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

Member Data Documentation

std::vector<double> PLMD::RMSD::align
private
AlignmentMethod PLMD::RMSD::alignmentMethod
private
std::vector<double> PLMD::RMSD::displace
private
std::vector<Vector> PLMD::RMSD::reference
private

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