SSAGES
0.1
A MetaDynamics Package
|
"Vanilla" multi-dimensional Metadynamics. More...
#include <Meta.h>
Public Member Functions | |
Meta (const MPI_Comm &world, const MPI_Comm &comm, double height, const std::vector< double > &widths, const std::vector< double > &lowerb, const std::vector< double > &upperb, const std::vector< double > &lowerk, const std::vector< double > &upperk, Grid< Vector > *grid, unsigned int hillfreq, unsigned int frequency) | |
Constructor. More... | |
void | PreSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override |
Pre-simulation hook. More... | |
void | PostIntegration (Snapshot *snapshot, const class CVManager &cvmanager) override |
Post-integration hook. More... | |
void | PostSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override |
Post-simulation hook. More... | |
void | LoadHills (const std::string &filename) |
Load hills from file. More... | |
~Meta () | |
Destructor. | |
![]() | |
Method (uint frequency, const MPI_Comm &world, const MPI_Comm &comm) | |
Constructor. More... | |
void | SetCVMask (const std::vector< uint > &mask) |
Sets the collective variable mask. | |
virtual | ~Method () |
Destructor. | |
![]() | |
EventListener (uint frequency) | |
Constructor. More... | |
uint | GetFrequency () const |
Get frequency of event listener. More... | |
virtual | ~EventListener () |
Destructor. | |
Static Public Member Functions | |
static Meta * | Build (const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path) |
![]() | |
static Method * | BuildMethod (const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path) |
Build a derived method from JSON node. More... | |
Private Member Functions | |
void | AddHill (const CVList &cvs, int iteration) |
Adds a new hill. More... | |
void | CalcBiasForce (const CVList &cvs) |
Computes the bias force. More... | |
void | PrintHill (const Hill &hill, int interation) |
Prints the new hill to file. More... | |
Private Attributes | |
std::vector< Hill > | hills_ |
Hills. | |
double | height_ |
Hill height. | |
std::vector< double > | widths_ |
Hill widths. | |
std::vector< double > | derivatives_ |
Derivatives and temporary storage vectors. | |
std::vector< double > | tder_ |
std::vector< double > | dx_ |
unsigned int | hillfreq_ |
Frequency of new hills. | |
Grid< Vector > * | grid_ |
CV Grid. | |
std::vector< double > | upperb_ |
Bounds. | |
std::vector< double > | lowerb_ |
std::vector< double > | upperk_ |
Bound restraints. | |
std::vector< double > | lowerk_ |
std::ofstream | hillsout_ |
Output stream for hill data. | |
Additional Inherited Members | |
![]() | |
mxx::comm | world_ |
Global MPI communicator. | |
mxx::comm | comm_ |
Local MPI communicator. | |
std::vector< uint > | cvmask_ |
Mask which identifies which CVs to act on. | |
"Vanilla" multi-dimensional Metadynamics.
Implementation of a "vanilla" multi-dimensional Metadynamics method with no bells and whistles.
|
inline |
Constructor.
world | MPI global communicator. |
comm | MPI local communicator. |
height | Height of the hills to be deposited. |
widths | Width of the hills to be deposited. |
hillfreq | Frequency of depositing hills. |
frequency | Frequency of invoking this method. |
Constructs an instance of Metadynamics method.
Definition at line 132 of file Meta.h.
|
private |
Adds a new hill.
cvs | List of CVs. |
iteration | Current iteration. |
Definition at line 168 of file Meta.cpp.
References SSAGES::gaussian(), and SSAGES::gaussianDerv().
|
static |
Definition at line 332 of file Meta.cpp.
References Json::Requirement::GetErrors(), Json::Requirement::HasErrors(), Json::ObjectRequirement::Parse(), and Json::ObjectRequirement::Validate().
|
private |
Computes the bias force.
cvs | List of CVs. |
Definition at line 253 of file Meta.cpp.
References SSAGES::gaussian(), and SSAGES::gaussianDerv().
void SSAGES::Meta::LoadHills | ( | const std::string & | filename | ) |
|
overridevirtual |
Post-integration hook.
snapshot | Current simulation snapshot. |
cvmanager | Collective variable manager. |
Implements SSAGES::Method.
Definition at line 100 of file Meta.cpp.
References SSAGES::CVManager::GetCVs(), SSAGES::Snapshot::GetForces(), SSAGES::Snapshot::GetIteration(), and SSAGES::Snapshot::GetVirial().
|
overridevirtual |
Post-simulation hook.
snapshot | Current simulation snapshot. |
cvmanager | Collective variable manager. |
Implements SSAGES::Method.
|
overridevirtual |
Pre-simulation hook.
snapshot | Current simulation snapshot. |
cvmanager | Collective variable manager. |
Implements SSAGES::Method.
Definition at line 62 of file Meta.cpp.
References SSAGES::CVManager::GetCVs(), and SSAGES::Snapshot::GetTargetIterations().
|
private |
Prints the new hill to file.
hill | Hill to be printed. |
iteration | Current iteration. |
Definition at line 236 of file Meta.cpp.
References SSAGES::Hill::center, and SSAGES::Hill::width.