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

#include <gromacs/modularsimulator/statepropagatordata.h>


StatePropagatorData and associated data.

The StatePropagatorData contains a little more than the pure statistical-physical micro state, namely the positions, velocities, forces, and box matrix, as well as a backup of the positions and box of the last time step. While it takes part in the simulator loop via its member class Element to be able to backup positions / boxes and save the current state if needed, it's main purpose is to offer access to its data via getter methods. All elements reading or writing to this data need a pointer to the StatePropagatorData and need to request their data explicitly. This will later simplify the understanding of data dependencies between elements.

Note that the StatePropagatorData can be converted to and from the legacy t_state object. This is useful when dealing with functionality which has not yet been adapted to use the new data approach - of the elements currently implemented, only domain decomposition, PME load balancing, and the initial constraining are using this.


class  Element
 Element for StatePropagatorData. More...
class  ReferenceTemperatureHelper
 Helper object to scale velocities according to reference temperature change. More...

Public Member Functions

 StatePropagatorData (int numAtoms, FILE *fplog, const t_commrec *cr, t_state *globalState, t_state *localState, bool useGPU, bool canMoleculesBeDistributedOverPBC, bool writeFinalConfiguration, const std::string &finalConfigurationFilename, const t_inputrec *inputrec, const t_mdatoms *mdatoms, const gmx_mtop_t &globalTop)
 ~StatePropagatorData ()
 Destructor (allows forward declaration of internal type)
ArrayRefWithPadding< RVecpositionsView ()
 Get write access to position vector.
ArrayRefWithPadding< const RVecconstPositionsView () const
 Get read access to position vector.
ArrayRefWithPadding< RVecpreviousPositionsView ()
 Get write access to previous position vector.
ArrayRefWithPadding< const RVecconstPreviousPositionsView () const
 Get read access to previous position vector.
ArrayRefWithPadding< RVecvelocitiesView ()
 Get write access to velocity vector.
ArrayRefWithPadding< const RVecconstVelocitiesView () const
 Get read access to velocity vector.
ForceBuffersViewforcesView ()
 Get write access to force vector.
const ForceBuffersViewconstForcesView () const
 Get read access to force vector.
rvecbox ()
 Get pointer to box.
const rvecconstBox () const
 Get const pointer to box.
rvecpreviousBox ()
 Get pointer to previous box.
const rvecconstPreviousBox () const
 Get const pointer to previous box.
int localNumAtoms () const
 Get the local number of atoms.
int totalNumAtoms () const
 Get the total number of atoms.
Elementelement ()
 Get pointer to element (whose lifetime is managed by this)
void setup ()
 Initial set up for the associated element.
void updateReferenceTemperature (ArrayRef< const real > temperatures, ReferenceTemperatureChangeAlgorithm algorithm)
 Update the reference temperature.

Static Public Member Functions

static void readCheckpointToTrxFrame (t_trxframe *trxFrame, ReadCheckpointData readCheckpointData)
 Read everything that can be stored in t_trxframe from a checkpoint file.
static const std::string & checkpointID ()
 CheckpointHelper identifier.

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