Gromacs  2026.0-dev-20251111-8c1ac59
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
df_history_t Struct Reference

#include <gromacs/mdtypes/df_history.h>

Description

Free-energy sampling history struct.

Note that an intended invariant of this structure is that all vectors (and the dimensions of the matrices) have the same size, ie. nlambda.

Todo:
Split out into microstate and observables history.

Public Member Functions

 df_history_t (int numLambdaValues)
 
 df_history_t (const df_history_t &src)=default
 Default copy constructor.
 
df_history_toperator= (const df_history_t &v)=default
 Default copy assignment operator.
 
 df_history_t (df_history_t &&src) noexcept=default
 Default move constructor.
 
df_history_toperator= (df_history_t &&v) noexcept=default
 Default move assignment operator.
 
template<gmx::CheckpointDataOperation operation>
void doCheckpoint (gmx::CheckpointData< operation > checkpointData, LambdaWeightCalculation elamstats)
 Allows to read and write checkpoint within modular simulator. More...
 

Public Attributes

int nlambda = 0
 total number of lambda states - useful to history as the number of lambdas determines the size of arrays.
 
bool bEquil = false
 Have we reached equilibration yet, where the weights stop updating?
 
std::vector< int > numSamplesAtLambdaForStatistics
 The number of points observed at each lambda up to the current time, in this simulation, for calculating statistics.
 
std::vector< int > numSamplesAtLambdaForEquilibration
 The number of points observed at each lambda up to the current time, over a set of simulations, for determining equilibration.
 
std::vector< realwl_histo
 The histogram for WL flatness determination. Can be preserved between simulations with input options.
 
real wl_delta
 The current wang-landau delta, used to increment each state when visited.
 
std::vector< realsum_weights
 Sum of weights of each state over all states.
 
std::vector< realsum_dg
 Sum of the free energies of the states – not actually used for weighting, but informational.
 
std::vector< realsum_minvar
 corrections to weights for minimum variance
 
std::vector< realsum_variance
 variances of the states
 
TwoDLambdaArray accum_p
 accumulated bennett weights for n+1
 
TwoDLambdaArray accum_m
 accumulated bennett weights for n-1
 
TwoDLambdaArray accum_p2
 accumulated squared bennett weights for n+1
 
TwoDLambdaArray accum_m2
 accumulated squared bennett weights for n-1
 
TwoDLambdaArray Tij
 Transition matrix, estimated from probabilities of transitions.
 
TwoDLambdaArray Tij_empirical
 Empirical transition matrix, estimated from only counts of transitions.
 

Member Function Documentation

template<gmx::CheckpointDataOperation operation>
template void df_history_t::doCheckpoint ( gmx::CheckpointData< operation >  checkpointData,
LambdaWeightCalculation  elamstats 
)

Allows to read and write checkpoint within modular simulator.

Template Parameters
operationWhether we're reading or writing
Parameters
checkpointDataThe CheckpointData object
elamstatsHow the lambda weights are calculated

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