SSAGES
0.9.3
Software Suite for Advanced General Ensemble Simulations
|
Interface for Method implementations. More...
#include <Method.h>
Public Member Functions | |
Method (unsigned int 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< 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 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... | |
Protected Attributes | |
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. | |
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 40 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::StringMethod, SSAGES::ForwardFlux, SSAGES::Umbrella, SSAGES::Swarm, SSAGES::Meta, SSAGES::FiniteTempString, SSAGES::ElasticBand, SSAGES::DirectForwardFlux, SSAGES::CFF, SSAGES::BFS, SSAGES::ANN, and SSAGES::ABF.
|
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::Umbrella, SSAGES::StringMethod, SSAGES::Meta, SSAGES::ForwardFlux, SSAGES::CFF, SSAGES::BFS, SSAGES::ANN, and SSAGES::ABF.
|
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::Umbrella, SSAGES::StringMethod, SSAGES::Meta, SSAGES::ForwardFlux, SSAGES::CFF, SSAGES::BFS, SSAGES::ANN, and SSAGES::ABF.
|
inline |
Sets the collective variable mask.
mask | Vector mask which contains the indices of which CV to include in the container. |
This function sets the Snapshot's CV mask.
Definition at line 99 of file Method.h.
References cvmask_.
Referenced by BuildMethod().