Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gmx::anonymous_namespace{freeenergyparameters.cpp} Namespace Reference

Functions

gmx::EnumerationArray
< FreeEnergyPerturbationCouplingType,
real
lambdasAtState (const int stateIndex, gmx::ArrayRef< const std::vector< double >> lambdaArray, const int lambdaArrayExtent)
 
double currentGlobalLambda (const int64_t step, const double deltaLambdaPerStep, const int initialFEPStateIndex, const double initialLambda, const int lambdaArrayExtent)
 Evaluates where in the lambda arrays we are at currently. More...
 
gmx::EnumerationArray
< FreeEnergyPerturbationCouplingType,
real
interpolatedLambdas (const double currentGlobalLambda, gmx::ArrayRef< const std::vector< double >> lambdaArray, const int lambdaArrayExtent)
 Returns an array of lambda values from linear interpolation of a lambda value matrix. More...
 

Function Documentation

double gmx::anonymous_namespace{freeenergyparameters.cpp}::currentGlobalLambda ( const int64_t  step,
const double  deltaLambdaPerStep,
const int  initialFEPStateIndex,
const double  initialLambda,
const int  lambdaArrayExtent 
)

Evaluates where in the lambda arrays we are at currently.

Parameters
[in]stepthe current simulation step
[in]deltaLambdaPerStepthe change of the overall controlling lambda parameter per step
[in]initialFEPStateIndexthe FEP state at the start of the simulation. -1 if not set.
[in]initialLambdathe lambda at the start of the simulation . -1 if not set.
[in]lambdaArrayExtenthow many lambda values we have
Returns
a number that reflects where in the lambda arrays we are at the moment
gmx::EnumerationArray<FreeEnergyPerturbationCouplingType, real> gmx::anonymous_namespace{freeenergyparameters.cpp}::interpolatedLambdas ( const double  currentGlobalLambda,
gmx::ArrayRef< const std::vector< double >>  lambdaArray,
const int  lambdaArrayExtent 
)

Returns an array of lambda values from linear interpolation of a lambda value matrix.

Note
If there is nothing to interpolate, fills the array with max(0,currentGlobalLambda).
Returns array boundary values if currentGlobalLambda <0 or >1 .
Parameters
[in]currentGlobalLambdadetermines at which position in the lambda array to interpolate
[in]lambdaArrayarray of lambda values
[in]lambdaArrayExtentnumber of lambda values