Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::ComputeGlobalsElement< algorithm > Class Template Referencefinal

#include <gromacs/modularsimulator/computeglobalselement.h>

+ Inheritance diagram for gmx::ComputeGlobalsElement< algorithm >:
+ Collaboration diagram for gmx::ComputeGlobalsElement< algorithm >:


template<ComputeGlobalsAlgorithm algorithm>
class gmx::ComputeGlobalsElement< algorithm >

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).

Template Parameters
algorithmThe 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)
 ~ComputeGlobalsElement () override
void elementSetup () override
 Element setup - first call to compute_globals. More...
void scheduleTask (Step step, Time time, const RegisterRunFunctionPtr &registerRunFunction) 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.

Member Function Documentation

template<ComputeGlobalsAlgorithm algorithm>
void gmx::ComputeGlobalsElement< algorithm >::elementSetup ( )

Element setup - first call to compute_globals.

Implements gmx::ISimulatorElement.

template<ComputeGlobalsAlgorithm algorithm>
void gmx::ComputeGlobalsElement< algorithm >::scheduleTask ( Step  step,
Time  time,
const RegisterRunFunctionPtr registerRunFunction 

Register run function for step / time.

This registers the call to compute_globals when needed.

stepThe step number
timeThe time
registerRunFunctionFunction allowing to register a run function

Implements gmx::ISimulatorElement.

The documentation for this class was generated from the following files: