sim:: mc:: MCMove
MCMove trait correspond to the set of methods used in Monte Carlo
Give a short description of this move
Set up move before simulation is run
fn degrees_of_freedom(&self) -> MCDegreeOfFreedom
Get the number of degrees of freedom simulated by this move
Prepare the move by selecting the particles to move, and the parameters
of the move. The
rng random number generator should be used to
generate the parameters of the move.
This function should return true is we can perform the move, and false otherwise.
fn cost(&self, system: &System, beta: f64, cache: &mut EnergyCache) -> f64
Get the cost of performing this move on
system. For example in
simple NVT simulations, this cost is the energetic difference between
the new and the old state times beta. The cost must be dimmensionless.
Note that the cost will be placed in an exponential with a negative sign. For NVT using the Metropolis criterion: cost = beta*(U_new - U_old) -> P_acc = min[1, exp(-cost)].
cache should be used to compute the cost, or the
cache.unused function should be used to ensure that the cache is
updated as needed after this move.
Apply the move, if it has not already been done in
Restore the system to it's initial state if it has been changed in
fn update_amplitude(&mut self, scaling_factor: Option<f64>)
Update the sample range for displacements.