Gromacs
2018.8
|
#include <gromacs/awh/coordstate.h>
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_dvec & | coordValue () 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. | |
gmx::CoordState::CoordState | ( | const AwhBiasParams & | awhBiasParams, |
const std::vector< DimParams > & | dimParams, | ||
const Grid & | grid | ||
) |
Constructor.
[in] | awhBiasParams | The Bias parameters from inputrec. |
[in] | dimParams | The dimension Parameters. |
[in] | grid | The grid. |
void gmx::CoordState::restoreFromHistory | ( | const AwhBiasStateHistory & | stateHistory | ) |
Restores the coordinate state from history.
[in] | stateHistory | The 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.
[in] | grid | The grid. |
[in] | gridpointIndex | The grid point, sets the neighborhood. |
[in] | probWeightNeighbor | Probability weights of the neighbors. |
[in] | step | Step number, needed for the random number generator. |
[in] | seed | Random seed. |
[in] | indexSeed | Second random seed, should be the bias Index. |
Update the coordinate value with coordValue.
[in] | grid | The grid. |
[in] | coordValue | The new coordinate value. |