|
SSAGES
0.1
A MetaDynamics Package
|
Class that handles SSAGES resources for a simulation. More...
#include <ResourceHandler.h>
Public Member Functions | |
| ResourceHandler (mxx::comm &&world, mxx::comm &&comm, uint walkerid, const std::vector< class Method * > &methods, class CVManager *cvmanager) | |
| Constructor. More... | |
| std::string | GetInput () const |
| MPI_Comm | GetLocalComm () const |
| MPI_Comm | GetWorldComm () const |
| const mxx::comm & | GetLocalMxxComm () const |
| const mxx::comm & | GetWorldMxxComm () const |
| uint | GetWalkerID () const |
| uint | GetNumWalkers () const |
| void | ConfigureHook (class Hook *hook) |
| ~ResourceHandler () | |
| Destructor. | |
Static Public Member Functions | |
| static ResourceHandler * | Build (const Json::Value &json, const MPI_Comm &world) |
| Build a new ResourceHandler from JSON. More... | |
Private Attributes | |
| mxx::comm | world_ |
| MPI communicator containing all processors. | |
| mxx::comm | comm_ |
| MPI communicator containing processors for specific walker. | |
| uint | walkerid_ |
| Walker ID for specific driver. | |
| uint | nwalkers_ |
| Number of walkers. | |
| class Snapshot * | snapshot_ |
| Snapshot of system state (pointer). | |
| std::vector< class Method * > | methods_ |
| Vector of advanced sampling methods. | |
| class Logger * | logger_ |
| CV logger. | |
| class CVManager * | cvmanager_ |
| Collective variable manager. | |
| class Hook * | hook_ |
| Hook pointer. | |
| std::vector< std::string > | inputs_ |
| Input file vector. | |
Class that handles SSAGES resources for a simulation.
ResourceHandler is responsible for intialzing the major components of a simulation including the engine, methods, and collective variables. It is also responsible for the lifetime of the objects it creates.
Each simulation engine must implement a driver which calls this resource handler and passes it the appropriate hook.
Definition at line 44 of file ResourceHandler.h.
| SSAGES::ResourceHandler::ResourceHandler | ( | mxx::comm && | world, |
| mxx::comm && | comm, | ||
| uint | walkerid, | ||
| const std::vector< class Method * > & | methods, | ||
| class CVManager * | cvmanager | ||
| ) |
Constructor.
| world | MPI communicator containing all processors. |
| comm | MPI communicator containing walker-specific processors. |
| walkerid | ID of the walker for the current processor. |
| methods | Vector of pointers to methods. |
| CVManager | Pointer to CV manager. |
Definition at line 35 of file ResourceHandler.cpp.
References comm_, and snapshot_.
Referenced by Build().

|
static |
Build a new ResourceHandler from JSON.
| json | JSON root node containing driver (and children) specifications. |
| world | MPI communicator containing all processors. |
Definition at line 54 of file ResourceHandler.cpp.
References SSAGES::CVManager::AddCVtoMap(), SSAGES::Logger::Build(), SSAGES::CollectiveVariable::BuildCV(), SSAGES::Method::BuildMethod(), Json::Requirement::GetErrors(), Json::Requirement::HasErrors(), Json::ObjectRequirement::Parse(), ResourceHandler(), and Json::ObjectRequirement::Validate().

1.8.7