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

#include <gromacs/modularsimulator/trajectoryelement.h>

+ Inheritance diagram for gmx::TrajectoryElement:
+ Collaboration diagram for gmx::TrajectoryElement:


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

void signallerSetup () override
 Prepare signaller. More...
void signal (Step step, Time time) override
 Run the signaller at a specific step / time. More...
void elementSetup () override
 Prepare trajectory writer. More...
void scheduleTask (Step step, Time time, const RegisterRunFunctionPtr &registerRunFunction) 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::ISignaller
virtual ~ISignaller ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::ILastStepSignallerClient
virtual ~ILastStepSignallerClient ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::ILoggingSignallerClient
virtual ~ILoggingSignallerClient ()=default
 Standard virtual destructor.


class TrajectoryElementBuilder

Additional Inherited Members

Member Function Documentation

void gmx::TrajectoryElement::elementSetup ( )

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.

void gmx::TrajectoryElement::elementTeardown ( )

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.

void gmx::TrajectoryElement::scheduleTask ( Step  step,
Time  time,
const RegisterRunFunctionPtr registerRunFunction 

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

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

Implements gmx::ISimulatorElement.

void gmx::TrajectoryElement::signal ( Step  step,
Time  time 

Run the signaller at a specific step / time.

Informs clients when energy or state will be written.

stepThe current time step
timeThe current time

Implements gmx::ISignaller.

void gmx::TrajectoryElement::signallerSetup ( )

Prepare signaller.

Check that necessary registration was done

Implements gmx::ISignaller.

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