class Rosenbluth

Store the energies and Rosenbluth factors necessary for configurational bias Monte Carlo trials.

\(w = \frac{1}{n} \sum_i^n \exp^{-\beta \Delta U}\)

where \(w\) is the Rosenbluth weight for \(n\) steps.

Public Functions

void resize(const int num)

Resize the energy, Boltmann factors by the number of steps in the trial.

int num() const

Return the number of steps.

void store(const int step, const Select &select)

Store the selection for each step.

void set_energy(const int step, const double energy)

Set the energy of the step by step.

void compute(const double beta, Random *random, const bool old)

Compute Boltzmann factors and cumulative probabilities for all steps. Choose one of the steps based on the probabilities.

const Select &stored(const int step) const

Return the stored selection of the step.

const Select &chosen() const

Return the chosen selection.

double chosen_energy() const

Return the chosen energy.

double ln_total_rosenbluth() const

Return the natural logrithm of the total rosenbluth factor.

double energy(const int step) const

Return the energy for a given step.

int chosen_step() const

Return the chosen step.

void serialize(std::ostream &ostr) const


Rosenbluth(std::istream &istr)