Gromacs
2024.4
|
#include <gromacs/applied_forces/awh/coordstate.h>
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_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. | |
void | setUmbrellaGridpointToGridpoint () |
Sets the umbrella grid point to the current grid point. | |
gmx::CoordState::CoordState | ( | const AwhBiasParams & | awhBiasParams, |
ArrayRef< const DimParams > | dimParams, | ||
const BiasGrid & | 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 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.
[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. |