Gromacs
2024.3
|
#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.
Classes | |
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) | |
Constructor. | |
~StatePropagatorData () | |
Destructor (allows forward declaration of internal type) | |
ArrayRefWithPadding< RVec > | positionsView () |
Get write access to position vector. | |
ArrayRefWithPadding< const RVec > | constPositionsView () const |
Get read access to position vector. | |
ArrayRefWithPadding< RVec > | previousPositionsView () |
Get write access to previous position vector. | |
ArrayRefWithPadding< const RVec > | constPreviousPositionsView () const |
Get read access to previous position vector. | |
ArrayRefWithPadding< RVec > | velocitiesView () |
Get write access to velocity vector. | |
ArrayRefWithPadding< const RVec > | constVelocitiesView () const |
Get read access to velocity vector. | |
ForceBuffersView & | forcesView () |
Get write access to force vector. | |
const ForceBuffersView & | constForcesView () const |
Get read access to force vector. | |
rvec * | box () |
Get pointer to box. | |
const rvec * | constBox () const |
Get const pointer to box. | |
rvec * | previousBox () |
Get pointer to previous box. | |
const rvec * | constPreviousBox () 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. | |
Element * | element () |
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. | |