22 #ifndef __PLUMED_multicolvar_MultiColvar_h
23 #define __PLUMED_multicolvar_MultiColvar_h
28 #define PLUMED_MULTICOLVAR_INIT(ao) Action(ao),MultiColvar(ao)
31 namespace multicolvar {
55 void readTwoGroups(
const std::string& key1,
const std::string& key2 );
57 void readThreeGroups(
const std::string& key1,
const std::string& key2,
const std::string& key3,
const bool& allow2 );
59 void addColvar(
const std::vector<unsigned>& newatoms );
79 virtual double compute(
const unsigned& j )=0;
85 double getMass(
unsigned)
const ;
Simple class to store the index of an atom.
void addAtomsDerivativeOfWeight(const unsigned &i, const Vector &wder)
Set the derivative of the weight (used in MEAN and HISTOGRAM)
const Vector & getPosition(int) const
Get position of i-th atom.
void addAtomsDerivatives(const int &, const Vector &)
Add some derivatives for an atom.
void addCentralAtomDerivatives(const unsigned &iatom, const Tensor &der)
Add derivative of central atom position wrt to position of iatom'th atom.
void readAtoms(int &natoms)
Read in all the keywords that can be used to define atoms.
Class implementing fixed size matrices of doubles.
void readAtomsLikeKeyword(const std::string &key, int &natoms)
Read in ATOMS keyword.
Class implementing fixed size vectors of doubles.
double getCharge(unsigned) const
Get the charge of atom iatom.
void requestAtoms()
Update the atoms request.
void addColvar(const std::vector< unsigned > &newatoms)
Add a collective variable.
AtomNumber getAbsoluteIndex(int i) const
Get the absolute index of an atom.
void resizeDynamicArrays()
Resize all the dynamic arrays (used at neighbor list update time and during setup) ...
double doCalculation(const unsigned &j)
Do the calculation.
unsigned getAtomIndex(const unsigned &) const
Return the index of an atom.
virtual double compute(const unsigned &j)=0
Actually compute the colvar.
void addCentralAtomDerivatives(const unsigned &iatom, const Tensor &der)
Add derivatives to the central atom position.
This class holds the keywords and their documentation.
virtual Vector getCentralAtom()=0
Get the position of the central atom.
This class is used to bring the relevant information to the Action constructor.
void readTwoGroups(const std::string &key1, const std::string &key2)
Read two group keywords.
bool verbose_output
Have atoms been read in.
void addAtomsDerivatives(const int &, const Vector &)
Add some derivatives for an atom.
const Vector & getPosition(unsigned) const
Get the position of atom iatom.
double getCharge(int i) const
Get charge of i-th atom.
AtomNumber getAbsoluteIndex(unsigned) const
Get the absolute index of atom iatom.
This is the abstract base class to use for creating distributions of colvars and functions thereof...
Vector calculateCentralAtomPosition()
Calculate the position of the central atom.
void readThreeGroups(const std::string &key1, const std::string &key2, const std::string &key3, const bool &allow2)
Read three groups.
MultiColvar(const ActionOptions &)
void readGroupsKeyword(int &natoms)
Read in the various GROUP keywords.
void readSpeciesKeyword(int &natoms)
Read in the various SPECIES keywords.
double getMass(int i) const
Get mass of i-th atom.
double getMass(unsigned) const
Get the mass of atom iatom.
virtual void calculate()
Calculate the multicolvar.
void addAtomsDerivativeOfWeight(const unsigned &i, const Vector &wder)
Set the derivative of the weight (used in MEAN and HISTOGRAM)
static void registerKeywords(Keywords &keys)