22 #ifndef __PLUMED_core_ActionWithVirtualAtom_h
23 #define __PLUMED_core_ActionWithVirtualAtom_h
26 #include "tools/AtomNumber.h"
27 #include "tools/Vector.h"
28 #include "tools/Tensor.h"
std::map< AtomNumber, Tensor > gradients
Simple class to store the index of an atom.
void apply()
Apply an Action.
std::vector< double > charges
void setPosition(const Vector &)
Set position of the virtual atom.
Class implementing fixed size vectors of doubles.
std::vector< Tensor > derivatives
std::vector< double > masses
void setMass(double)
Set its mass.
std::vector< Vector > positions
void requestAtoms(const std::vector< AtomNumber > &a)
Request atoms on which the calculation depends.
const std::map< AtomNumber, Tensor > & getGradients() const
This class holds the keywords and their documentation.
void setAtomsDerivatives(const std::vector< Tensor > &d)
Set the derivatives of virtual atom coordinate wrt atoms on which it dependes.
This class is used to bring the relevant information to the Action constructor.
Action used to create objects that access the positions of the atoms from the MD code.
Inherit from here if you are calculating the position of a virtual atom (eg a center of mass) ...
unsigned index() const
Returns the index number.
static void registerKeywords(Keywords &keys)
ActionWithVirtualAtom(const ActionOptions &ao)
AtomNumber getIndex() const
Return the atom id of the corresponding virtual atom.
void setCharge(double)
Set its charge.
void setGradientsIfNeeded()