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::PerturbModel, feasst::PerturbMove, feasst::PerturbParticleType, feasst::PerturbRemove, feasst::PerturbSiteType, feasst::PerturbVolume

Public Functions

Perturb(argtype args = argtype())

args:

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 mid_stage(const TrialSelect &select, const System &system)

Call between rosenbluth calculation of old and new configuration.

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

Perturb the selection of the system.

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

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

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

virtual std::string status_header() const

Print status header.

virtual std::string status() const

Print status.