Gromacs  2019-beta2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Attributes
gmx::Grid Class Reference

#include <gromacs/awh/grid.h>

Description

The grid, 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

 Grid (const std::vector< DimParams > &dimParams, 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 GridPointpoint (size_t pointIndex) const
 Returns a reference to a point on the grid. More...
 
int numDimensions () const
 Returns the dimensionality of the grid. More...
 
const std::vector< GridAxis > & axis () const
 Returns the grid axes. More...
 
const GridAxisaxis (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...
 

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.
 

Constructor & Destructor Documentation

gmx::Grid::Grid ( const std::vector< DimParams > &  dimParams,
const AwhDimParams *  awhDimParams 
)

Construct a grid using AWH input parameters.

Parameters
[in]dimParamsDimension parameters including the expected inverse variance of the coordinate living on the grid (determines the grid spacing).
[in]awhDimParamsDimension params from inputrec.

Member Function Documentation

const std::vector<GridAxis>& gmx::Grid::axis ( ) const
inline

Returns the grid axes.

Returns
a constant reference to the grid axes.
const GridAxis& gmx::Grid::axis ( int  dim) const
inline

Returns a grid axis.

param[in] dim Dimension to return the grid axis for.

Returns
a constant reference to the grid axis.
bool gmx::Grid::covers ( const awh_dvec  value) const

Query if the value is in the grid.

Parameters
[in]valueValue vector.
Returns
true if the value is in the grid.
Note
It is assumed that any periodicity of value has already been taken care of.
int gmx::Grid::nearestIndex ( const awh_dvec  value) const

Find the grid point with value nearest to the given value.

Parameters
[in]valueValue vector.
Returns
the grid point index.
int gmx::Grid::numDimensions ( ) const
inline

Returns the dimensionality of the grid.

Returns
the dimensionality of the grid.
size_t gmx::Grid::numPoints ( ) const
inline

Returns the number of points in the grid.

Returns
the number of points in the grid.
const GridPoint& gmx::Grid::point ( size_t  pointIndex) const
inline

Returns a reference to a point on the grid.

Returns
a constant reference to a point on the grid.

Member Data Documentation

constexpr double gmx::Grid::c_numPointsPerSigma = 1.0
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.


The documentation for this class was generated from the following files: