Function net_ensembles::sampling::rewl::merged_log_probability_and_align
source · [−]pub fn merged_log_probability_and_align<Ensemble, R, Hist, Energy, S, Res>(
rewls: &[ReplicaExchangeWangLandau<Ensemble, R, Hist, Energy, S, Res>]
) -> Result<(Hist, Vec<f64, Global>, Vec<Vec<f64, Global>, Global>), HistErrors>where
Hist: Histogram + HistogramCombine + HistogramVal<Energy> + Send + Sync,
Energy: PartialOrd<Energy>,
Expand description
Results of the simulation
This is what we do the simulations for!
rewls
a slice of all replica exchange simulations you which to merge to create a final probability density estimate for whatever you sampled. Note, that while the slicerewls
does not need to be ordered, there should not be no gaps between the intervals that were sampled. Also, the overlap of adjacent intervals should be large enough.
Result::Ok
- The Hist is only useful for the interval, i.e., it tells you which bins correspond to the entries of the probability density function - it does not count how often the bins were hit. It is still the encapsulating interval, for which the probability density function was calculated
- The
Vec<f64>
is the logarithm (base e) of the probability density function, which you wanted to get! - `Vec<Vec
> these are the aligned probability estimates (also logarithm base e) of the different intervals. This can be used to see, how good the simulation worked, e.g., by plotting them to see, if they match
Failures
Failes if the internal histograms (intervals) do not align. Might fail if there is no overlap between neighboring intervals
Notes
The difference between this function and log_probability_and_align is, that, if there are multiple walkers in the same interval, they will be merged by averaging their probability estimates in this function, while they are not averaged in log_probability_and_align