Rosenbluth

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, const double excluded)

Set the energy and excluded energy of the step. Exclude energy includes terms such as bond potentials where the bonds where already selected according to the appropriate distribution.

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.

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

Return the chosen energy profile.

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.

const std::vector<double> energy_profile(const int step) const

Return the energy profile for a given step.

int chosen_step() const

Return the chosen step.

void serialize(std::ostream &ostr) const

Serialize.

Rosenbluth(std::istream &istr)

Deserialize.