openpathsampling.numerics.WHAM
- class openpathsampling.numerics.WHAM(tol=1e-10, max_iter=1000000, cutoff=0.05, interfaces=None)[source]
Weighted Histogram Analysis Method
Notes
Several parts of the docstrings mention F&S, which is intended to refer the reader to reference 1, in particular pages 184-187 in the 2nd edition (section called “Self-Consistent Histogram Method”).
Other terminology: n_hists refers to the number of histograms, n_bins refers to the number of bins per histogram. Thus the input is a matrix of n_bins rows and n_hists columns.
References
- 1
Daan Frenkel and Berend Smit. Understanding Molecular Simulation: From Algorithms to Applications. 2nd Edition. 2002.
- Parameters
tol (float) – tolerance for convergence or equality. default 10e-10
max_iter (int) – maximum number of iterations. Default 1000000
cutoff (float) – windowing cutoff, as fraction of maximum value. Default 0.05
- sample_every
frequency (in iterations) to report debug information
- Type
int
Methods
__init__
([tol, max_iter, cutoff, interfaces])check_cleaned_overlaps
(cleaned_df)Check that all the histograms have sufficient overlaps.
generate_lnZ
(lnZ, unweighting, ...[, tol])Perform the WHAM iteration to estimate ln(Z_i) for each histogram.
get_diff
(lnZ_old, lnZ_new, iteration)Calculate the difference for this iteration.
guess_lnZ_crossing_probability
(cleaned_df)Guess ln(Z_i) based on crossing probabilities
load_files
(fnames)Load a file or files into the internal structures.
n_entries
(cleaned_df)List of counts of entries per histogram.
normalize_cumulative
(series)Normalize to maximum value
output_histogram
(lnZ, sum_k_Hk_Q, ...)Recombine the data into a joined histogram
prep_reverse_cumulative
(df[, cutoff, tol])Created cleaned dataframe for further analysis.
sum_k_Hk_Q
(cleaned_df)Sum over histograms for each histogram bin.
unweighting_tis
(cleaned_df)Calculates the "unweighting" values for each histogram.
weighted_counts_tis
(unweighting, n_entries)Product of unweighting and n_entries.
wham_bam_histogram
(input_df)Perform the entire wham process.
Attributes
float_format
10.8 (default)