Gromacs  2021.3
 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::VelocityScalingTemperatureCoupling Class Referencefinal

#include <gromacs/modularsimulator/velocityscalingtemperaturecoupling.h>

+ Inheritance diagram for gmx::VelocityScalingTemperatureCoupling:
+ Collaboration diagram for gmx::VelocityScalingTemperatureCoupling:


Element implementing the a velocity-scaling thermostat.

This element takes a callback to the propagator and updates the velocity scaling factor according to the internal temperature coupling implementation.

Note that the concrete implementation is handled by the concrete implementations of the ITemperatureCouplingImpl interface, while the element handles the scheduling and interfacing with other elements.

Public Member Functions

 VelocityScalingTemperatureCoupling (int nstcouple, int offset, UseFullStepKE useFullStepKE, ReportPreviousStepConservedEnergy reportPreviousConservedEnergy, int64_t seed, int numTemperatureGroups, double couplingTimeStep, const real *referenceTemperature, const real *couplingTime, const real *numDegreesOfFreedom, EnergyData *energyData, TemperatureCouplingType couplingType)
void scheduleTask (Step step, Time time, const RegisterRunFunction &registerRunFunction) override
 Register run function for step / time. More...
void elementSetup () override
 Sanity check at setup time.
void elementTeardown () override
 No element teardown needed.
real conservedEnergyContribution () const
 Contribution to the conserved energy (called by energy data)
void connectWithPropagator (const PropagatorThermostatConnection &connectionData)
 Connect this to propagator.
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::ISimulatorElement
virtual ~ISimulatorElement ()=default
 Standard virtual destructor.
- Public Member Functions inherited from gmx::ICheckpointHelperClient
virtual ~ICheckpointHelperClient ()=default
 Standard virtual destructor.

Static Public Member Functions

static ISimulatorElementgetElementPointerImpl (LegacySimulatorData *legacySimulatorData, ModularSimulatorAlgorithmBuilderHelper *builderHelper, StatePropagatorData *statePropagatorData, EnergyData *energyData, FreeEnergyPerturbationData *freeEnergyPerturbationData, GlobalCommunicationHelper *globalCommunicationHelper, int offset, UseFullStepKE useFullStepKE, ReportPreviousStepConservedEnergy reportPreviousStepConservedEnergy)
 Factory method implementation. More...

Member Function Documentation

ISimulatorElement * gmx::VelocityScalingTemperatureCoupling::getElementPointerImpl ( LegacySimulatorData legacySimulatorData,
ModularSimulatorAlgorithmBuilderHelper builderHelper,
StatePropagatorData statePropagatorData,
EnergyData energyData,
FreeEnergyPerturbationData freeEnergyPerturbationData,
GlobalCommunicationHelper globalCommunicationHelper,
int  offset,
UseFullStepKE  useFullStepKE,
ReportPreviousStepConservedEnergy  reportPreviousStepConservedEnergy 

Factory method implementation.

legacySimulatorDataPointer allowing access to simulator level data
builderHelperModularSimulatorAlgorithmBuilder helper object
statePropagatorDataPointer to the StatePropagatorData object
energyDataPointer to the EnergyData object
freeEnergyPerturbationDataPointer to the FreeEnergyPerturbationData object
globalCommunicationHelperPointer to the GlobalCommunicationHelper object
offsetThe step offset at which the thermostat is applied
useFullStepKEWhether full step or half step KE is used
reportPreviousStepConservedEnergyReport the previous or the current step conserved energy
Pointer to the element to be added. Element needs to have been stored using storeElement
void gmx::VelocityScalingTemperatureCoupling::scheduleTask ( Step  step,
Time  time,
const RegisterRunFunction registerRunFunction 

Register run function for step / time.

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: