23 #include "core/PlumedMain.h"
25 #include "tools/PDB.h"
26 #include "tools/DRMSD.h"
27 #include "core/Atoms.h"
85 virtual void calculate();
86 static void registerKeywords(
Keywords& keys);
89 PLUMED_REGISTER_ACTION(
DRMSD,
"DRMSD")
92 Colvar::registerKeywords(keys);
93 keys.add(
"compulsory",
"REFERENCE",
"a file in pdb format containing the reference structure and the atoms involved in the CV.");
94 keys.add(
"compulsory",
"LOWER_CUTOFF",
"only pairs of atoms further than LOWER_CUTOFF are considered in the calculation.");
95 keys.add(
"compulsory",
"UPPER_CUTOFF",
"only pairs of atoms closer than UPPER_CUTOFF are considered in the calculation.");
102 parse(
"REFERENCE",reference);
104 parse(
"LOWER_CUTOFF",lcutoff);
106 parse(
"UPPER_CUTOFF",ucutoff);
118 error(
"missing input file " + reference );
126 log.
printf(
" reference from file %s\n",reference.c_str());
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 &)
Provides the keyword DRMSD
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.
void requestAtoms(const std::vector< AtomNumber > &a)
#define PLUMED_COLVAR_INIT(ao)
const Pbc & getPbc() const
Get reference to Pbc.
void setBoxDerivatives(const Tensor &)
double calculate(const std::vector< Vector > &positions, std::vector< Vector > &derivatives, Tensor &virial) const
Compute drmsd ( no pbc )
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.
virtual void calculate()
Calculate an Action.
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)
A class that implements DRMSD calculations.
void setFromPDB(const PDB &, double lbound=0.0, double ubound=std::numeric_limits< double >::max())
set reference, align and displace from input pdb structure
const double & getLength() const
Get length units as double.
const std::vector< AtomNumber > & getAtomNumbers() const
Access to the indexes.
unsigned getNumberOfAtoms() const
Get number of available atoms.