#include <ArgumentOnlyDistance.h>
Public Member Functions | |
ArgumentOnlyDistance (const ReferenceConfigurationOptions &ro) | |
double | calc (const std::vector< Vector > &pos, const Pbc &pbc, const std::vector< Value * > &vals, const std::vector< double > &arg, const bool &squared) |
Calculate the distance from the reference configuration. More... | |
double | calculate (const std::vector< Value * > &vals, const bool &squared) |
virtual double | calc (const std::vector< Value * > &vals, const std::vector< double > &arg, const bool &squared)=0 |
void | setReferenceArguments (const std::vector< double > &arg_vals, const std::vector< double > &sigma) |
Set the positions of the refernce arguments. More... | |
void | getArgumentRequests (std::vector< std::string > &, bool disable_checks=false) |
Get the arguments required. More... | |
void | setArgumentNames (const std::vector< std::string > &arg_vals) |
Set the names of the arguments. More... | |
double | getReferenceArgument (const unsigned &i) |
Get the value of the ith reference argument. More... | |
void | printArguments (OFile &ofile, const std::string &fmt) const |
Print the arguments out. More... | |
const std::vector< double > & | getReferenceArguments () |
Return all the reference arguments. More... | |
const std::vector< double > & | getReferenceMetric () |
const std::vector< std::string > & | getArgumentNames () |
Return names. More... | |
std::string | getName () const |
Return the name of this metric. More... | |
virtual void | getAtomRequests (std::vector< AtomNumber > &, bool disable_checks=false) |
Retrieve the atoms that are required for this guy. More... | |
virtual void | setNumberOfArguments (const unsigned &) |
Set the final number of arguments. More... | |
virtual void | setNumberOfAtoms (const unsigned &) |
Set the final number of atoms. More... | |
virtual void | set (const PDB &) |
Set the reference configuration using a PDB. More... | |
virtual void | read (const PDB &)=0 |
Do all local business for setting the configuration. More... | |
void | setWeight (const double &ww) |
Set the weight for this frame. More... | |
double | getWeight () const |
Return the weight for this frame. More... | |
double | calculate (const std::vector< Vector > &pos, const Pbc &pbc, const std::vector< Value * > &vals, const bool &squared=false) |
Calculate the distance from the reference configuration. More... | |
Vector | getAtomDerivative (const unsigned &) const |
Return the derivative wrt to the ith atom. More... | |
double | getArgumentDerivative (const unsigned &) const |
Return the derivative wrt to the ith argument. More... | |
bool | getVirial (Tensor &virout) const |
Return the derivatives of the distance wrt the cell vectors. More... | |
template<class T > | |
bool | parse (const std::string &key, T &t, bool ignore_missing=false) |
Parse something from the pdb remarks. More... | |
template<class T > | |
bool | parseVector (const std::string &key, std::vector< T > &t, bool ignore_missing=false) |
Parse vector from the pdb remarks. More... | |
void | parseFlag (const std::string &key, bool &t) |
Parse a flag. More... | |
void | checkRead () |
Check that all the remarks in the pdb have been read in. More... | |
void | copyDerivatives (const ReferenceConfiguration *) |
Copy derivatives from one frame to this frame. More... | |
void | setNamesAndAtomNumbers (const std::vector< AtomNumber > &numbers, const std::vector< std::string > &arg) |
Set the atom numbers and the argument names. More... | |
void | setReferenceConfig (const std::vector< Vector > &pos, const std::vector< double > &arg, const std::vector< double > &metric) |
Set the reference structure (perhaps should also pass the pbc and align and displace ) More... | |
void | print (OFile &ofile, const double &time, const double &weight, const double &old_norm) |
Print a pdb file containing the reference configuration. More... | |
void | print (OFile &ofile, const std::string &fmt) |
virtual const std::vector < Vector > & | getReferencePositions () |
These are overwritten in ReferenceArguments and ReferenceAtoms but are required here to make PLMD::distance work. More... | |
virtual const std::vector < AtomNumber > & | getAbsoluteIndexes () |
These are overwritten in ReferenceArguments and ReferenceAtoms to make frame copying work. More... | |
Protected Member Functions | |
void | readArgumentsFromPDB (const PDB &pdb) |
Read in the atoms from the pdb file. More... | |
void | setReferenceArguments () |
Set the values of the colvars based on their current instantanous values (used in Analysis) More... | |
double | calculateArgumentDistance (const std::vector< Value * > &vals, const std::vector< double > &arg, const bool &squared) |
Calculate the euclidean/malanobius distance the atoms have moved from the reference configuration in CV space. More... | |
void | error (const std::string &msg) |
Crash with an error. More... | |
void | clearDerivatives () |
Clear the derivatives. More... | |
Protected Attributes | |
bool | hasweights |
Are we reading weights from input. More... | |
bool | hasmetric |
Are we calculating a Malanobius distance. More... | |
std::vector< double > | arg_ders |
Derivatives wrt to the arguments. More... | |
bool | virialWasSet |
The virial contribution has to be stored. More... | |
Tensor | virial |
std::vector< Vector > | atom_ders |
Derivatives wrt to the atoms. More... | |
Private Attributes | |
std::vector< double > | tmparg |
PLMD::ArgumentOnlyDistance::ArgumentOnlyDistance | ( | const ReferenceConfigurationOptions & | ro | ) |
|
virtual |
Calculate the distance from the reference configuration.
Implements PLMD::ReferenceConfiguration.
|
pure virtual |
Implemented in PLMD::EuclideanDistance, and PLMD::NormalizedEuclideanDistance.
double PLMD::ArgumentOnlyDistance::calculate | ( | const std::vector< Value * > & | vals, |
const bool & | squared | ||
) |
|
inherited |
Calculate the distance from the reference configuration.
|
protectedinherited |
Calculate the euclidean/malanobius distance the atoms have moved from the reference configuration in CV space.
|
inherited |
Check that all the remarks in the pdb have been read in.
|
protectedinherited |
Clear the derivatives.
|
inherited |
Copy derivatives from one frame to this frame.
|
protectedinherited |
Crash with an error.
|
inlinevirtualinherited |
These are overwritten in ReferenceArguments and ReferenceAtoms to make frame copying work.
Reimplemented in PLMD::ReferenceAtoms.
|
inlineinherited |
Return the derivative wrt to the ith argument.
|
inlinevirtualinherited |
Return names.
Reimplemented from PLMD::ReferenceConfiguration.
|
virtualinherited |
Get the arguments required.
Reimplemented from PLMD::ReferenceConfiguration.
|
inlineinherited |
Return the derivative wrt to the ith atom.
|
inlinevirtualinherited |
Retrieve the atoms that are required for this guy.
Reimplemented in PLMD::ReferenceAtoms.
|
inherited |
Return the name of this metric.
|
inlinevirtualinherited |
Get the value of the ith reference argument.
Reimplemented from PLMD::ReferenceConfiguration.
|
inlinevirtualinherited |
Return all the reference arguments.
Reimplemented from PLMD::ReferenceConfiguration.
|
virtualinherited |
Reimplemented from PLMD::ReferenceConfiguration.
|
inlinevirtualinherited |
These are overwritten in ReferenceArguments and ReferenceAtoms but are required here to make PLMD::distance work.
Reimplemented in PLMD::ReferenceAtoms.
|
inherited |
|
inlineinherited |
Return the weight for this frame.
|
inherited |
Parse something from the pdb remarks.
|
inherited |
Parse a flag.
|
inherited |
Parse vector from the pdb remarks.
|
inherited |
Print a pdb file containing the reference configuration.
|
inherited |
|
inherited |
Print the arguments out.
|
pure virtualinherited |
Do all local business for setting the configuration.
Implemented in PLMD::DRMSD, PLMD::MultiDomainRMSD, PLMD::SimpleRMSD, PLMD::OptimalRMSD, PLMD::FakeFrame, PLMD::SimpleRMSD, PLMD::EuclideanDistance, and PLMD::NormalizedEuclideanDistance.
|
protectedinherited |
Read in the atoms from the pdb file.
|
virtualinherited |
Set the reference configuration using a PDB.
|
inherited |
Set the names of the arguments.
|
inherited |
Set the atom numbers and the argument names.
|
virtualinherited |
Set the final number of arguments.
|
virtualinherited |
Set the final number of atoms.
|
protectedinherited |
Set the values of the colvars based on their current instantanous values (used in Analysis)
|
inherited |
Set the positions of the refernce arguments.
|
inherited |
Set the reference structure (perhaps should also pass the pbc and align and displace )
|
inlineinherited |
Set the weight for this frame.
|
protectedinherited |
Derivatives wrt to the arguments.
|
protectedinherited |
Derivatives wrt to the atoms.
|
protectedinherited |
Are we calculating a Malanobius distance.
|
protectedinherited |
Are we reading weights from input.
|
private |
|
protectedinherited |
|
protectedinherited |
The virial contribution has to be stored.
Hosted by GitHub | 1.8.7 |