41 keys.
addFlag(
"NOPBC",
false,
"ignore the periodic boundary conditions when calculating distances");
45 plumed_massert(!
isEnergy,
"request atoms should not be called if this is energy");
59 for(
unsigned i=0;i<f.size();i++){
69 for(
unsigned j=0;j<nat;++j){
void zero()
set it to zero
const Vector & getPosition(int) const
Get position of i-th atom.
static void registerKeywords(Keywords &keys)
Register all the relevant keywords for the action.
static void registerKeywords(Keywords &keys)
bool applyForce(std::vector< double > &forces) const
Apply the forces to the derivatives using the chain rule (if there are no forces this routine returns...
Class implementing fixed size matrices of doubles.
Tensor & modifyVirial()
Get a reference to virial array.
A class for holding the value of a function together with its derivatives.
void requestAtoms(const std::vector< AtomNumber > &a)
void setBoxDerivatives(const Tensor &)
Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some ...
This class holds the keywords and their documentation.
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.
Base class for all the input Actions.
static void registerKeywords(Keywords &keys)
Register all the relevant keywords for the action.
void resizeDerivatives(int n)
Set the number of derivatives.
static void registerKeywords(Keywords &keys)
void setBoxDerivativesNoPbc()
Set box derivatives automatically.
void requestAtoms(const std::vector< AtomNumber > &a)
Request an array of atoms.
int getNumberOfComponents() const
Returns the number of values defined.
std::vector< double > forces
This is used by apply to retrive the forces on the atoms.
Value * getPntrToComponent(int i)
Return a pointer to the component by index.
std::vector< Vector > & modifyForces()
Get a reference to forces array.
unsigned getNumberOfAtoms() const
Get number of available atoms.
void apply()
Apply an Action.
double & modifyForceOnEnergy()
Get a reference to force on energy.
Vector3d Vector
Alias for three dimensional vectors.
double getDerivative(const unsigned n) const
Get the derivative with respect to component n.
void addFlag(const std::string &k, const bool def, const std::string &d)
Add a falg with name k that is by default on if def is true and off if def is false. d should provide a description of the flag.