Gromacs
2021-beta2-UNCHECKED
|
#include <gromacs/modularsimulator/trajectoryelement.h>
Trajectory element signals and handles trajectory writing.
The trajectory element is both a signaller and a simulator element.
During signalling phase, it checks whether the current step is a writing step for either the energy or the state (position, velocity, forces) trajectory. It then notifies the signaller clients of the upcoming step.
For the simulator run, the element registers a run function at trajectory writing steps. Trajectory writing is done using a client system - the element only prepares the output struct, and passes it to the clients who write their part of the trajectory.
Public Member Functions | |
int | tngBoxOut () const |
Get the box writeout frequency for TNG. | |
int | tngLambdaOut () const |
Get the lambda writeout frequency for TNG. | |
int | tngBoxOutCompressed () const |
Get the compressed box writeout frequency for TNG. | |
int | tngLambdaOutCompressed () const |
Get the compressed lambda writeout frequency for TNG. | |
void | elementSetup () override |
Prepare trajectory writer. More... | |
void | scheduleTask (Step step, Time time, const RegisterRunFunction ®isterRunFunction) override |
Register run function for step / time. More... | |
void | elementTeardown () override |
Teardown trajectory writer. More... | |
Public Member Functions inherited from gmx::ISimulatorElement | |
virtual | ~ISimulatorElement ()=default |
Standard virtual destructor. | |
Public Member Functions inherited from gmx::ILoggingSignallerClient | |
virtual | ~ILoggingSignallerClient ()=default |
Standard virtual destructor. | |
Public Member Functions inherited from gmx::ITrajectorySignallerClient | |
virtual | ~ITrajectorySignallerClient ()=default |
Standard virtual destructor. | |
Friends | |
class | TrajectoryElementBuilder |
Additional Inherited Members |
|
overridevirtual |
Prepare trajectory writer.
During setup, the trajectory writer will query the writer clients for their callbacks. It will also call the setup methods of the different clients. To be run before the main simulator run, but after all clients were registered.
Implements gmx::ISimulatorElement.
|
overridevirtual |
Teardown trajectory writer.
During teardown, the trajectory writer will call the teardown methods of the clients and perform some additional clean-up. To be run after the main simulator run.
Implements gmx::ISimulatorElement.
|
overridevirtual |
Register run function for step / time.
Registers a trajectory writing function if the current step / time is either a state or energy writing step, as defined by the signaller
step | The step number |
time | The time |
registerRunFunction | Function allowing to register a run function |
Implements gmx::ISimulatorElement.