Gromacs
2020.2
|
#include <gromacs/modularsimulator/computeglobalselement.h>
Encapsulate the calls to compute_globals
This element aims at offering an interface to the legacy implementation which is compatible with the new simulator approach.
The element comes in 3 (templated) flavors: the leap-frog case, the first call during a velocity-verlet integrator, and the second call during a velocity-verlet integrator. In velocity verlet, the state at the beginning of the step corresponds to positions at time t velocities at time t - dt/2 The first velocity propagation (+dt/2) therefore actually corresponds to the previous step, bringing the state to the full timestep at time t. Most global reductions are made at this point. The second call is needed to correct the constraint virial after the second propagation of velocities (+dt/2) and of the positions (+dt).
algorithm | The global reduction scheme |
Public Member Functions | |
ComputeGlobalsElement (StatePropagatorData *statePropagatorData, EnergyElement *energyElement, FreeEnergyPerturbationElement *freeEnergyPerturbationElement, SimulationSignals *signals, int nstglobalcomm, FILE *fplog, const MDLogger &mdlog, t_commrec *cr, t_inputrec *inputrec, const MDAtoms *mdAtoms, t_nrnb *nrnb, gmx_wallcycle *wcycle, t_forcerec *fr, const gmx_mtop_t *global_top, Constraints *constr, bool hasReadEkinState) | |
Constructor. | |
~ComputeGlobalsElement () override | |
Destructor. | |
void | elementSetup () override |
Element setup - first call to compute_globals. More... | |
void | scheduleTask (Step step, Time time, const RegisterRunFunctionPtr ®isterRunFunction) override |
Register run function for step / time. More... | |
CheckBondedInteractionsCallbackPtr | getCheckNumberOfBondedInteractionsCallback () |
Get callback to request checking of bonded interactions. | |
void | elementTeardown () override |
No element teardown needed. | |
|
overridevirtual |
Element setup - first call to compute_globals.
Implements gmx::ISimulatorElement.
|
overridevirtual |
Register run function for step / time.
This registers the call to compute_globals when needed.
step | The step number |
time | The time |
registerRunFunction | Function allowing to register a run function |
Implements gmx::ISimulatorElement.