TripleBandedCollectionMatrix

class TripleBandedCollectionMatrix

The collection matrix is triple banded when the macrostate can only increase or decrease by a single “bin” in the macrostate order parameter.

For example, one cannot use a triple banded collection matrix if insertions of both single and pairs of particles are attempted. Single or pair only would be fine.

The first index of the matrix is the macrostate. The second is the state change as follows:

  • 0: macrostate decrease

  • 1: macrostate constant

  • 2: macrostate increase

Beware that the computed probability distribution from this collection matrix may contain spurious values at the two most extreme ends. This is especially true in cases where windows with different moves sets are spliced.

Blocks and error bars are obtained via the blocking method. Blocks are created on the fly by sizes of base two. The default blocks and stdev are from the largest block sizes with more than ten blocks. Error bars on grand canonical ensemble averages may then by obtained by using the macrostate distribution from each of these blocks.

Public Functions

TripleBandedCollectionMatrix(argtype args = argtype())

args:

  • max_block_operations: maximum number of blocking operations (default: 5).

TripleBandedCollectionMatrix(const std::vector<std::vector<std::vector<double>>> &data)

Construct from a series of single-state collection matricies (NVT+W).

void increment(const int macro, const int state_change, const double add)

Add value for a given macrostate and state change.

void compute_ln_prob(LnProbability *ln_prob) const

Update the ln_prob according to the collection matrix.

const std::vector<std::vector<double>> &matrix() const

Return the matrix.