SSAGES
0.1
A MetaDynamics Package
|
Umbrella sampling method. More...
#include <Umbrella.h>
Public Member Functions | |
Umbrella (const MPI_Comm &world, const MPI_Comm &comm, const std::vector< double > &kspring, const std::vector< double > ¢ers, std::string name, unsigned int frequency) | |
Constructor. More... | |
Umbrella (const MPI_Comm &world, const MPI_Comm &comm, const std::vector< double > &kspring, const std::vector< double > ¢ers0, const std::vector< double > ¢ers1, int timesteps, std::string name, 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 | SetOutputFrequency (int outfreq) |
Set output frequency. More... | |
void | SetAppend (bool append) |
Set append mode. More... | |
![]() | |
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 Umbrella * | 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 | |
double | GetCurrentCenter (int iteration, unsigned i) |
void | PrintUmbrella (const CVList &cvs, uint iteration) |
Print umbrella values. More... | |
Private Attributes | |
std::vector< double > | kspring_ |
Vector of spring constants. | |
std::vector< double > | centers0_ |
Vector of equilibrium distances. | |
std::vector< double > | centers1_ |
int | time_ |
Amount of time over which to scale centers. | |
std::string | filename_ |
Output filename. | |
int | outfreq_ |
Frequency of outputting data. | |
std::ofstream | umbrella_ |
Output stream for umbrella data. | |
bool | append_ |
Append to output files? | |
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. | |
Umbrella sampling method.
Umbrella sampling method to constrain an arbitrary number of CVs at specified equilibrium distances.
Definition at line 35 of file Umbrella.h.
|
inline |
Constructor.
world | MPI global communicator. |
comm | MPI local communicator. |
kspring | List of spring constants. |
centers | List of spring equilibrium positions. |
name | Filename. |
frequency | Frequency with which this method is applied. |
Create instance of umbrella with spring constants "kspring", and centers "centers". Note the sizes of the vectors should be commensurate with the number of CVs.
Definition at line 89 of file Umbrella.h.
|
inline |
Constructor.
world | MPI global communicator. |
comm | MPI local communicator. |
kspring | List of spring constants. |
centers0 | List of starting spring equilibrium positions. |
centers1 | List of ending spring equilibrium positions. |
timesteps | Number of timesteps over which to scale centers. |
name | Filename. |
frequency | Frequency with which this method is applied. |
Create instance of umbrella with spring constants "kspring", and centers "centers". Note the sizes of the vectors should be commensurate with the number of CVs.
Definition at line 115 of file Umbrella.h.
|
static |
Definition at line 113 of file Umbrella.cpp.
References Json::Requirement::GetErrors(), Json::Requirement::HasErrors(), Json::ObjectRequirement::Parse(), SetAppend(), SetOutputFrequency(), and Json::ObjectRequirement::Validate().
|
overridevirtual |
Post-integration hook.
snapshot | Simulation snapshot. |
cvmanager | Collective variable manager. |
Implements SSAGES::Method.
Definition at line 57 of file Umbrella.cpp.
References SSAGES::CVManager::GetCVs(), SSAGES::Snapshot::GetForces(), SSAGES::Snapshot::GetHMatrix(), SSAGES::Snapshot::GetIteration(), and SSAGES::Snapshot::GetVirial().
|
overridevirtual |
Post-simulation hook.
snapshot | Simulation snapshot. |
cvmanager | Collective variable manager. |
Implements SSAGES::Method.
Definition at line 87 of file Umbrella.cpp.
|
overridevirtual |
Pre-simulation hook.
snapshot | Simulation snapshot. |
cvmanager | Collective variable manager. |
Implements SSAGES::Method.
Definition at line 33 of file Umbrella.cpp.
References SSAGES::CVManager::GetCVs().
|
private |
Print umbrella values.
cvs | List of CVs. |
iteration | Current iteration. |
Definition at line 93 of file Umbrella.cpp.
|
inline |
Set append mode.
append | Whether to enable or disable append mode. |
Definition at line 162 of file Umbrella.h.
References append_.
Referenced by Build().
|
inline |
Set output frequency.
iter | New value for output frequency. |
Definition at line 153 of file Umbrella.h.
References outfreq_.
Referenced by Build().