170 return val_ - location;
Abstract class for a collective variable.
virtual double GetDifference(double location) const
virtual double GetPeriodicValue(double location) const
Apply periodic boundaries to a given value.
const std::array< double, 2 > & GetBoundaries()
Get CV boundaries.
Matrix3 boxgrad_
Gradient w.r.t box vectors dCv/dHij.
std::vector< Vector3 > grad_
Gradient vector dCv/dxi.
virtual ~CollectiveVariable()
Destructor.
double val_
Current value of CV.
double GetValue() const
Get current value of the CV.
virtual void Initialize(const class Snapshot &)
Initialize CV.
virtual void Evaluate(const class Snapshot &)=0
Evaluate CV.
CollectiveVariable()
Constructor.
const Matrix3 & GetBoxGradient() const
Get gradient contribution to box.
std::array< double, 2 > bounds_
Bounds on CV.
const std::vector< Vector3 > & GetGradient() const
Get current gradient of the CV.
virtual double GetMinimumImage(double) const
Returns the minimum image of a CV based on the input location.
Class containing a snapshot of the current simulation in time.
Eigen::Matrix3d Matrix3
3x3 matrix.