Gromacs
2025-dev-20240913-b871546
|
#include <gromacs/applied_forces/awh/biasgrid.h>
The grid for a single bias, generally multidimensional and periodic.
The grid discretizes a multidimensional space with some given resolution. Each dimension is represented by an axis which sets the spatial extent, point spacing and periodicity of the grid in that direction.
Public Member Functions | |
BiasGrid (ArrayRef< const DimParams > dimParams, ArrayRef< const AwhDimParams > awhDimParams) | |
Construct a grid using AWH input parameters. More... | |
size_t | numPoints () const |
Returns the number of points in the grid. More... | |
const GridPoint & | point (size_t pointIndex) const |
Returns a reference to a point on the grid. More... | |
int | numDimensions () const |
Returns the dimensionality of the grid. More... | |
ArrayRef< const GridAxis > | axis () const |
Returns the grid axes. More... | |
const GridAxis & | axis (int dim) const |
Returns a grid axis. More... | |
int | nearestIndex (const awh_dvec value) const |
Find the grid point with value nearest to the given value. More... | |
bool | covers (const awh_dvec value) const |
Query if the value is in the grid. More... | |
bool | hasLambdaAxis () const |
Returns true if the grid has a free energy lambda state axis at all. | |
std::optional< int > | lambdaAxisIndex () const |
Returns the index of a free energy lambda state axis (there can be no more than one) if there is one. | |
int | numFepLambdaStates () const |
Returns the number of free energy lambda states in the grid (the number of points along a free energy lambda state axis) or 0 if there are no free energy lambda state axes. | |
Static Public Attributes | |
static constexpr double | c_numPointsPerSigma = 1.0 |
The point density per sigma of the Gaussian distribution in an umbrella. More... | |
static constexpr double | c_scopeCutoff = 5.5 |
Cut-off in sigma for considering points, neglects 4e-8 of the density. | |
gmx::BiasGrid::BiasGrid | ( | ArrayRef< const DimParams > | dimParams, |
ArrayRef< const AwhDimParams > | awhDimParams | ||
) |
Construct a grid using AWH input parameters.
[in] | dimParams | Dimension parameters including the expected inverse variance of the coordinate living on the grid (determines the grid spacing). |
[in] | awhDimParams | Dimension params from inputrec. |
Returns the grid axes.
|
inline |
Returns a grid axis.
param[in] dim Dimension to return the grid axis for.
bool gmx::BiasGrid::covers | ( | const awh_dvec | value | ) | const |
Query if the value is in the grid.
[in] | value | Value vector. |
int gmx::BiasGrid::nearestIndex | ( | const awh_dvec | value | ) | const |
Find the grid point with value nearest to the given value.
[in] | value | Value vector. |
|
inline |
Returns the dimensionality of the grid.
|
inline |
Returns the number of points in the grid.
|
inline |
Returns a reference to a point on the grid.
|
static |
The point density per sigma of the Gaussian distribution in an umbrella.
This value should be at least 1 to uniformly cover the reaction coordinate range with density and having it larger than 1 does not add information.