22 #ifndef __PLUMED_multicolvar_MultiColvarFunction_h
23 #define __PLUMED_multicolvar_MultiColvarFunction_h
29 namespace multicolvar {
71 virtual double compute(
const unsigned& j )=0;
void addCentralAtomsDerivativesOfWeight(const unsigned &, const Vector &)
Add derivatives of weight wrt to an atomic position.
Vector getSeparation(const Vector &vec1, const Vector &vec2) const
We use the distance from mycolv as otherwise numerical derivatives dont work.
Vector calculateCentralAtomPosition()
Calculate the position of the central atom.
unsigned current
The numerical index of the task we are curently performing.
void addAtomsDerivativeOfWeight(const unsigned &iatom, const Vector &df, MultiColvarFunction *funcout) const
Add derivatives of the weight wrt to the central atom position.
Class implementing fixed size matrices of doubles.
Class implementing fixed size vectors of doubles.
void addAtomsDerivatives(const unsigned &iatom, const Vector &df, MultiColvarFunction *funcout) const
Add derivatives to central atom position.
void unlockContributors()
Used to make sure we are calculating everything during neighbor list update step. ...
MultiColvarBase * getPntrToMultiColvar()
Return a pointer to the multicolvar we are using as a base function.
multicolvar::StoreCentralAtomsVessel * catoms
The central atom positions.
void activate(const unsigned ii)
Make something active.
void addDerivativeOfCentralAtomPos(const unsigned &iatom, const Tensor &df, MultiColvarFunction *funcout) const
Add derivative to the central atom position.
virtual Vector getCentralAtom()=0
Get the position of the central atom.
Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some ...
void addDerivativeOfCentralAtomPos(const unsigned &iatom, const Tensor &der)
Add derivative wrt to the position of the central atom.
This class holds the keywords and their documentation.
virtual double compute(const unsigned &j)=0
Actually compute the colvar.
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...
This class is used to bring the relevant information to the Action constructor.
void addCentralAtomsDerivatives(const unsigned &, const Vector &)
Add derivatives of value wrt to an atomic position.
void completeSetup()
Finish off the setup of the VectorFunction.
void resizeDynamicArrays()
Resize the dynamic arrays.
Vector getPosition(const unsigned &) const
Get the orientation of the ith vector.
multicolvar::MultiColvarBase * mycolv
The multicolvar from which we construct these quantities.
void calculateNumericalDerivatives(ActionWithValue *a=NULL)
Calculate the numerical derivatives for this action.
double doCalculation(const unsigned &j)
Do the calculation.
unsigned getNumberOfBaseFunctions() const
Get the number of functions in the multicolvar we are operating on.
DynamicList< unsigned > atoms_with_derivatives
A dynamic list containing those atoms with derivatives.
MultiColvarFunction(const ActionOptions &)
static void registerKeywords(Keywords &keys)
Vector getPositionOfCentralAtom(const unsigned &) const
Get the position of one of the central atoms.
void calculate()
Regular calculate.
void atomHasDerivative(const unsigned &iatom)
Active element in atoms_with_derivatives.