23 #include "core/PlumedMain.h"
25 #include "tools/PDB.h"
26 #include "tools/RMSD.h"
27 #include "core/Atoms.h"
45 virtual void calculate();
46 static void registerKeywords(
Keywords& keys);
128 PLUMED_REGISTER_ACTION(
RMSD,
"RMSD")
131 Colvar::registerKeywords(keys);
132 keys.add(
"compulsory",
"REFERENCE",
"a file in pdb format containing the reference structure and the atoms involved in the CV.");
133 keys.add(
"compulsory",
"TYPE",
"SIMPLE",
"the manner in which RMSD alignment is performed. Should be OPTIMAL or SIMPLE.");
134 keys.addFlag(
"SQUARED",
false,
" This should be setted if you want MSD instead of RMSD ");
141 parse(
"REFERENCE",reference);
143 type.assign(
"SIMPLE");
155 error(
"missing input file " + reference );
162 log.
printf(
" reference from file %s\n",reference.c_str());
165 if(
squared)
log.
printf(
" chosen to use SQUARED option for MSD instead of RMSD\n");
bool read(const std::string &file, bool naturalUnits, double scale)
Read the pdb from a file, scaling positions by a factor scale.
void parseFlag(const std::string &key, bool &t)
Parse one keyword as boolean flag.
void setNotPeriodic()
Set your default value to have no periodicity.
Log & log
Reference to the log stream.
Class implementing fixed size matrices of doubles.
void setAtomsDerivatives(int, const Vector &)
void error(const std::string &msg) const
Crash calculation and print documentation.
const std::vector< Vector > & getPositions() const
Get the array of all positions.
void checkRead()
Check if Action was properly read.
void addValueWithDerivatives()
Add a value with the name label that has derivatives.
A class that implements RMSD calculations This is a class that implements the various infrastructure ...
double calculate(const std::vector< Vector > &positions, std::vector< Vector > &derivatives, bool squared=false)
Compute rmsd.
void requestAtoms(const std::vector< AtomNumber > &a)
#define PLUMED_COLVAR_INIT(ao)
virtual void calculate()
Calculate an Action.
void parse(const std::string &key, T &t)
Parse one keyword as generic type.
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
int printf(const char *fmt,...)
Formatted output with explicit format - a la printf.
This is the abstract base class to use for implementing new collective variables, within it there is ...
void setValue(const double &d)
Set the default value (the one without name)
void set(const PDB &, std::string mytype)
set reference, align and displace from input pdb structure
void setBoxDerivativesNoPbc()
Set box derivatives automatically.
const double & getLength() const
Get length units as double.
Provides the keyword RMSD
const std::vector< AtomNumber > & getAtomNumbers() const
Access to the indexes.
unsigned getNumberOfAtoms() const
Get number of available atoms.