Gromacs  2025-dev-20241003-bd59e46
 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:

Description

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 &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::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

Member Function Documentation

void gmx::TrajectoryElement::elementSetup ( )
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.

void gmx::TrajectoryElement::elementTeardown ( )
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.

void gmx::TrajectoryElement::scheduleTask ( Step  step,
Time  time,
const RegisterRunFunction registerRunFunction 
)
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

Parameters
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: