pub struct ReplicaExchangeWangLandauBuilder<Ensemble, Hist, S, Res> { /* private fields */ }
Expand description

Use this to create a replica exchange wang landau simulation

  • Tipp: Use shorthand RewlBuilder

Notes

  • Don’t be intimidated by the number of trait bounds an generic parameters. You should very rarely have to explicitly write the types, as Rust will infer them for you.

Implementations

Fraction of finished intervals
  • which fraction of the intervals has found valid starting configurations?
Note
  • even if every interval has a valid configuration directly after using one of the from_… methods, it fill show a fraction of 0.0 - the fraction will only be correct after calling one of the …build methods (on the Error of the result)
Is the interval in a valid starting configuration?

Check which intervals have valid starting points

Note
  • in the beginning the RewlBuilder has no way of knowing, if the intervals have valid starting configuration - as it does not know the energy function yet. Therefore this will only be correct after calling one of the …build methods (on the Error of the result)

Access step sizes of individual intervals

Change step size of individual intervals
  • change step size of intervals

Accesss sweep size of individual intervals

Change sweep size of individual intervals
  • change sweep size of intervals
new rewl builder
  • used to create a Replica exchange wang landau simulation.
  • use this method, if you want to have fine control over each walker, i.e., if you can provide ensembles, who’s energy is already inside the corresponding intervals hists
  • you might want to use from_ensemble or from_ensemble_tuple instead
Parametermeaning
ensemblesa vector of ensembles, one for each interval. Corresponds to the hists entries.
histsOverlapping intervals for the wang landau walkers. Should be sorted according to their respective left bins.
step_sizestep_size for the markov steps, which will be performed
sweep_sizeHow many steps will be performed until the replica exchanges are proposed
walker_per_intervalHow many walkers should be used for each interval (entry of hists)
log_f_thresholdThreshold for the logarithm of the factor f (see paper). Rewl Simulation is finished, when all(!) walkers have a factor log_f smaller than this threshold
Notes
  • for proper statistics, you should seed the random number generators (used for the markov chain) of all ensembles differently!
  • log_f_threshold has to be a normal and non negative number
  • each entry of ensembles will be cloned walker_per_interval - 1 times and their respective rngs will be seeded via the HasRng trait
Create a builder to create a replica exchange wang landau (Rewl) simulation
  • creates vector of ensembles and (re)seeds their respective rngs (by using the HasRng trait)
  • calls Self::from_ensemble_vec(…) afterwards, look there for more information about the parameter
Create a builder to create a replica exchange wang landau (Rewl) simulation
  • creates vector of ensembles and (re)seeds their respective rngs (by using the HasRng trait). The vector is created by cloning ensemble_tuple.0 for everything up to the middle of the vector and ensemble_tuple.1 for the rest. The length of the vector will be the same as hists.len(). If It is an uneven number, the middle element will be a clone of ensemble_tuple.1
  • calls Self::from_ensemble_vec(…) afterwards, look there for more information about the parameter
  • use this, if you know configurations, that would be good starting points for finding configurations at either end of the intervals.
Create Rewl, i.e., Replica exchange wang landau simulation
  • uses a greedy heuristic to find valid configurations, meaning configurations that are within the required intervals, i.e., histograms
Note
  • Depending on how complex your energy landscape is, this can take a very long time, maybe not even terminating at all.
  • You can use self.try_greedy_choose_rng_build to limit the time of the search
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to greedy_build
  • condition can be used to limit the time of the search - it will end when condition returns false. ##Note
  • condition will only be checked once every sweep, i.e., every sweep_size markov steps
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to greedy_build
  • Difference: You can choose a different Rng for the Wang Landau walkers (i.e., the acceptance of the replica exchange moves etc.)
  • usage: self.greedy_choose_rng_build::<RNG,_,_,_>(energy_fn)
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to try_greedy_build
  • Difference: You can choose a different Rng for the Wang Landau walkers (i.e., the acceptance of the replica exchange moves etc.)
  • usage: self.try_greedy_choose_rng_build::<RNG,_,_,_,_>(energy_fn, condition)
Create Rewl, i.e., Replica exchange wang landau simulation
  • uses an interval heuristic to find valid configurations, meaning configurations that are within the required intervals, i.e., histograms
  • Uses overlapping intervals. Accepts a step, if the resulting ensemble is in the same interval as before, or it is in an interval closer to the target interval. Take a look at the HistogramIntervalDistance trait
  • overlap should smaller than the number of bins in your histogram. E.g. overlap = 3 if you have 200 bins
Note
  • Depending on how complex your energy landscape is, this can take a very long time, maybe not even terminating at all.
  • You can use try_interval_heuristik_build to limit the time of the search
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to interval_heuristik_build
  • condition can be used to limit the time of the search - it will end when condition returns false. ##Note
  • condition will only be checked once every sweep, i.e., every sweep_size markov steps
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to try_interval_heuristik_build
  • Difference: You can choose a different Rng for the Wang Landau walkers (i.e., the acceptance of the replica exchange moves etc.)
  • usage: self.try_interval_heuristik_build::<RNG,_,_,_,_>(energy_fn, overlap)
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to interval_heuristik_choose_rng_build
  • Difference: You can choose the Random number generator used for the Rewl Walkers, i.e., for accepting or rejecting the markov steps and replica exchanges.
  • usage: `self.try_interval_heuristik_choose_rng_build<RNG, ,,,>(energy_fn, condition, overlap)]
Create Rewl, i.e., Replica exchange wang landau simulation
  • alternates between interval-heuristik and greedy-heuristik

  • The interval heuristik uses overlapping intervals. Accepts a step, if the resulting ensemble is in the same interval as before, or it is in an interval closer to the target interval. Take a look at the HistogramIntervalDistance trait

  • overlap should smaller than the number of bins in your histogram. E.g. overlap = 3 if you have 200 bins

  • greedy_steps: How many steps to perform with greedy heuristik before switching to interval heuristik?

  • interval_steps: How many steps to perform with interval heuristik before switching back to greedy heuristik?

Note
  • Depending on how complex your energy landscape is, this can take a very long time, maybe not even terminating at all.
  • You can use try_mixed_heuristik_build to limit the time of the search
Create Rewl, i.e., Replica exchange wang landau simulation
  • alternates between interval-heuristik and greedy-heuristik

  • The interval heuristik uses overlapping intervals. Accepts a step, if the resulting ensemble is in the same interval as before, or it is in an interval closer to the target interval. Take a look at the HistogramIntervalDistance trait

  • overlap should smaller than the number of bins in your histogram. E.g. overlap = 3 if you have 200 bins

  • greedy_steps: How many steps to perform with greedy heuristik before switching to interval heuristik?

  • interval_steps: How many steps to perform with interval heuristik before switching back to greedy heuristik?

Note
  • condition can be used to limit the time of the search - it will end when condition returns false (or a valid solution is found)
  • condition will be checked each time the heuristik switches between greedy and interval heuristik
Create Rewl, i.e., Replica exchange wang landau simulation
  • similar to try_mixed_heuristik_build

  • difference: Lets you choose the rng type for the Rewl simulation, i.e., the rng used for accepting or rejecting markov steps and replica exchange moves

  • usage: self.try_mixed_heuristik_choose_rng_build<RNG_TYPE, _, _, _, _>(energy_fn, condition, overlap, greedy_steps, interval_steps)

  • greedy_steps: How many steps to perform with greedy heuristik before switching to interval heuristik?

  • interval_steps: How many steps to perform with interval heuristik before switching back to greedy heuristik?

Note
  • condition will be checked each time the heuristik switches between greedy and interval heuristik

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Cast from Self to T
Try converting from Self to T
Cast to integer, truncating Read more
Cast to the nearest integer Read more
Cast the floor to an integer Read more
Cast the ceiling to an integer Read more
Try converting to integer with truncation Read more
Try converting to the nearest integer Read more
Try converting the floor to an integer Read more
Try convert the ceiling to an integer Read more
Convert from T to Self
Try converting from T to Self

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.