Gromacs  2021.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions
gmx::EnergyData::Element Class Referencefinal

#include <gromacs/modularsimulator/energydata.h>

+ Inheritance diagram for gmx::EnergyData::Element:
+ Collaboration diagram for gmx::EnergyData::Element:


Element for EnergyData.

This member class allows EnergyData to take part in the simulator loop.

It subscribes to the trajectory signaller, the energy signaller, and the logging signaller to know when an energy calculation is needed and when a non-recording step is enough. The simulator builder is responsible to place the element in a location at which a valid energy state is available. The EnergyData::Element is also a subscriber to the trajectory writer element, as it is responsible to write energy data to trajectory.

Public Member Functions

 Element (EnergyData *energyData, bool isMasterRank)
void scheduleTask (Step step, Time time, const RegisterRunFunction &registerRunFunction) override
 Register run function for step / time. More...
void elementSetup () override
 No element setup needed.
void elementTeardown () override
 No element teardown needed.
void saveCheckpointState (std::optional< WriteCheckpointData > checkpointData, const t_commrec *cr) override
 ICheckpointHelperClient write checkpoint implementation.
void restoreCheckpointState (std::optional< ReadCheckpointData > checkpointData, const t_commrec *cr) override
 ICheckpointHelperClient read checkpoint implementation.
const std::string & clientID () override
 ICheckpointHelperClient key implementation.
- Public Member Functions inherited from gmx::ISimulatorElement
virtual ~ISimulatorElement ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::ITrajectoryWriterClient
virtual ~ITrajectoryWriterClient ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::ITrajectorySignallerClient
virtual ~ITrajectorySignallerClient ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::IEnergySignallerClient
virtual ~IEnergySignallerClient ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::ICheckpointHelperClient
virtual ~ICheckpointHelperClient ()=default
 Standard virtual destructor.

Static Public Member Functions

static ISimulatorElementgetElementPointerImpl (LegacySimulatorData *legacySimulatorData, ModularSimulatorAlgorithmBuilderHelper *builderHelper, StatePropagatorData *statePropagatorData, EnergyData *energyData, FreeEnergyPerturbationData *freeEnergyPerturbationData, GlobalCommunicationHelper *globalCommunicationHelper)
 Factory method implementation. More...

Additional Inherited Members

Member Function Documentation

ISimulatorElement * gmx::EnergyData::Element::getElementPointerImpl ( LegacySimulatorData legacySimulatorData,
ModularSimulatorAlgorithmBuilderHelper builderHelper,
StatePropagatorData statePropagatorData,
EnergyData energyData,
FreeEnergyPerturbationData freeEnergyPerturbationData,
GlobalCommunicationHelper globalCommunicationHelper 

Factory method implementation.

legacySimulatorDataPointer allowing access to simulator level data
builderHelperModularSimulatorAlgorithmBuilder helper object
statePropagatorDataPointer to the StatePropagatorData object
energyDataPointer to the EnergyData object
freeEnergyPerturbationDataPointer to the FreeEnergyPerturbationData object
globalCommunicationHelperPointer to the GlobalCommunicationHelper object
Pointer to the element to be added. Element needs to have been stored using storeElement
void gmx::EnergyData::Element::scheduleTask ( Step  step,
Time  time,
const RegisterRunFunction registerRunFunction 

Register run function for step / time.

This needs to be called when the energies are at a full time step. Positioning this element is the responsibility of the programmer.

This is also the place at which the current state becomes the previous state.

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: