Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::CoordState Class Reference

#include <gromacs/awh/coordstate.h>

Description

Keeps track of the current coordinate value, grid index and umbrella location.

Public Member Functions

 CoordState (const AwhBiasParams &awhBiasParams, const std::vector< DimParams > &dimParams, const Grid &grid)
 Constructor. More...
 
void sampleUmbrellaGridpoint (const Grid &grid, int gridpointIndex, gmx::ArrayRef< const double > probWeightNeighbor, gmx_int64_t step, gmx_int64_t seed, int indexSeed)
 Sample a new umbrella reference point given the current coordinate value. More...
 
void setCoordValue (const Grid &grid, const awh_dvec coordValue)
 Update the coordinate value with coordValue. More...
 
void restoreFromHistory (const AwhBiasStateHistory &stateHistory)
 Restores the coordinate state from history. More...
 
const awh_dveccoordValue () const
 Returns the current coordinate value.
 
int gridpointIndex () const
 Returns the grid point index for the current coordinate value.
 
int umbrellaGridpoint () const
 Returns the index for the current reference grid point.
 

Constructor & Destructor Documentation

gmx::CoordState::CoordState ( const AwhBiasParams &  awhBiasParams,
const std::vector< DimParams > &  dimParams,
const Grid grid 
)

Constructor.

Parameters
[in]awhBiasParamsThe Bias parameters from inputrec.
[in]dimParamsThe dimension Parameters.
[in]gridThe grid.

Member Function Documentation

void gmx::CoordState::restoreFromHistory ( const AwhBiasStateHistory &  stateHistory)

Restores the coordinate state from history.

Parameters
[in]stateHistoryThe AWH bias state history.
void gmx::CoordState::sampleUmbrellaGridpoint ( const Grid grid,
int  gridpointIndex,
gmx::ArrayRef< const double >  probWeightNeighbor,
gmx_int64_t  step,
gmx_int64_t  seed,
int  indexSeed 
)

Sample a new umbrella reference point given the current coordinate value.

It is assumed that the probability distribution has been updated.

Parameters
[in]gridThe grid.
[in]gridpointIndexThe grid point, sets the neighborhood.
[in]probWeightNeighborProbability weights of the neighbors.
[in]stepStep number, needed for the random number generator.
[in]seedRandom seed.
[in]indexSeedSecond random seed, should be the bias Index.
Returns
the index of the sampled point.
void gmx::CoordState::setCoordValue ( const Grid grid,
const awh_dvec  coordValue 
)

Update the coordinate value with coordValue.

Parameters
[in]gridThe grid.
[in]coordValueThe new coordinate value.

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