22 #ifndef __PLUMED_multicolvar_ActionVolume_h
23 #define __PLUMED_multicolvar_ActionVolume_h
25 #include "core/ActionAtomistic.h"
26 #include "tools/HistogramBead.h"
27 #include "tools/Pbc.h"
28 #include "core/ActionWithValue.h"
29 #include "vesselbase/ActionWithVessel.h"
30 #include "vesselbase/BridgeVessel.h"
34 namespace multicolvar {
void doJobsRequiredBeforeTaskList()
Do jobs required before tasks are undertaken.
const Vector & getPosition(int) const
Get position of i-th atom.
const Pbc & getPbc() const
Get reference to Pbc.
double sigma
The value of sigma.
void applyBridgeForces(const std::vector< double > &bb)
Forces here are applied through the bridge.
void addBoxDerivatives(const Tensor &vir)
Add derivatives wrt to the virial.
const Tensor & getBox() const
Get the cell box.
Class implementing fixed size matrices of doubles.
MultiColvarBase * getPntrToMultiColvar()
void calculate()
Calculate an Action.
Class implementing fixed size vectors of doubles.
void addElementDerivative(const unsigned &, const double &)
Add some derivative of the quantity in the sum wrt to a numbered element.
DynamicList< unsigned > activeAtoms
Fast merging of derivatives (automatic skips of zero contributions)
Vector scaledToReal(const Vector &) const
Transform a vector in scaled coordinates to a vector in real space.
virtual void setupRegion()=0
void calculateNumericalDerivatives(ActionWithValue *a=NULL)
We need our own calculate numerical derivatives here.
void prepare()
Jobs to be done when the action is activated.
unsigned bridgeVariable
This is used for numerical derivatives of bridge variables.
bool not_in
Are we interested in the area outside the colvar.
void mergeDerivatives(const unsigned &ider, const double &df)
These routines replace the virtual routines in ActionWithVessel for code optimization.
const Pbc & getPbc() const
Get reference to Pbc.
Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some ...
unsigned getNumberOfDerivatives()
Get the number of derivatives for this action.
This class holds the keywords and their documentation.
This class allows you to calculate the vessel in one ActionWithVessel.
A class for calculating whether or not values are within a given range using : .
bool isPeriodic()
Is the output quantity periodic.
Vector tmp_p
This is used for storing positions properly.
void apply()
Apply an Action.
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.
void clearDerivatives()
Don't actually clear the derivatives when this is called from plumed main.
ActionVolume(const ActionOptions &)
void deactivate_task()
Routines that have to be defined so as not to have problems with virtual methods. ...
This is the abstract base class to use for implementing a new way of definining a particular region o...
MultiColvarBase * mycolv
The action that is calculating the colvars of interest.
void resizeLocalArrays()
This sets up array above.
bool checkNumericalDerivatives() const
Check if numerical derivatives should be used.
int updateFreq
Everything for controlling the updating of neighbor lists.
void performTask(const unsigned &i)
This calculates all the vessels and is called from within a bridge vessel.
HistogramBead bead
The bead for the histogram.
virtual double calculateNumberInside(const Vector &cpos, HistogramBead &bead, Vector &derivatives)=0
Vector pbcDistance(const Vector &, const Vector &) const
Compute the pbc distance between two positions.
void clearDerivativesAfterTask(const unsigned &ider)
void addReferenceAtomDerivatives(const unsigned &iatom, const Vector &der)
Add derivatinve to one of the reference atoms here.
Vector pbcDistance(const Vector &v1, const Vector &v2) const
Calculate distance between two points.
unsigned getNumberOfDerivatives()
Get the number of derivatives for this action.
const Tensor & getBox() const
Get position of i-th atom.
unsigned getNumberOfAtoms() const
Get number of available atoms.
static void registerKeywords(Keywords &keys)
vesselbase::BridgeVessel * myBridgeVessel
The vessel that bridges.
std::vector< double > derivatives
Vector of derivatives for the object.
Vector realToScaled(const Vector &) const
Transform a vector in real space to a vector in scaled coordinates.
std::vector< double > tmpforces
This is used to store forces temporarily in apply.
const Vector & getPosition(int iatom)
Get position of atom.
double getElementValue(const unsigned &ival) const
Get the value of this element.
This is used to create PLMD::Action objects that are computed by calculating the same function multip...
void requestAtoms(const std::vector< AtomNumber > &atoms)
Request the atoms.