TransitionMatrix

class TransitionMatrix : public feasst::Bias

Transition matrix flat histogram bias.

Direct calculation of liquid–vapor phase equilibria from transition matrix Monte Carlo simulation https://doi.org/10.1063/1.1572463

Elucidating the effects of adsorbent flexibility on fluid adsorption using simple models and flat-histogram sampling methods. https://doi.org/10.1063/1.4884124

A count of all accepted transitions between macrostates is used for a newly developed sweep metric.

Public Functions

TransitionMatrix(argtype args = argtype())

args:

  • CollectionMatrix arguments.

  • min_visits: A sweep is performed when all macrostates are visited by another macrostate this number of times (default: 100).

  • average_visits: A sweep is performed when macrostates are visited by another macrostate more than this average number of times (default: 0).

  • min_sweeps: Number of sweeps required for completion.

  • reset_sweeps: The ‘phase’ counter increments from 0 to 1 when reset_sweeps are completed (default: -1 [counter will never increment])

  • new_sweep: if set to 1, use new sweep definition of “the minimum number

    of accepted transitions for each possible” (default: 0).

void update(const int macrostate_old, const int macrostate_new, const double ln_metropolis_prob, const bool is_accepted, const bool is_endpoint, const Macrostate &macro)

Update only.

int min_sweeps() const

Return the minimum sweeps required for completion.

int reset_sweeps() const

Return the reset_sweeps parameter.

int num_iterations_to_complete() const

Return 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.

void set_num_iterations_to_complete(const int iteration)

Set the number of iterations required for completion.

const LnProbability &ln_prob() const

The natural log of the macrostate probability.

void set_ln_prob(const LnProbability &ln_prob)

Set the macrostate probability distribution.

void infrequent_update(const Macrostate &macro)

Perform an infrequent update to the bias.

const CollectionMatrix &collection() const

Return the collection matrix.