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

Functions

int64_t calcTargetUpdateInterval (const AwhParams &awhParams, const AwhBiasParams &awhBiasParams)
 Determines the interval for updating the target distribution. More...
 
int64_t calcCheckCoveringInterval (const AwhParams &awhParams, const std::vector< DimParams > &dimParams, const std::vector< GridAxis > &gridAxis)
 Determines the step interval for checking for covering. More...
 
double gaussianGeometryFactor (gmx::ArrayRef< const double > xArray)
 Returns an approximation of the geometry factor used for initializing the AWH update size. More...
 
double getInitialHistogramSizeEstimate (const std::vector< DimParams > &dimParams, const AwhBiasParams &awhBiasParams, const std::vector< GridAxis > &gridAxis, double beta, double samplingTimestep)
 Estimate a reasonable initial reference weight histogram size. More...
 
int getNumSharedUpdate (const AwhBiasParams &awhBiasParams, int numSharingSimulations)
 Returns the number of simulations sharing bias updates. More...
 

Function Documentation

int64_t gmx::anonymous_namespace{biasparams.cpp}::calcCheckCoveringInterval ( const AwhParams &  awhParams,
const std::vector< DimParams > &  dimParams,
const std::vector< GridAxis > &  gridAxis 
)

Determines the step interval for checking for covering.

Parameters
[in]awhParamsAWH parameters.
[in]dimParamsParameters for the dimensions of the coordinate.
[in]gridAxisThe Grid axes.
Returns
the check interval in steps.
int64_t gmx::anonymous_namespace{biasparams.cpp}::calcTargetUpdateInterval ( const AwhParams &  awhParams,
const AwhBiasParams &  awhBiasParams 
)

Determines the interval for updating the target distribution.

The interval value is based on the target distrbution type (this could be made a user-option but there is most likely no big need for tweaking this for most users).

Parameters
[in]awhParamsAWH parameters.
[in]awhBiasParamsBias parameters.
Returns
the target update interval in steps.
double gmx::anonymous_namespace{biasparams.cpp}::gaussianGeometryFactor ( gmx::ArrayRef< const double >  xArray)

Returns an approximation of the geometry factor used for initializing the AWH update size.

The geometry factor is defined as the following sum of Gaussians: sum_{k!=0} exp(-0.5*(k*pi*x)^2)/(pi*k)^2, where k is a xArray.size()-dimensional integer vector with k_i in {0,1,..}.

Parameters
[in]xArrayArray to evaluate.
Returns
the geometry factor.
double gmx::anonymous_namespace{biasparams.cpp}::getInitialHistogramSizeEstimate ( const std::vector< DimParams > &  dimParams,
const AwhBiasParams &  awhBiasParams,
const std::vector< GridAxis > &  gridAxis,
double  beta,
double  samplingTimestep 
)

Estimate a reasonable initial reference weight histogram size.

Parameters
[in]dimParamsParameters for the dimensions of the coordinate.
[in]awhBiasParamsBias parameters.
[in]gridAxisThe Grid axes.
[in]beta1/(k_B T).
[in]samplingTimestepSampling frequency of probability weights.
Returns
estimate of initial histogram size.
int gmx::anonymous_namespace{biasparams.cpp}::getNumSharedUpdate ( const AwhBiasParams &  awhBiasParams,
int  numSharingSimulations 
)

Returns the number of simulations sharing bias updates.

Parameters
[in]awhBiasParamsBias parameters.
[in]numSharingSimulationsThe number of simulations to share the bias across.
Returns
the number of shared updates.