Collective Variables Module - Developer Documentation
Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
colvarbias_meta::hill Class Reference

A hill for the metadynamics bias. More...

#include <colvarbias_meta.h>

Public Member Functions

 hill (cvm::real const &W_in, std::vector< colvar *> &cv, cvm::real const &hill_width, std::string const &replica_in="")
 Runtime constructor: data are read directly from collective variables. More...
 
 hill (size_t const &it_in, cvm::real const &W_in, std::vector< colvarvalue > const &centers_in, std::vector< cvm::real > const &widths_in, std::string const &replica_in="")
 General constructor: all data are explicitly passed as arguments (used for instance when reading hills saved on a file) More...
 
 hill (colvarbias_meta::hill const &h)
 Copy constructor.
 
 ~hill ()
 Destructor.
 
cvm::real energy ()
 Get the energy.
 
cvm::real energy (cvm::real const &new_weight)
 Get the energy using another hill weight.
 
cvm::real const & value ()
 Get the current hill value.
 
void value (cvm::real const &new_value)
 Set the hill value as specified.
 
cvm::real weight ()
 Get the weight.
 
void scale (cvm::real const &new_scale_fac)
 Scale the weight with this factor (by default 1.0 is used)
 
std::vector< colvarvalue > & center ()
 Get the center of the hill.
 
colvarvaluecenter (size_t const &i)
 Get the i-th component of the center.
 
std::string output_traj ()
 Represent the hill ina string suitable for a trajectory file.
 

Public Attributes

size_t it
 Time step at which this hill was added.
 
std::string replica
 Identity of the replica who added this hill (only in multiple replica simulations)
 

Protected Attributes

cvm::real hill_value
 Value of the hill function (ranges between 0 and 1)
 
cvm::real sW
 Scale factor, which could be modified at runtime (default: 1)
 
cvm::real W
 Maximum height in energy of the hill.
 
std::vector< colvarvaluecenters
 Center of the hill in the collective variable space.
 
std::vector< cvm::realwidths
 Widths of the hill in the collective variable space.
 

Friends

class colvarbias_meta
 
bool operator< (hill const &h1, hill const &h2)
 Comparison operator.
 
bool operator<= (hill const &h1, hill const &h2)
 Comparison operator.
 
bool operator> (hill const &h1, hill const &h2)
 Comparison operator.
 
bool operator>= (hill const &h1, hill const &h2)
 Comparison operator.
 
bool operator== (hill const &h1, hill const &h2)
 Comparison operator.
 
std::ostream & operator<< (std::ostream &os, hill const &h)
 Write the hill to an output stream.
 

Detailed Description

A hill for the metadynamics bias.

Constructor & Destructor Documentation

◆ hill() [1/2]

colvarbias_meta::hill::hill ( cvm::real const &  W_in,
std::vector< colvar *> &  cv,
cvm::real const &  hill_width,
std::string const &  replica_in = "" 
)
inline

Runtime constructor: data are read directly from collective variables.

Parameters
weightWeight of the hill
cvPointer to the array of collective variables involved
replica(optional) Identity of the replica which creates the hill

◆ hill() [2/2]

colvarbias_meta::hill::hill ( size_t const &  it_in,
cvm::real const &  W_in,
std::vector< colvarvalue > const &  centers_in,
std::vector< cvm::real > const &  widths_in,
std::string const &  replica_in = "" 
)
inline

General constructor: all data are explicitly passed as arguments (used for instance when reading hills saved on a file)

Parameters
itTime step of creation of the hill
weightWeight of the hill
centersCenter of the hill
widthsWidth of the hill around centers
replica(optional) Identity of the replica which creates the hill

The documentation for this class was generated from the following files: