metadynamics
|
Abstract interface for a collective variable
All C++ implementations of collective variables inherit from this class. A CollectiveVariable is an extension of a ForceCompute, and can compute forces.
The force generated by a collective variable (i.e. its negative derivative with respect to particle positions) must be multiplied by a bias factor (the partial derivative of the biasing potential with respect to the collective variable). The bias factor is set using the method setBiasFactor().
Collective variables should have a potential energy of zero, since they are not directly added to the Hamiltonian (only via the biasing potential). Instead, the value of the collective variable can be queried using getCurrentValue().
Public Member Functions | |
CollectiveVariable (boost::shared_ptr< SystemDefinition > sysdef, const std::string &name) | |
virtual void | computeForces (unsigned int timestep)=0 |
virtual Scalar | getCurrentValue (unsigned int timestep)=0 |
virtual void | setBiasFactor (Scalar bias) |
std::string | getName () |
Protected Attributes | |
Scalar | m_bias |
std::string | m_cv_name |
CollectiveVariable | ( | boost::shared_ptr< SystemDefinition > | sysdef, |
const std::string & | name | ||
) |
Constructs a collective variable
sysdef | The system definition |
name | The name of this collective variable |
|
pure virtual |
Compute the forces for this collective variable. The force that is written to the force arrays must be multiplied by the bias factor.
timestep | The current value of the time step |
Implemented in LamellarOrderParameter, and CollectiveVariableWrap.
|
pure virtual |
Returns the current value of the collective variable
timestep | The currnt value of the timestep |
Implemented in LamellarOrderParameter, and CollectiveVariableWrap.
|
inline |
Returns the name of the collective variable
|
inlinevirtual |
Set the current value of the bias factor. This routine has to be called before force evaluation by the integrator.
bias | The value that multiplies the force |