Gromacs
2019
|
#include <gromacs/mdrun/runner.h>
Runner object for supporting setup and execution of mdrun.
This class has responsibility for the lifetime of data structures that exist for the life of the simulation, e.g. for logging and communication.
It is also responsible for initializing data members that e.g. correspond to values potentially set by commmand-line options. Later these will be obtained directly from modules, and the results of command-line option handling returned directly to the modules, rather than propagated to them by data members of this class.
Public Member Functions | |
int | mdrunner () |
Driver routine, that calls the different simulation methods. More... | |
void | addPotential (std::shared_ptr< IRestraintPotential > restraint, std::string name) |
Add a potential to be evaluated during MD integration. More... | |
t_commrec * | spawnThreads (int numThreadsToLaunch) const |
Called when thread-MPI spawns threads. More... | |
Mdrunner | cloneOnSpawnedThread () const |
Initializes a new Mdrunner from the master. More... | |
Mdrunner (const Mdrunner &)=delete | |
Copy not allowed. More... | |
Mdrunner & | operator= (const Mdrunner &)=delete |
Mdrunner (Mdrunner &&handle) noexcept | |
Mdrunner objects can be passed by value via move semantics. More... | |
Mdrunner & | operator= (Mdrunner &&handle) noexcept(BUGFREE_NOEXCEPT_STRING) |
|
delete |
Copy not allowed.
An Mdrunner has unique resources and it is not clear whether any of one of those resources should be duplicated or shared unless the specific use case is known. Either build a fresh runner or use a helper function for clearly indicated behavior. API clarification may allow unambiguous initialization by copy in future versions.
|
defaultnoexcept |
Mdrunner objects can be passed by value via move semantics.
handle | runner instance to be moved from. |
void gmx::Mdrunner::addPotential | ( | std::shared_ptr< IRestraintPotential > | restraint, |
std::string | name | ||
) |
Add a potential to be evaluated during MD integration.
restraint | MD restraint potential to apply |
name | User-friendly plain-text name to uniquely identify the puller |
This implementation attaches an object providing the gmx::IRestraintPotential interface.
Mdrunner gmx::Mdrunner::cloneOnSpawnedThread | ( | ) | const |
int gmx::Mdrunner::mdrunner | ( | ) |
Driver routine, that calls the different simulation methods.
Currently, thread-MPI does not spawn threads until during mdrunner() and parallelism is not initialized until some time during this call...
t_commrec * gmx::Mdrunner::spawnThreads | ( | int | numThreadsToLaunch | ) | const |
Called when thread-MPI spawns threads.
Start thread-MPI threads.
Called by mdrunner() to start a specific number of threads (including the main thread) for thread-parallel runs. This in turn calls mdrunner() for each thread. All options are the same as for mdrunner().