class FlatHistogram : public feasst::Criteria

Flat histogram acceptance criteria uses a bias to improve sampling and attempt to recover the free energy of the system as a function of the give macrostate.

The Macrostate must be defined before the bias.

Public Functions

FlatHistogram(std::shared_ptr<Macrostate> macrostate, std::shared_ptr<Bias> bias, const argtype &args = argtype())


FlatHistogram(std::shared_ptr<Macrostate> macrostate, std::shared_ptr<Bias> bias, std::shared_ptr<Constraint> constraint, const argtype &args = argtype())

Same as above, but with an added Constraint.

const Macrostate &macrostate() const

Return the macrostate.

const Bias &bias() const

Return the bias.

void set_num_iterations(const int iteration)

Set the number of iterations in the Bias.

void before_attempt(const System &system)

This function is called before a trial attempt.

bool is_accepted(const Acceptance &acceptance_, const System &system, Random *random)

Return whether or not the trial attempt should be accepted.

std::string write() const

Return a human-readable output of all data (not as brief as status).

bool is_complete() const

Return true if completion requirements are met.

int phase() const

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

void increment_phase()

Increment the simulation phase.

int state() const

Return the state. Return -1 if state is not determined.

int num_states() const

Return the number of states. (default: 1).

void set_ln_prob(const LnProbability &ln_prob)

Set the macrostate probability distribution.

const LnProbability &ln_prob() const

Return the macrostate probability distribution.

void update()