Perturb

class Perturb

Perturbations to the system include the following types:

  1. move (single particle, regrowth, cluster moves).

  2. add/remove (grand canonical).

  3. change type (swap, growth expanded).

  4. change parameter (temperature, criteria swap bound).

Perturbations may be followed up by one of the two following options:

  1. Revert the perturbation. For example, if a particle is moved, then restore the positions of that particle to the original.

  2. Finalize the perturbation. For example, if a selected particle is accepted for deletion, the particle is deleted in the finalize step.

Subclassed by feasst::PerturbAdd, feasst::PerturbAddAVB, feasst::PerturbBeta, feasst::PerturbMove, feasst::PerturbParticleType, feasst::PerturbRemove, feasst::PerturbSiteType, feasst::PerturbVolume

Public Functions

Perturb(const argtype &args = argtype())

args:

  • tunable_param: initial value of the tunable parameter (default: 0.1).

  • tunable_target_acceptance: optionally set target acceptance.

  • tunable_percent_change: optionally set the percent change.

const Tunable &tunable() const

Return the tunable parameter.

void set_tunable_min_and_max(const double min, const double max)

Set the minimum and maximum values of the tunable parameter.

void set_tunable(const double value)

Set the value of the tunable parameter.

void tune(const double actual)

Tune the parameter based on difference between target and actual.

virtual void before_select()

Before perturbation, initialize some optimiation parameters.

virtual void perturb(System *system, TrialSelect *select, Random *random, const bool is_position_held = false)

Perturb the selection of the system.

Parameters
  • is_position_held: If position is held, all but perform the actual perturbation, as typically required for calculations of old configurations and Rosenbluth

bool revert_possible() const

Return whether it is possible to revert.

void set_revert_possible(const bool revert_possible, TrialSelect *revert_select)

Set whether it is possible to revert.

Parameters
  • revert_select: If possible, store the selection.

const TrialSelect *revert_select() const

Return the stored revert selection.

virtual void revert(System *system)

Revert the system for an unaccepted perturbation.

bool finalize_possible() const

Return whether it is possible to finalize.

void set_finalize_possible(const bool finalize_possible, TrialSelect *finalize_select)

Set whether it is possible to finalize.

Parameters
  • finalize_select: If possible, store the selection.

const TrialSelect *finalize_select() const

Return the stored finalize selection.

virtual void finalize(System *system)

Finalize the system for an accepted perturbation.

double probability() const

Return the probability.

void set_probability(const double prob = 1)

Set the probability.

virtual std::string status_header() const

Print status header.

virtual std::string status() const

Print status.