22 #ifndef __PLUMED_multicolvar_MultiColvarBase_h
23 #define __PLUMED_multicolvar_MultiColvarBase_h
25 #include "core/ActionAtomistic.h"
26 #include "core/ActionWithValue.h"
27 #include "tools/DynamicList.h"
28 #include "vesselbase/ActionWithVessel.h"
33 namespace multicolvar {
69 void addColvar(
const std::vector<unsigned>& newatoms );
152 ActionWithVessel::deactivate_task();
std::vector< Tensor > central_derivs
unsigned current
The numerical index of the task we are curently performing.
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.
Vector getSeparation(const Vector &vec1, const Vector &vec2) const
Get the separation between a pair of vectors.
void prepare()
Prepare for the calculation.
friend class VolumeSubcell
Class implementing fixed size matrices of doubles.
void removeAtomRequest(const unsigned &aa, const double &weight)
Update the list of atoms after the neighbor list step.
unsigned getNAtoms() const
Get the number of atoms in this particular colvar.
double getNLTolerance() const
Return the value for the neighbor list tolerance.
Class implementing fixed size vectors of doubles.
void resizeLocalArrays()
This resizes the local arrays after neighbor list updates and during initialization.
void addElementDerivative(const unsigned &, const double &)
Add some derivative of the quantity in the sum wrt to a numbered element.
A class for storing a list that changes which members are active as a function of time...
virtual void resizeDynamicArrays()=0
void activate(const unsigned ii)
Make something active.
void clearDerivativesAfterTask(const unsigned &ider)
void addColvar(const std::vector< unsigned > &newatoms)
Add a colvar to the set of colvars we are calculating (in practise just a list of atoms) ...
unsigned getAtomIndex(const unsigned &) const
Return the index of an atom.
virtual void calculateWeight()
You can use this to screen contributions that are very small so we can avoid expensive (and pointless...
void setupMultiColvarBase()
Finish setting up the multicolvar base.
std::vector< double > forcesToApply
The forces we are going to apply to things.
void apply()
Apply the forces from this action.
Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some ...
DynamicList< unsigned > atomsWithCatomDer
void deactivate_task()
Deactivate one of the tasks.
This class holds the keywords and their documentation.
std::vector< DynamicList< unsigned > > colvar_atoms
The lists of the atoms involved in each of the individual colvars note these refer to the atoms in al...
static void registerKeywords(Keywords &keys)
void addBoxDerivatives(const Tensor &)
Add some derivatives to the virial.
This class is used to bring the relevant information to the Action constructor.
virtual Vector calculateCentralAtomPosition()=0
A virtual routine to get the position of the central atom - used for things like cv gradient...
virtual bool isDensity()
Is this a density?
Action used to create objects that access the positions of the atoms from the MD code.
StoreCentralAtomsVessel * getCentralAtoms()
Return a pointer to the vessel that stores the positions of all the central atoms.
void mergeDerivatives(const unsigned &ider, const double &df)
These replace the functions in ActionWithVessel to make the code faster.
bool usepbc
Use periodic boundary conditions.
void setElementValue(const unsigned &, const double &)
Set the value of the element.
void setWeight(const double &weight)
Set a weight for this colvar (used in MEAN and HISTOGRAM)
This is the abstract base class to use for implementing a new way of definining a particular region o...
Vector retrieveCentralAtomPos()
Retrieve the position of the central atom.
double getTolerance() const
Return the value of the tolerance.
This is the abstract base class to use for creating distributions of colvars and functions thereof...
Tensor ibox
Variables used for central atoms.
virtual double doCalculation(const unsigned &j)=0
And a virtual function which actually computes the colvar.
MultiColvarBase(const ActionOptions &)
bool usesPbc() const
Do we use pbc to calculate this quantity.
DynamicList< unsigned > atoms_with_derivatives
A dynamic list containing those atoms with derivatives.
DynamicList< AtomNumber > all_atoms
The list of all the atoms involved in the colvar.
void performTask(const unsigned &j)
Perform one of the tasks.
unsigned getNumberOfDerivatives()
Get the number of derivatives for this action.
unsigned getNumberOfColvars() const
Return the size of the colvar_atoms array.
void addBoxDerivativesOfWeight(const Tensor &vir)
unsigned getNumberOfAtoms() const
Get number of available atoms.
double getCentralAtomDerivative(const unsigned &iatom, const unsigned jcomp, const Vector &df) const
Retrieve derivative of central atom position wrt jcomp'th component of position of iatom'th atom...
bool contributorsAreUnlocked
The terms in the series are locked.
int updateFreq
Everything for controlling the updating of neighbor lists.
void addAtomsDerivativeOfWeight(const unsigned &i, const Vector &wder)
Set the derivative of the weight (used in MEAN and HISTOGRAM)
This is used to create PLMD::Action objects that are computed by calculating the same function multip...