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

#include <gromacs/modularsimulator/nosehooverchains.h>

+ Inheritance diagram for gmx::NoseHooverChainsData:
+ Collaboration diagram for gmx::NoseHooverChainsData:

Description

Class holding data used by the Nose-Hoover chains.

As the Trotter update is split in several sub-steps (i.e. is updated by several element instances), the NHC degrees of freedom must be stored centrally rather than by the single elements.

This class manages these extra degrees of freedom. It controls access (making sure that only one element has write access at a time), keeps track of the current time stamp of the dofs, calculates the energy related to the dof at the requested times, and writes the data needed for restarts to checkpoint. As this is not implementing the ISimulatorElement interface, it is not part of the simulator loop, but relies on callbacks to perform its duties.

Public Member Functions

 NoseHooverChainsData (int numTemperatureGroups, real couplingTimeStep, int chainLength, ArrayRef< const real > referenceTemperature, ArrayRef< const real > couplingTime, ArrayRef< const real > numDegreesOfFreedom, NhcUsage nhcUsage)
 Constructor.
 
 NoseHooverChainsData (const NoseHooverChainsData &other)
 Explicit copy constructor (interface has a standard destructor)
 
real applyNhc (int temperatureGroup, double propagationTimeStep, real currentKineticEnergy)
 Propagate the NHC degrees of freedom for a temperature group and return its current velocity scaling value. More...
 
int numTemperatureGroups () const
 The number of temperature groups.
 
bool isAtFullCouplingTimeStep () const
 Whether the NHC degrees of freedom are at a full coupling time step.
 
void saveCheckpointState (std::optional< WriteCheckpointData > checkpointData, const t_commrec *cr) override
 ICheckpointHelperClient write checkpoint implementation.
 
void restoreCheckpointState (std::optional< ReadCheckpointData > checkpointData, const t_commrec *cr) override
 ICheckpointHelperClient read checkpoint implementation.
 
const std::string & clientID () override
 ICheckpointHelperClient key implementation.
 
- Public Member Functions inherited from gmx::ICheckpointHelperClient
virtual ~ICheckpointHelperClient ()=default
 Standard virtual destructor.
 

Static Public Member Functions

static void build (NhcUsage nhcUsage, LegacySimulatorData *legacySimulatorData, ModularSimulatorAlgorithmBuilderHelper *builderHelper, EnergyData *energyData)
 Build object and store in builder helper object.
 
static std::string dataID (NhcUsage nhcUsage)
 Identifier used to store objects.
 

Member Function Documentation

real gmx::NoseHooverChainsData::applyNhc ( int  temperatureGroup,
double  propagationTimeStep,
real  currentKineticEnergy 
)

Propagate the NHC degrees of freedom for a temperature group and return its current velocity scaling value.

Parameters
temperatureGroupThe temperature group to be propagated
propagationTimeStepThe time step by which the DOF are propagated
currentKineticEnergyThe current kinetic energy of the temperature group
Returns
The current velocity scaling value for the temperature group

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