Gromacs  2024.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::Propagator< integrationStage > Class Template Referencefinal

#include <gromacs/modularsimulator/propagator.h>

+ Inheritance diagram for gmx::Propagator< integrationStage >:
+ Collaboration diagram for gmx::Propagator< integrationStage >:

Description

template<IntegrationStage integrationStage>
class gmx::Propagator< integrationStage >

Propagator element.

The propagator element can, through templating, cover the different propagation types used in NVE MD. The combination of templating, static functions, and having only the inner-most operations in the static functions allows to have performance comparable to fused update elements while keeping easily re-orderable single instructions.

Template Parameters
integrationStepThe integration types

Public Member Functions

 Propagator (double timestep, StatePropagatorData *statePropagatorData, const MDAtoms *mdAtoms, gmx_wallcycle *wcycle)
 Constructor.
 
void scheduleTask (Step step, Time time, const RegisterRunFunction &registerRunFunction) override
 Register run function for step / time. More...
 
void elementSetup () override
 No element setup needed.
 
void elementTeardown () override
 No element teardown needed.
 
void setNumVelocityScalingVariables (int numVelocityScalingVariables, ScaleVelocities scaleVelocities)
 Set the number of velocity scaling variables.
 
void setNumPositionScalingVariables (int numPositionScalingVariables)
 Set the number of position scaling variables.
 
ArrayRef< realviewOnStartVelocityScaling ()
 Get view on the scaling vector applied to start of step velocities.
 
ArrayRef< realviewOnEndVelocityScaling ()
 Get view on the scaling vector applied to end of step velocities.
 
ArrayRef< realviewOnPositionScaling ()
 Get view on the scaling vector applied to the positions.
 
PropagatorCallback velocityScalingCallback ()
 Get velocity scaling callback.
 
PropagatorCallback positionScalingCallback ()
 Get position scaling callback.
 
Matrix3x3viewOnPRScalingMatrix ()
 Get view on the full PR scaling matrix.
 
PropagatorCallback prScalingCallback ()
 Get PR scaling callback.
 
- Public Member Functions inherited from gmx::ISimulatorElement
virtual ~ISimulatorElement ()=default
 Standard virtual destructor.
 

Static Public Member Functions

static ISimulatorElementgetElementPointerImpl (LegacySimulatorData *legacySimulatorData, ModularSimulatorAlgorithmBuilderHelper *builderHelper, StatePropagatorData *statePropagatorData, EnergyData *energyData, FreeEnergyPerturbationData *freeEnergyPerturbationData, GlobalCommunicationHelper *globalCommunicationHelper, ObservablesReducer *observablesReducer, const PropagatorTag &propagatorTag, TimeStep timestep)
 Factory method implementation. More...
 
static ISimulatorElementgetElementPointerImpl (LegacySimulatorData *legacySimulatorData, ModularSimulatorAlgorithmBuilderHelper *builderHelper, StatePropagatorData *statePropagatorData, EnergyData *energyData, FreeEnergyPerturbationData *freeEnergyPerturbationData, GlobalCommunicationHelper *globalCommunicationHelper, ObservablesReducer *observablesReducer, const PropagatorTag &propagatorTag)
 Factory method implementation. More...
 

Member Function Documentation

template<IntegrationStage integrationStage>
static ISimulatorElement* gmx::Propagator< integrationStage >::getElementPointerImpl ( LegacySimulatorData legacySimulatorData,
ModularSimulatorAlgorithmBuilderHelper builderHelper,
StatePropagatorData statePropagatorData,
EnergyData energyData,
FreeEnergyPerturbationData freeEnergyPerturbationData,
GlobalCommunicationHelper globalCommunicationHelper,
ObservablesReducer observablesReducer,
const PropagatorTag propagatorTag,
TimeStep  timestep 
)
static

Factory method implementation.

Parameters
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
observablesReducerPointer to the ObservablesReducer object
propagatorTagThe name of the propagator to simplify connection
timestepThe time step the propagator uses
Returns
Pointer to the element to be added. Element needs to have been stored using storeElement
template<IntegrationStage integrationStage>
static ISimulatorElement* gmx::Propagator< integrationStage >::getElementPointerImpl ( LegacySimulatorData legacySimulatorData,
ModularSimulatorAlgorithmBuilderHelper builderHelper,
StatePropagatorData statePropagatorData,
EnergyData energyData,
FreeEnergyPerturbationData freeEnergyPerturbationData,
GlobalCommunicationHelper globalCommunicationHelper,
ObservablesReducer observablesReducer,
const PropagatorTag propagatorTag 
)
static

Factory method implementation.

Version without time step for pure scaling elements

Parameters
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
observablesReducerPointer to the ObservablesReducer object
propagatorTagThe name of the propagator to simplify connection
Returns
Pointer to the element to be added. Element needs to have been stored using storeElement
template<IntegrationStage integrationStage>
void gmx::Propagator< integrationStage >::scheduleTask ( Step  step,
Time  time,
const RegisterRunFunction registerRunFunction 
)
overridevirtual

Register run function for step / time.

This function will determine the required flavor of the run function to be registered for the current step. In case of the pure scaling integrator stage, it might also skip the function registration if no scaling is needed.

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: