SSAGES
0.1
A MetaDynamics Package
|
Interface for Method implementations. More...
#include <Method.h>
Public Member Functions | |
Method (uint frequency, const MPI_Comm &world, const MPI_Comm &comm) | |
Constructor. More... | |
virtual void | PreSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override=0 |
Method call prior to simulation initiation. More... | |
virtual void | PostIntegration (Snapshot *snapshot, const class CVManager &cvmanager) override=0 |
Method call post integration. More... | |
virtual void | PostSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override=0 |
Method call post simulation. 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 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... | |
Protected Attributes | |
mxx::comm | world_ |
Global MPI communicator. | |
mxx::comm | comm_ |
Local MPI communicator. | |
std::vector< uint > | cvmask_ |
Mask which identifies which CVs to act on. | |
Interface for Method implementations.
The base method class from which advanced sampling routines derive. A method is allowed to manipulate a simulation at three points: before the simulation begins (usually initialization), after each integration step by the simulation engine, and after the integration steps are complete (usually cleanup).
|
inline |
Constructor.
frequency | Frequency of sampling. |
world | Global MPI communicator. |
comm | MPI communicator of walker. |
Frequency of sampling must be specified by all methods.
Definition at line 61 of file Method.h.
|
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 38 of file Method.cpp.
References Json::Requirement::GetErrors(), Json::Requirement::HasErrors(), Json::ObjectRequirement::Parse(), SetCVMask(), and Json::ObjectRequirement::Validate().
Referenced by SSAGES::ResourceHandler::Build().
|
overridepure virtual |
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::EventListener.
Implemented in SSAGES::ForwardFlux, SSAGES::Basis, SSAGES::ABF, SSAGES::StringMethod, SSAGES::Meta, SSAGES::Umbrella, SSAGES::Swarm, SSAGES::FiniteTempString, SSAGES::ElasticBand, and SSAGES::DirectForwardFlux.
|
overridepure virtual |
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::EventListener.
Implemented in SSAGES::ForwardFlux, SSAGES::Basis, SSAGES::ABF, SSAGES::StringMethod, SSAGES::Meta, and SSAGES::Umbrella.
|
overridepure virtual |
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::EventListener.
Implemented in SSAGES::ForwardFlux, SSAGES::Basis, SSAGES::ABF, SSAGES::StringMethod, SSAGES::Meta, and SSAGES::Umbrella.