Bias

class Bias

Bias for flat histogram Monte Carlo. Assumes a one-dimensional macrostate.

Subclassed by feasst::TransitionMatrix, feasst::WangLandau, feasst::WLTM

Public Functions

double ln_bias(const int bin_new, const int bin_old) const

Return the natural log of the bias for a transition from a macrostate in the old bin to a new bin.

virtual void update_or_revert(const int macrostate_old, const int macrostate_new, const double ln_metropolis_prob, const bool is_accepted, const bool revert) = 0

Update the bias due to an attempted transition.

void update(const int macrostate_old, const int macrostate_new, const double ln_metropolis_prob, const bool is_accepted)

Update only.

virtual void infrequent_update()

Perform an infrequent update to the bias.

virtual const LnProbability &ln_prob() const = 0

The natural log of the macrostate probability.

virtual void set_ln_prob(const LnProbability &ln_prob) = 0

Set the macrostate probability distribution.

bool is_complete() const

Return true if completion requirements are met.

virtual int phase() const

Return the simulation phase index used to differentiate production and initialization, etc.

virtual void increment_phase()

Increment the simulation phase.

virtual void set_num_iterations(const int iteration) = 0

Set the number of iterations required for completion. In TransitionMatrix and WLTM, this is the minimum number of sweeps. In WangLandau, this is the minimum number of flatness checks. Afterward, check again for completeness.