SSAGES
0.9.3
Software Suite for Advanced General Ensemble Simulations
|
"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 |
Method call prior to simulation initiation. More... | |
void | PostIntegration (Snapshot *snapshot, const class CVManager &cvmanager) override |
Method call post integration. More... | |
void | PostSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override |
Method call post simulation. More... | |
void | LoadHills (const std::string &filename) |
Load hills from file. More... | |
~Meta () | |
Destructor. | |
Public Member Functions inherited from SSAGES::Method | |
Method (unsigned int frequency, const MPI_Comm &world, const MPI_Comm &comm) | |
Constructor. More... | |
void | SetCVMask (const std::vector< unsigned int > &mask) |
Sets the collective variable mask. More... | |
virtual | ~Method () |
Destructor. | |
Public Member Functions inherited from SSAGES::EventListener | |
EventListener (unsigned int frequency) | |
Constructor. More... | |
unsigned int | 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) |
Build a derived method from JSON node. More... | |
Static Public Member Functions inherited from SSAGES::Method | |
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... | |
Static Public Member Functions inherited from SSAGES::EventListener | |
static unsigned int | GetWalkerID (const MPI_Comm &world, const MPI_Comm &comm) |
Get walker ID number of specified communicator. More... | |
static unsigned int | GetNumWalkers (const MPI_Comm &world, const MPI_Comm &comm) |
Get total number of walkers in the simulation. More... | |
static bool | IsMasterRank (const MPI_Comm &comm) |
Check if current processor is master. 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 iteration) |
Prints the new hill to file. More... | |
Private Attributes | |
std::vector< Hill > | hills_ |
Hills. | |
double | height_ |
Hill height. | |
std::vector< double > | widths_ |
Hill widths. | |
unsigned int | hillfreq_ |
Frequency of new hills. | |
Grid< Vector > * | grid_ |
CV Grid. | |
std::ofstream | hillsout_ |
Output stream for hill data. | |
std::vector< double > | derivatives_ |
std::vector< double > | tder_ |
std::vector< double > | dx_ |
std::vector< double > | upperb_ |
std::vector< double > | lowerb_ |
std::vector< double > | upperk_ |
std::vector< double > | lowerk_ |
Additional Inherited Members | |
Protected Attributes inherited from SSAGES::Method | |
mxx::comm | world_ |
Global MPI communicator. | |
mxx::comm | comm_ |
Local MPI communicator. | |
std::vector< unsigned int > | 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. |
lowerb | Lower bounds for CVs. |
upperb | Upper bounds for CVs. |
lowerk | Lower bound restraints for CVs. |
upperk | Upper bound restraints for CVs. |
grid | Grid containing bias. |
hillfreq | Frequency of depositing hills. |
frequency | Frequency of invoking this method. |
Constructs an instance of Metadynamics method.
Definition at line 143 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 |
Build a derived method from JSON node.
json | JSON Value containing all input information. |
world | MPI global communicator. |
comm | MPI local communicator. |
path | Path for JSON path specification. |
This function builds a registered method from a JSON node. The difference between this function and "Build" is that this automatically determines the appropriate derived type based on the JSON node information.
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 |
Method call post integration.
snapshot | Pointer to the simulation snapshot. |
cvmanager | Collective variable manager. |
This function will be called after each integration step.
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 |
Method call post simulation.
snapshot | Pointer to the simulation snapshot. |
cvmanager | Collective variable manager. |
This function will be called after the end of the simulation run.
Implements SSAGES::Method.
|
overridevirtual |
Method call prior to simulation initiation.
snapshot | Pointer to the simulation snapshot. |
cvmanager | Collective variable manager. |
This function will be called before the simulation is started.
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.
|
private |
|
private |