SSAGES  0.1
A MetaDynamics Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | Private Attributes | List of all members
SSAGES::RMSDCV Class Reference

Collective variable to calculate root mean square displacement. More...

#include <RMSDCV.h>

Inheritance diagram for SSAGES::RMSDCV:
Inheritance graph
[legend]

Public Member Functions

 RMSDCV (std::vector< int > atomids, std::string molxyz, bool use_range=false)
 Constructor. More...
 
void Initialize (const Snapshot &snapshot) override
 
void Evaluate (const Snapshot &snapshot) override
 
- Public Member Functions inherited from SSAGES::CollectiveVariable
 CollectiveVariable ()
 Constructor.
 
double GetValue () const
 Get current value of the CV. More...
 
virtual double GetMinimumImage (double) const
 Returns the minimum image of a CV based on the input location. More...
 
virtual double GetPeriodicValue (double location) const
 Apply periodic boundaries to a given value. More...
 
const std::vector< Vector3 > & GetGradient () const
 Get current gradient of the CV. More...
 
const Matrix3GetBoxGradient () const
 Get gradient contribution to box.
 
const std::array< double, 2 > & GetBoundaries ()
 Get CV boundaries. More...
 
virtual double GetDifference (double location) const
 

Private Attributes

std::vector< int > atomids_
 IDs of the atoms used for Rg calculation.
 
std::vector< int > pertatoms_
 Array to store indicies of atoms of interest.
 
std::string molecule_
 Name of model structure.
 
std::vector< Vector3refcoord_
 Store reference structure coordinates.
 
Vector3 COMref_
 Center of mass of reference.
 

Additional Inherited Members

- Static Public Member Functions inherited from SSAGES::CollectiveVariable
static CollectiveVariableBuildCV (const Json::Value &json, const std::string &path)
 Set up collective variable. More...
 
- Protected Attributes inherited from SSAGES::CollectiveVariable
std::vector< Vector3grad_
 Gradient vector dCv/dxi.
 
Matrix3 boxgrad_
 Gradient w.r.t box vectors dCv/dHij.
 
double val_
 Current value of CV.
 
std::array< double, 2 > bounds_
 Bounds on CV.
 

Detailed Description

Collective variable to calculate root mean square displacement.

RMSD calculation performed as reported in Coutsias, E. A., Seok, C., and Dill, K. A., "Using Quaternions to Calculate RMSD", J. Comput. Chem. 25: 1849-1857, 2004

Definition at line 39 of file RMSDCV.h.

Constructor & Destructor Documentation

SSAGES::RMSDCV::RMSDCV ( std::vector< int >  atomids,
std::string  molxyz,
bool  use_range = false 
)
inline

Constructor.

Parameters
atomidsIDs of the atoms defining Rg.
molxyzString determining the molecule.
use_rangeIf True Use range of atoms defined by the two atoms in atomids.

Construct a RMSD CV.

Todo:
Bounds needs to be an input and periodic boundary conditions

Definition at line 67 of file RMSDCV.h.

References atomids_.

67  :
68  atomids_(atomids), molecule_(molxyz)
69  {
70  if(use_range)
71  {
72  if(atomids.size() != 2)
73  { std::cout<<"RMSDCV: If using range, must define only two atoms!"<<std::endl;
74  exit(0);
75  }
76 
77  atomids_.clear();
78 
79  if(atomids[0] >= atomids[1])
80  { std::cout<<"RMSDCV: Please reverse atom range or check that atom range is not equal!"<<std::endl;
81  exit(0);
82  }
83  for(int i = atomids[0]; i <= atomids[1];i++)
84  atomids_.push_back(i);
85  }
86  }
std::string molecule_
Name of model structure.
Definition: RMSDCV.h:48
std::vector< int > atomids_
IDs of the atoms used for Rg calculation.
Definition: RMSDCV.h:43

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