diff --git a/Cargo.lock b/Cargo.lock index 5f56346..9e9c66a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,21 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "addr2line" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" + [[package]] name = "ansi_term" version = "0.11.0" @@ -39,32 +54,24 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.45" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad235dabf00f36301792cfe82499880ba54c6486be094d1047b02bacb67c14e8" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" dependencies = [ - "backtrace-sys", + "addr2line", "cfg-if", "libc", + "miniz_oxide", + "object", "rustc-demangle", ] -[[package]] -name = "backtrace-sys" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17b52e737c40a7d75abca20b29a19a0eb7ba9fc72c5a72dd282a0a3c2c0dc35" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "bitflags" version = "1.2.1" @@ -77,12 +84,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9e1d9f7d49e289f36f19effbf3d5a5e30163ecf9c7a3c9be94d5374dec5b9a" -[[package]] -name = "cc" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" - [[package]] name = "cfg-if" version = "0.1.10" @@ -91,9 +92,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "clap" -version = "2.33.0" +version = "2.33.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ "ansi_term", "atty", @@ -114,6 +115,16 @@ dependencies = [ "bitflags", ] +[[package]] +name = "crossbeam-channel" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +dependencies = [ + "crossbeam-utils", + "maybe-uninit", +] + [[package]] name = "crossbeam-deque" version = "0.7.3" @@ -140,16 +151,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.7.2" @@ -163,15 +164,15 @@ dependencies = [ [[package]] name = "either" -version = "1.5.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" [[package]] name = "error-chain" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" +checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ "backtrace", "version_check", @@ -184,10 +185,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] -name = "hermit-abi" -version = "0.1.8" +name = "gimli" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" + +[[package]] +name = "hermit-abi" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" dependencies = [ "libc", ] @@ -200,9 +207,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.67" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" +checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235" [[package]] name = "maybe-uninit" @@ -212,28 +219,44 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memoffset" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" +checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" dependencies = [ - "rustc_version", + "autocfg", +] + +[[package]] +name = "miniz_oxide" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" +dependencies = [ + "adler", + "autocfg", ] [[package]] name = "num_cpus" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ "hermit-abi", "libc", ] [[package]] -name = "pkg-config" -version = "0.3.17" +name = "object" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" + +[[package]] +name = "pkg-config" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "rand" @@ -265,10 +288,11 @@ checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" [[package]] name = "rayon" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270" dependencies = [ + "autocfg", "crossbeam-deque", "either", "rayon-core", @@ -276,12 +300,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" +checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0" dependencies = [ + "crossbeam-channel", "crossbeam-deque", - "crossbeam-queue", "crossbeam-utils", "lazy_static", "num_cpus", @@ -293,36 +317,12 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "strsim" version = "0.8.0" @@ -340,25 +340,25 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" [[package]] name = "vec_map" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "wham" -version = "0.9.6" +version = "0.9.7" dependencies = [ "GSL", "assert_approx_eq", @@ -370,9 +370,9 @@ dependencies = [ [[package]] name = "winapi" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", diff --git a/Cargo.toml b/Cargo.toml index eab05f0..e00827d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wham" -version = "0.9.6" +version = "0.9.7" authors = ["Daniel Bauer "] description = "An implementation of the weighted histogram analysis method" license = "GPL-3.0" diff --git a/README.md b/README.md index 221ea02..bc495d4 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ one can estimate the error as standard deviation between the N bootstrapping run Autocorrelation Estimates, JCTC, 6(12), 3713-3720*. To perform bayesian bootstrapping in WHAM, use the ```-bt ``` flag to perform individual bootstrapping -runs. The error estimates of bin probabilities and free energy will be given as separate column (+/-) in the output file. -If no error analysis is performed, these columns are set to 0.0. +runs. The error estimates of bin probabilities and free energy will be given as standard error (SE) in a +separate column (+/-) in the output file. If no error analysis is performed, these columns are set to 0.0. Examples --- diff --git a/example/1d_cyclic/wham.out b/example/1d_cyclic/wham.out index 8f33915..62ffce8 100644 --- a/example/1d_cyclic/wham.out +++ b/example/1d_cyclic/wham.out @@ -1,101 +1,101 @@ #coord1 Free Energy +/- Probability +/- --3.110177 7.158102 0.476037 0.003494 0.000667 --3.047345 5.365727 0.470738 0.007168 0.001353 --2.984513 3.873190 0.433120 0.013039 0.002264 --2.921681 2.953162 0.441412 0.018855 0.003337 --2.858849 1.949554 0.443549 0.028195 0.005014 --2.796017 1.391747 0.407397 0.035261 0.005759 --2.733186 1.128270 0.380789 0.039189 0.005983 --2.670354 0.839970 0.370008 0.043991 0.006526 --2.607522 0.624769 0.381081 0.047955 0.007326 --2.544690 0.663757 0.389082 0.047211 0.007364 --2.481858 1.051932 0.379999 0.040407 0.006156 --2.419026 1.463048 0.394914 0.034267 0.005425 --2.356194 1.990616 0.335141 0.027734 0.003726 --2.293363 2.190692 0.196497 0.025597 0.002016 --2.230531 2.553036 0.177045 0.022136 0.001571 --2.167699 2.572522 0.208798 0.021964 0.001839 --2.104867 2.472360 0.168929 0.022863 0.001548 --2.042035 2.517562 0.166774 0.022453 0.001501 --1.979203 2.469778 0.182308 0.022887 0.001673 --1.916372 2.223125 0.405294 0.025266 0.004105 --1.853540 2.080157 0.340376 0.026756 0.003651 --1.790708 1.793841 0.394974 0.030011 0.004752 --1.727876 1.458784 0.335956 0.034326 0.004623 --1.665044 0.914441 0.336724 0.042697 0.005764 --1.602212 0.303813 0.320695 0.054540 0.007012 --1.539380 0.268335 0.330495 0.055321 0.007330 --1.476549 0.000000 0.338143 0.061604 0.008351 --1.413717 0.537061 0.369220 0.049671 0.007352 --1.350885 1.439940 0.381006 0.034586 0.005283 --1.288053 2.391838 0.407306 0.023614 0.003856 --1.225221 3.779470 0.413629 0.013538 0.002245 --1.162389 5.685555 0.432485 0.006305 0.001093 --1.099557 7.661896 0.446994 0.002855 0.000512 --1.036726 9.946594 0.489990 0.001142 0.000224 --0.973894 12.359408 0.544847 0.000434 0.000095 --0.911062 14.954655 0.622373 0.000153 0.000038 --0.848230 17.742242 0.747233 0.000050 0.000015 --0.785398 20.555785 0.921773 0.000016 0.000006 --0.722566 22.811160 1.179343 0.000007 0.000003 --0.659734 25.178094 1.484376 0.000003 0.000002 --0.596903 26.442288 1.565063 0.000002 0.000001 --0.534071 27.897565 1.418232 0.000001 0.000000 --0.471239 29.062473 1.246738 0.000001 0.000000 --0.408407 30.384521 1.231662 0.000000 0.000000 --0.345575 31.638454 1.209295 0.000000 0.000000 --0.282743 32.817727 1.291637 0.000000 0.000000 --0.219911 33.770369 1.323362 0.000000 0.000000 --0.157080 34.505503 1.396454 0.000000 0.000000 --0.094248 35.431659 1.662548 0.000000 0.000000 --0.031416 35.615810 1.766523 0.000000 0.000000 -0.031416 35.561946 1.799603 0.000000 0.000000 -0.094248 35.382089 1.374764 0.000000 0.000000 -0.157080 34.934827 1.659669 0.000000 0.000000 -0.219911 33.673460 1.317449 0.000000 0.000000 -0.282743 32.731563 1.191975 0.000000 0.000000 -0.345575 31.261855 1.199834 0.000000 0.000000 -0.408407 29.717377 1.339899 0.000000 0.000000 -0.471239 28.076620 1.303458 0.000001 0.000000 -0.534071 26.481097 1.281459 0.000002 0.000001 -0.596903 24.487358 1.251139 0.000003 0.000002 -0.659734 22.344251 1.233967 0.000008 0.000004 -0.722566 20.241543 1.251834 0.000018 0.000009 -0.785398 18.341869 1.241684 0.000039 0.000020 -0.848230 16.261582 1.281159 0.000091 0.000047 -0.911062 14.301801 1.294427 0.000199 0.000103 -0.973894 12.603788 1.270069 0.000394 0.000200 -1.036726 11.249601 1.273360 0.000678 0.000346 -1.099557 10.087886 1.280795 0.001079 0.000554 -1.162389 9.443303 1.266983 0.001398 0.000710 -1.225221 9.152799 1.255009 0.001570 0.000790 -1.288053 9.331937 1.256822 0.001462 0.000736 -1.350885 9.905546 1.251237 0.001161 0.000583 -1.413717 11.042050 1.263816 0.000736 0.000373 -1.476549 12.598167 1.275325 0.000395 0.000202 -1.539380 14.520167 1.280735 0.000183 0.000094 -1.602212 16.569783 1.295384 0.000080 0.000042 -1.665044 18.687390 1.309518 0.000034 0.000018 -1.727876 20.775408 1.356414 0.000015 0.000008 -1.790708 22.905200 1.308568 0.000006 0.000003 -1.853540 24.643852 1.425870 0.000003 0.000002 -1.916372 26.301740 1.362138 0.000002 0.000001 -1.979203 27.372071 1.391716 0.000001 0.000001 -2.042035 28.697726 1.504676 0.000001 0.000000 -2.104867 29.417901 1.369019 0.000000 0.000000 -2.167699 30.008351 1.409081 0.000000 0.000000 -2.230531 30.406016 1.240128 0.000000 0.000000 -2.293363 30.171275 1.179444 0.000000 0.000000 -2.356194 29.884646 1.219365 0.000000 0.000000 -2.419026 29.428153 1.177281 0.000000 0.000000 -2.481858 28.546982 1.351057 0.000001 0.000000 -2.544690 27.757520 1.238695 0.000001 0.000000 -2.607522 26.505787 1.308430 0.000001 0.000001 -2.670354 24.491866 1.039660 0.000003 0.000001 -2.733186 22.320664 0.927893 0.000008 0.000003 -2.796017 20.052723 0.894483 0.000020 0.000007 -2.858849 17.655650 0.893580 0.000052 0.000019 -2.921681 15.471590 0.930897 0.000125 0.000047 -2.984513 13.138167 0.837026 0.000318 0.000107 -3.047345 11.092386 0.674785 0.000722 0.000195 -3.110177 9.065722 0.521230 0.001626 0.000340 +-3.110177 7.158102 0.047604 0.003494 0.000067 +-3.047345 5.365727 0.047074 0.007168 0.000135 +-2.984513 3.873190 0.043312 0.013039 0.000226 +-2.921681 2.953162 0.044141 0.018855 0.000334 +-2.858849 1.949554 0.044355 0.028195 0.000501 +-2.796017 1.391747 0.040740 0.035261 0.000576 +-2.733186 1.128270 0.038079 0.039189 0.000598 +-2.670354 0.839970 0.037001 0.043991 0.000653 +-2.607522 0.624769 0.038108 0.047955 0.000733 +-2.544690 0.663757 0.038908 0.047211 0.000736 +-2.481858 1.051932 0.038000 0.040407 0.000616 +-2.419026 1.463048 0.039491 0.034267 0.000543 +-2.356194 1.990616 0.033514 0.027734 0.000373 +-2.293363 2.190692 0.019650 0.025597 0.000202 +-2.230531 2.553036 0.017705 0.022136 0.000157 +-2.167699 2.572522 0.020880 0.021964 0.000184 +-2.104867 2.472360 0.016893 0.022863 0.000155 +-2.042035 2.517562 0.016677 0.022453 0.000150 +-1.979203 2.469778 0.018231 0.022887 0.000167 +-1.916372 2.223125 0.040529 0.025266 0.000411 +-1.853540 2.080157 0.034038 0.026756 0.000365 +-1.790708 1.793841 0.039497 0.030011 0.000475 +-1.727876 1.458784 0.033596 0.034326 0.000462 +-1.665044 0.914441 0.033672 0.042697 0.000576 +-1.602212 0.303813 0.032070 0.054540 0.000701 +-1.539380 0.268335 0.033050 0.055321 0.000733 +-1.476549 0.000000 0.033814 0.061604 0.000835 +-1.413717 0.537061 0.036922 0.049671 0.000735 +-1.350885 1.439940 0.038101 0.034586 0.000528 +-1.288053 2.391838 0.040731 0.023614 0.000386 +-1.225221 3.779470 0.041363 0.013538 0.000224 +-1.162389 5.685555 0.043248 0.006305 0.000109 +-1.099557 7.661896 0.044699 0.002855 0.000051 +-1.036726 9.946594 0.048999 0.001142 0.000022 +-0.973894 12.359408 0.054485 0.000434 0.000009 +-0.911062 14.954655 0.062237 0.000153 0.000004 +-0.848230 17.742242 0.074723 0.000050 0.000002 +-0.785398 20.555785 0.092177 0.000016 0.000001 +-0.722566 22.811160 0.117934 0.000007 0.000000 +-0.659734 25.178094 0.148438 0.000003 0.000000 +-0.596903 26.442288 0.156506 0.000002 0.000000 +-0.534071 27.897565 0.141823 0.000001 0.000000 +-0.471239 29.062473 0.124674 0.000001 0.000000 +-0.408407 30.384521 0.123166 0.000000 0.000000 +-0.345575 31.638454 0.120930 0.000000 0.000000 +-0.282743 32.817727 0.129164 0.000000 0.000000 +-0.219911 33.770369 0.132336 0.000000 0.000000 +-0.157080 34.505503 0.139645 0.000000 0.000000 +-0.094248 35.431659 0.166255 0.000000 0.000000 +-0.031416 35.615810 0.176652 0.000000 0.000000 +0.031416 35.561946 0.179960 0.000000 0.000000 +0.094248 35.382089 0.137476 0.000000 0.000000 +0.157080 34.934827 0.165967 0.000000 0.000000 +0.219911 33.673460 0.131745 0.000000 0.000000 +0.282743 32.731563 0.119197 0.000000 0.000000 +0.345575 31.261855 0.119983 0.000000 0.000000 +0.408407 29.717377 0.133990 0.000000 0.000000 +0.471239 28.076620 0.130346 0.000001 0.000000 +0.534071 26.481097 0.128146 0.000002 0.000000 +0.596903 24.487358 0.125114 0.000003 0.000000 +0.659734 22.344251 0.123397 0.000008 0.000000 +0.722566 20.241543 0.125183 0.000018 0.000001 +0.785398 18.341869 0.124168 0.000039 0.000002 +0.848230 16.261582 0.128116 0.000091 0.000005 +0.911062 14.301801 0.129443 0.000199 0.000010 +0.973894 12.603788 0.127007 0.000394 0.000020 +1.036726 11.249601 0.127336 0.000678 0.000035 +1.099557 10.087886 0.128080 0.001079 0.000055 +1.162389 9.443303 0.126698 0.001398 0.000071 +1.225221 9.152799 0.125501 0.001570 0.000079 +1.288053 9.331937 0.125682 0.001462 0.000074 +1.350885 9.905546 0.125124 0.001161 0.000058 +1.413717 11.042050 0.126382 0.000736 0.000037 +1.476549 12.598167 0.127533 0.000395 0.000020 +1.539380 14.520167 0.128074 0.000183 0.000009 +1.602212 16.569783 0.129538 0.000080 0.000004 +1.665044 18.687390 0.130952 0.000034 0.000002 +1.727876 20.775408 0.135641 0.000015 0.000001 +1.790708 22.905200 0.130857 0.000006 0.000000 +1.853540 24.643852 0.142587 0.000003 0.000000 +1.916372 26.301740 0.136214 0.000002 0.000000 +1.979203 27.372071 0.139172 0.000001 0.000000 +2.042035 28.697726 0.150468 0.000001 0.000000 +2.104867 29.417901 0.136902 0.000000 0.000000 +2.167699 30.008351 0.140908 0.000000 0.000000 +2.230531 30.406016 0.124013 0.000000 0.000000 +2.293363 30.171275 0.117944 0.000000 0.000000 +2.356194 29.884646 0.121937 0.000000 0.000000 +2.419026 29.428153 0.117728 0.000000 0.000000 +2.481858 28.546982 0.135106 0.000001 0.000000 +2.544690 27.757520 0.123869 0.000001 0.000000 +2.607522 26.505787 0.130843 0.000001 0.000000 +2.670354 24.491866 0.103966 0.000003 0.000000 +2.733186 22.320664 0.092789 0.000008 0.000000 +2.796017 20.052723 0.089448 0.000020 0.000001 +2.858849 17.655650 0.089358 0.000052 0.000002 +2.921681 15.471590 0.093090 0.000125 0.000005 +2.984513 13.138167 0.083703 0.000318 0.000011 +3.047345 11.092386 0.067479 0.000722 0.000020 +3.110177 9.065722 0.052123 0.001626 0.000034 diff --git a/src/error_analysis.rs b/src/error_analysis.rs index 5f9dcf0..31454ba 100644 --- a/src/error_analysis.rs +++ b/src/error_analysis.rs @@ -43,16 +43,17 @@ pub fn run_bootstrap(cfg: &Config, ds: Dataset, P: &[f64], num_runs: usize) -> ( perform_wham(cfg, &rnd_weighted_dataset).unwrap().0 }).collect(); - // Evaulate standard deviation of P per bin - let mut P_std = vec![0.0; ds.num_bins]; + // Standard error (SE) of P per bin + // SE = SD/sqrt(n) + let mut P_se = vec![0.0; ds.num_bins]; for bin in 0..ds.num_bins { let Ps = bootstrapped_Ps.iter().map(|window| window[bin]).collect::>(); - P_std[bin] = statistics::sd(&Ps, 1, num_runs); + P_se[bin] = statistics::sd(&Ps, 1, num_runs)/(num_runs as f64).sqrt(); } - // A_std by error propagation - let A_std = P_std.iter().zip(P.iter()).map(|(std,P)| ds.kT*1.0/P*std).collect(); - (P_std, A_std) + // SE of A by error propagation + let A_se = P_se.iter().zip(P.iter()).map(|(se,P)| ds.kT*1.0/P*se).collect(); + (P_se, A_se) } #[cfg(tests)]