22 #include "CollectiveVariable.h"
23 #include "Validator/ObjectRequirement.h"
24 #include "Drivers/DriverException.h"
64 static BoxVolumeCV* Build(
const Json::Value& json,
const std::string& path)
70 reader.parse(JsonSchema::BoxVolumeCV, schema);
71 validator.
Parse(schema, path);
bool HasErrors()
Check if errors have occured.
unsigned GetNumAtoms() const
Get number of atoms in this snapshot.
Class containing a snapshot of the current simulation in time.
void Evaluate(const Snapshot &snapshot) override
Evaluate the CV.
virtual void Parse(Value json, const std::string &path) override
Parse JSON value to generate Requirement(s).
std::vector< Vector3 > grad_
Gradient vector dCv/dxi.
const mxx::comm & GetCommunicator() const
Get communicator for walker.
void Initialize(const Snapshot &snapshot) override
Initialize the CV.
Exception to be thrown when building the Driver fails.
std::vector< std::string > GetErrors()
Get list of error messages.
double GetVolume() const
Get system volume.
Requirements on an object.
Eigen::Vector3d Vector3
Three-dimensional vector.
double val_
Current value of CV.
Abstract class for a collective variable.
Matrix3 boxgrad_
Gradient w.r.t box vectors dCv/dHij.
BoxVolumeCV()
Constructor.
Collective variable on the volume of a box.
virtual void Validate(const Value &json, const std::string &path) override
Validate JSON value.