Gromacs  2024.4
 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/applied_forces/awh/coordstate.h>

Description

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

Public Member Functions

 CoordState (const AwhBiasParams &awhBiasParams, ArrayRef< const DimParams > dimParams, const BiasGrid &grid)
 Constructor. More...
 
void sampleUmbrellaGridpoint (const BiasGrid &grid, int gridpointIndex, gmx::ArrayRef< const double > probWeightNeighbor, int64_t step, int64_t seed, int indexSeed)
 Sample a new umbrella reference point given the current coordinate value. More...
 
void setCoordValue (const BiasGrid &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.
 
void setUmbrellaGridpointToGridpoint ()
 Sets the umbrella grid point to the current grid point.
 

Constructor & Destructor Documentation

gmx::CoordState::CoordState ( const AwhBiasParams &  awhBiasParams,
ArrayRef< const DimParams dimParams,
const BiasGrid 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 BiasGrid grid,
int  gridpointIndex,
gmx::ArrayRef< const double >  probWeightNeighbor,
int64_t  step,
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 BiasGrid 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: