|
Gromacs
2026.0-dev-20251114-850eace
|
#include <gromacs/applied_forces/awh/histogramsize.h>
Tracks global size related properties of the bias histogram.
Tracks the number of updates and the histogram size. Also keep track of the stage (initial/final of the AWH method and printing warnings about covering.
Public Member Functions | |
| HistogramSize (const AwhBiasParams &awhBiasParams, double histogramSizeInitial) | |
| Constructor. More... | |
| double | newHistogramSize (const BiasParams ¶ms, double t, bool covered, ArrayRef< const PointState > pointStates, ArrayRef< double > weightsumCovering, FILE *fplog) |
| Return the new reference weight histogram size for the current update. More... | |
| void | restoreFromHistory (const AwhBiasStateHistory &stateHistory) |
| Restores the histogram size from history. More... | |
| void | storeState (AwhBiasStateHistory *stateHistory) const |
| Store the histogram size state in a history struct. More... | |
| int | numUpdates () const |
| Returns the number of updates since the start of the simulation. | |
| void | incrementNumUpdates () |
| Increments the number of updates by 1. | |
| double | histogramSize () const |
| Returns the histogram size. | |
| void | setHistogramSize (double histogramSize, double weightHistogramScalingFactor) |
| Sets the histogram size. More... | |
| bool | inInitialStage () const |
| Returns true if we are in the initial stage of the AWH method. | |
| double | logScaledSampleWeight () const |
| Returns The log of the current sample weight, scaled because of the histogram rescaling. | |
| gmx::HistogramSize::HistogramSize | ( | const AwhBiasParams & | awhBiasParams, |
| double | histogramSizeInitial | ||
| ) |
Constructor.
| [in] | awhBiasParams | The Bias parameters from inputrec. |
| [in] | histogramSizeInitial | The initial histogram size. |
| double gmx::HistogramSize::newHistogramSize | ( | const BiasParams & | params, |
| double | t, | ||
| bool | covered, | ||
| ArrayRef< const PointState > | pointStates, | ||
| ArrayRef< double > | weightsumCovering, | ||
| FILE * | fplog | ||
| ) |
Return the new reference weight histogram size for the current update.
This function also takes care of checking for covering in the initial stage.
| [in] | params | The bias parameters. |
| [in] | t | Time. |
| [in] | covered | True if the sampling interval has been covered enough. |
| [in] | pointStates | The state of the grid points. |
| [in,out] | weightsumCovering | The weight sum for checking covering. |
| [in,out] | fplog | Log file. |
| void gmx::HistogramSize::restoreFromHistory | ( | const AwhBiasStateHistory & | stateHistory | ) |
Restores the histogram size from history.
| [in] | stateHistory | The AWH bias state history. |
| void gmx::HistogramSize::setHistogramSize | ( | double | histogramSize, |
| double | weightHistogramScalingFactor | ||
| ) |
Sets the histogram size.
| [in] | histogramSize | The new histogram size. |
| [in] | weightHistogramScalingFactor | The factor to scale the weight by. |
| void gmx::HistogramSize::storeState | ( | AwhBiasStateHistory * | stateHistory | ) | const |
Store the histogram size state in a history struct.
| [in,out] | stateHistory | The AWH bias state history. |
1.8.5