version up

This commit is contained in:
Daniel Bauer
2020-10-26 10:52:22 +01:00
4 changed files with 23 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
name: wham
version: "1.0.0"
author: D. Bauer <bauer@bio.tu-darmstadt.de>
author: D. Bauer <bauer@cbs.tu-darmstadt.de>
about: |
wham is a fast implementation of the weighted histogram analysis method (WHAM) written in Rust. It currently supports potential of mean force (PMF) calculations in multiple dimensions at constant temperature.

View File

@@ -70,13 +70,13 @@ mod tests {
let timeseries = read_timeseries("example/1d_cyclic/COLVAR-2.5.xvg");
let autocorr = super::autocorrelation(&timeseries);
let expected = [
0.6919008655979143, 0.5331719399671355,
0.20472620956463589, -0.002850876458920514,
-0.13842850077938146, -0.2652923552973232,
-0.31427198272235385, -0.2617505151557693,
-0.20594864730290338, -0.13310019091811812,
-0.1887568901193426, -0.1944936625424933,
-0.1963599673189461, -0.11391587833838003];
0.691_900_865_597_914_3, 0.533_171_939_967_135_5,
0.204_726_209_564_635_89, -0.002_850_876_458_920_514,
-0.138_428_500_779_381_46, -0.265_292_355_297_323_2,
-0.314_271_982_722_353_85, -0.261_750_515_155_769_3,
-0.205_948_647_302_903_38, -0.133_100_190_918_118_12,
-0.188_756_890_119_342_6, -0.194_493_662_542_493_3,
-0.196_359_967_318_946_1, -0.113_915_878_338_380_03];
for (actual, expected) in autocorr.iter().zip(expected.iter()) {
assert!((actual-expected).abs() < 0.001);
}

View File

@@ -132,6 +132,7 @@ fn is_in_time_boundaries(time: f64, cfg: &Config) -> bool {
false
}
// parse a time series file into a histogram
fn read_window_file(window_file: &str, cfg: &Config) -> Result<(Histogram, usize)> {
// total number of bins is the product of all dimensions length
@@ -210,6 +211,7 @@ fn read_timeseries(window_file: &str, cfg: &Config) -> Result<Vec<Vec<f64>>> {
Ok(timeseries)
}
// calculates the inefficiency for every collective variable
// filters the timeseries based on the highest inefficiency
fn uncorrelate(timeseries: Vec<Vec<f64>>, cfg: &Config) -> Vec<Vec<f64>> {