Gromacs
2024.4
|
#include <gromacs/modularsimulator/energydata.h>
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 isMainRank, int freeEnergyCalculationPeriod) | |
Constructor. | |
void | scheduleTask (Step step, Time time, const RegisterRunFunction ®isterRunFunction) 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 ISimulatorElement * | getElementPointerImpl (LegacySimulatorData *legacySimulatorData, ModularSimulatorAlgorithmBuilderHelper *builderHelper, StatePropagatorData *statePropagatorData, EnergyData *energyData, FreeEnergyPerturbationData *freeEnergyPerturbationData, GlobalCommunicationHelper *globalCommunicationHelper, ObservablesReducer *observablesReducer) |
Factory method implementation. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from gmx::ITrajectoryWriterClient | |
virtual void | trajectoryWriterTeardown (gmx_mdoutf *outf)=0 |
Teardown method with valid output pointer. | |
|
static |
Factory method implementation.
legacySimulatorData | Pointer allowing access to simulator level data |
builderHelper | ModularSimulatorAlgorithmBuilder helper object |
statePropagatorData | Pointer to the StatePropagatorData object |
energyData | Pointer to the EnergyData object |
freeEnergyPerturbationData | Pointer to the FreeEnergyPerturbationData object |
globalCommunicationHelper | Pointer to the GlobalCommunicationHelper object |
observablesReducer | Pointer to the ObservablesReducer object |
storeElement
|
overridevirtual |
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.
step | The step number |
time | The time |
registerRunFunction | Function allowing to register a run function |
Implements gmx::ISimulatorElement.