mirror of
https://github.com/dnlbauer/WHAM.git
synced 2026-09-10 22:25:31 +00:00
Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a366d89713 | ||
|
|
545c0ecbd3 | ||
|
|
23548dadfb | ||
|
|
6f0a00ace9 | ||
|
|
0c4e015aa5 | ||
|
|
9392a3365c | ||
|
|
3532d474ed | ||
|
|
f8ca61d5d0 | ||
|
|
b143f7a65a | ||
|
|
6f35f15e46 | ||
|
|
b6881a6db1 | ||
|
|
ec7024a285 | ||
|
|
b6f338058a | ||
|
|
e0d2c1375a | ||
|
|
8802979a8e | ||
|
|
2d32d795f5 | ||
|
|
35ca1b1317 | ||
|
|
d9a219a36a | ||
|
|
2c565dee28 | ||
|
|
c05becea22 | ||
|
|
c27dbb7ab5 | ||
|
|
c9e18ebda9 | ||
|
|
0b5d0ebecd | ||
|
|
091b1f1382 | ||
|
|
9849c00321 | ||
|
|
034586d08e | ||
|
|
cc4448f1d8 | ||
|
|
5ca708abf1 | ||
|
|
31ffb5958d | ||
|
|
ffab55e0e1 | ||
|
|
69d0c7ca00 | ||
|
|
8a88d7742a | ||
|
|
18debf1a28 | ||
|
|
a856e5d34f | ||
|
|
2cc34919b0 | ||
|
|
cd57289211 | ||
|
|
9d8423bce9 | ||
|
|
2876c1dc3a | ||
|
|
b9d08ae24b | ||
|
|
07fc8344fe | ||
|
|
d7eea7aa03 | ||
|
|
3d93693eac | ||
|
|
38c30baa5b | ||
|
|
b130596fe8 | ||
|
|
05451a6cb2 | ||
|
|
bf8bf39319 | ||
|
|
6c63eda769 | ||
|
|
1bbafeba70 | ||
|
|
64f468e636 | ||
|
|
2f93b77879 | ||
|
|
b148998b11 | ||
|
|
87f3cceb6a |
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
rebase-strategy: "disabled"
|
||||
45
.github/workflows/build.yml
vendored
Normal file
45
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Cargo Build and Test
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
name: WHAM Test
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- run: cargo build --verbose
|
||||
- run: cargo test --verbose
|
||||
|
||||
publish:
|
||||
name: WHAM Publish
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_and_test]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: katyo/publish-crates@v2
|
||||
with:
|
||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
ignore-unpublished-changes: true
|
||||
dry-run: ${{ github.event_name != 'push' }}
|
||||
|
||||
291
Cargo.lock
generated
291
Cargo.lock
generated
@@ -1,39 +1,21 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "GSL"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7830156ea389bcbbdc8f01bf140b609b892bf7cbd0ec6ccf9957ea2be6f25ad3"
|
||||
dependencies = [
|
||||
"c_vec",
|
||||
"libc",
|
||||
"pkg-config",
|
||||
]
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.13.0"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072"
|
||||
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "adler"
|
||||
version = "0.2.3"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "assert_approx_eq"
|
||||
@@ -54,17 +36,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.1"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.50"
|
||||
version = "0.3.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293"
|
||||
checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
@@ -74,99 +57,88 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "c_vec"
|
||||
version = "1.0.12"
|
||||
name = "cc"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa9e1d9f7d49e289f36f19effbf3d5a5e30163ecf9c7a3c9be94d5374dec5b9a"
|
||||
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "2.33.3"
|
||||
version = "3.2.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
|
||||
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"atty",
|
||||
"bitflags",
|
||||
"clap_lex",
|
||||
"indexmap",
|
||||
"strsim",
|
||||
"termcolor",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
"vec_map",
|
||||
"yaml-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cloudabi"
|
||||
version = "0.0.3"
|
||||
name = "clap_lex"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
|
||||
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",
|
||||
"os_str_bytes",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.7.3"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
|
||||
checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-epoch",
|
||||
"crossbeam-utils",
|
||||
"maybe-uninit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.8.2"
|
||||
version = "0.9.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
|
||||
checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"maybe-uninit",
|
||||
"memoffset",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.7.2"
|
||||
version = "0.8.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
|
||||
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.6.0"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f"
|
||||
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
|
||||
|
||||
[[package]]
|
||||
name = "error-chain"
|
||||
@@ -179,188 +151,203 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fuchsia-cprng"
|
||||
version = "0.1.1"
|
||||
name = "getrandom"
|
||||
version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
|
||||
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gimli"
|
||||
version = "0.22.0"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"
|
||||
checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.15"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
name = "indexmap"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.77"
|
||||
version = "0.2.149"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
|
||||
checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
||||
|
||||
[[package]]
|
||||
name = "maybe-uninit"
|
||||
version = "2.0.0"
|
||||
name = "linked-hash-map"
|
||||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
|
||||
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.5.5"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f"
|
||||
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.4.2"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9"
|
||||
checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
|
||||
dependencies = [
|
||||
"adler",
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.20.0"
|
||||
version = "0.32.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5"
|
||||
checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.18"
|
||||
name = "os_str_bytes"
|
||||
version = "6.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33"
|
||||
checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.5.6"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
|
||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"cloudabi",
|
||||
"fuchsia-cprng",
|
||||
"libc",
|
||||
"rand_core 0.3.1",
|
||||
"winapi",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
name = "rand_chacha"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
|
||||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
dependencies = [
|
||||
"rand_core 0.4.2",
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.4.2"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.4.0"
|
||||
version = "1.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cfd016f0c045ad38b5251be2c9c0ab806917f82da4d36b2a327e5166adad9270"
|
||||
checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"crossbeam-deque",
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.8.0"
|
||||
version = "1.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91739a34c4355b5434ce54c9086c5895604a9c278586d1f1aa95e04f66b525a0"
|
||||
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.16"
|
||||
version = "0.1.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
|
||||
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.8.0"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
name = "termcolor"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.8"
|
||||
name = "textwrap"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.2"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "wham"
|
||||
version = "0.9.8"
|
||||
version = "1.1.4"
|
||||
dependencies = [
|
||||
"GSL",
|
||||
"assert_approx_eq",
|
||||
"clap",
|
||||
"error-chain",
|
||||
@@ -384,6 +371,15 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
@@ -392,6 +388,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "yaml-rust"
|
||||
version = "0.3.5"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992"
|
||||
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
|
||||
dependencies = [
|
||||
"linked-hash-map",
|
||||
]
|
||||
|
||||
19
Cargo.toml
19
Cargo.toml
@@ -1,23 +1,26 @@
|
||||
[package]
|
||||
name = "wham"
|
||||
version = "0.9.8"
|
||||
version = "1.1.4"
|
||||
authors = ["Daniel Bauer <bauer@cbs.tu-darmstadt.de>"]
|
||||
description = "An implementation of the weighted histogram analysis method"
|
||||
license = "GPL-3.0"
|
||||
repository = "https://github.com/danijoo/WHAM"
|
||||
readme = "README.md"
|
||||
categories = ["science", "command-line-utilities", "algorithms"]
|
||||
keywords = ["math", "statistics", "histogram", "bioinformatics", "molecular-dynamics"]
|
||||
exclude = [
|
||||
"example/*"
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
clap = {version="2.32.0", features=['yaml']}
|
||||
clap = {version="3.2.25", features=['yaml']}
|
||||
error-chain = "0.12.0"
|
||||
rand = "0.5.5"
|
||||
GSL = "1.0.0"
|
||||
rayon = "1.0.3"
|
||||
rand = "0.8.*"
|
||||
rayon = "1.8.1"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_approx_eq = "1.1.0"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 2
|
||||
opt-level = 3
|
||||
|
||||
[features]
|
||||
default = ["GSL/v2"]
|
||||
|
||||
103
README.md
103
README.md
@@ -12,19 +12,14 @@ from umbrella sampling simulations. For more details on the method, I suggest *R
|
||||
Features
|
||||
---
|
||||
- Fast, especially for small systems
|
||||
- Multithreaded
|
||||
- Multidimensional
|
||||
- Error analysis
|
||||
- Multithreaded (automatically runs on all available cores)
|
||||
- Multidimensional (any number of collective variables are possible)
|
||||
- Autocorrelation to remove correlated samples
|
||||
- Error analysis via bootstrapping
|
||||
- Unit tested
|
||||
|
||||
Installation
|
||||
---
|
||||
WHAM requires the GSL library to be installed:
|
||||
```bash
|
||||
# on debian/ubuntu:
|
||||
sudo apt-get install libgsl0-dev
|
||||
```
|
||||
|
||||
Installation from source via cargo:
|
||||
```bash
|
||||
# cargo installation
|
||||
@@ -38,7 +33,71 @@ Usage
|
||||
wham has a convenient command line interface. You can see all options with
|
||||
```wham -h```:
|
||||
|
||||
To run the two dimensional example (simulation of dialanine phi and psi angle):
|
||||
```
|
||||
wham 1.1.0
|
||||
D. Bauer <bauer@cbs.tu-darmstadt.de>
|
||||
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.
|
||||
|
||||
Metadata file format:
|
||||
/path/to/timeseries_file1 x_1 x_2 x_N fc_1 fc_2 fc_N
|
||||
/path/to/timeseries_file2 x_1 x_2 x_N fc_1 fc_2 fc_N
|
||||
/path/to/timeseries_file3 x_1 x_2 x_N fc_1 fc_2 fc_N
|
||||
The first column is a path to a timeseries file _relative_ to the metadata file (see below). This is followed by the
|
||||
position of the umbrella potential x in N dimensions and the force constant fc in each dimension. Lines starting with a
|
||||
# are treated as comments and will not be parsed.
|
||||
|
||||
Timeseries file format:
|
||||
time x_1 x_2 x_N
|
||||
time x_1 x_2 x_N
|
||||
time x_1 x_2 x_N
|
||||
The first column will be ignored and is followed by N reaction coordinates x.
|
||||
|
||||
Shipped under the GPLv3 license.
|
||||
|
||||
USAGE:
|
||||
wham [FLAGS] [OPTIONS] --bins <BINS> --max <HIST_MAX> --file <METADATA> --min <HIST_MIN> --temperature <temperature>
|
||||
|
||||
FLAGS:
|
||||
-c, --cyclic For periodic reaction coordinates. If this is set, the first and last coordinate bin in each
|
||||
dimension are treated as neighbors for the bias calculation.
|
||||
-h, --help Prints help information
|
||||
-g, --uncorr Estimates statistical inefficiency of each timeseries via autocorrelation and removes correlated
|
||||
samples (default is off).
|
||||
-V, --version Prints version information
|
||||
-v, --verbose Enables verbose output.
|
||||
|
||||
OPTIONS:
|
||||
-b, --bins <BINS> Number of histogram bins (comma separated).
|
||||
--bt <bootstrap> Number of bayesian bootstrapping runs for error analysis by assigning random
|
||||
weights (defaults to 0).
|
||||
--seed <bootstrap_seed> Random seed for bootstrapping runs.
|
||||
--convdt <convdt> Performs WHAM for slices with the given delta in time and returns an output file
|
||||
for each slice. THis is useful to check the result for convergence. Example: with
|
||||
--convdt 100 and a timeseries ranging from 0-300, free energy surfaces for slices
|
||||
0-100, 0-200 and 0-300 will be given returned.
|
||||
--end <end> Skip rows in timeseries with an index larger than this value (defaults to 1e+20)
|
||||
-i, --iterations <ITERATIONS> Stop WHAM after this many iterations without convergence (defaults to 100,000).
|
||||
--max <HIST_MAX> Histogram maxima (comma separated). Also accepts "pi".
|
||||
-f, --file <METADATA> Path to the metadata file.
|
||||
--min <HIST_MIN> Histogram minima (comma separated for multiple dimensions). Also accepts "pi".
|
||||
-o, --output <output> Free energy output file (defaults to wham.out).
|
||||
--start <start> Skip rows in timeseries with an index smaller than this value (defaults to 0)
|
||||
-T, --temperature <temperature> WHAM temperature in Kelvin.
|
||||
-t, --tolerance <TOLERANCE> Abortion criteria for WHAM calculation. WHAM stops if abs(F_new - F_old) <
|
||||
tolerance (defaults to 0.000001).
|
||||
```
|
||||
|
||||
Examples
|
||||
---
|
||||
The example folder contains input and output files for two simple test systems:
|
||||
|
||||
- 1d_cyclic: Phi torsion angle of dialanine in vaccum
|
||||
- 2d_cyclic: Phi and psi torsion angles of the same system
|
||||
|
||||
The command below will run the two dimensional example (simulation of dialanine phi and psi angle) and calculate the free energy based on the two collective variables
|
||||
in the range of -3.14 to 3.14, with 100 bins in each dimension and periodic collective variables:
|
||||
|
||||
```bash
|
||||
wham --max 3.14,3.14 --min -3.14,-3.14 -T 300 --bins 100,100 --cyclic -f example/2d/metadata.dat
|
||||
> Supplied WHAM options: Metadata=example/2d/metadata.dat, hist_min=[-3.14, -3.14], hist_max=[3.14, 3.14], bins=[100, 100] verbose=false, tolerance=0.000001, iterations=100000, temperature=300, cyclic=true
|
||||
@@ -55,7 +114,6 @@ wham --max 3.14,3.14 --min -3.14,-3.14 -T 300 --bins 100,100 --cyclic -f example
|
||||
```
|
||||
After convergence, final bias offsets (F) and the free energy will be dumped to stdout and the output file is written.
|
||||
|
||||
|
||||
The output file contains the free energy and probability for each bin. Probabilities are normalized to sum to P=1.0 and
|
||||
the smallest free energy is set to 0 (with other free energies based on that).
|
||||
```
|
||||
@@ -75,7 +133,7 @@ the smallest free energy is set to 0 (with other free energies based on that).
|
||||
Error analysis
|
||||
---
|
||||
WHAM can perform error analysis using the bayesian bootstrapping method. Every simulation window is assumed to be an
|
||||
individual set of data point. By calculating probabilities N times with randomly assigned weights for each window,
|
||||
individual set of data points. By calculating probabilities N times with randomly assigned weights for each window,
|
||||
one can estimate the error as standard deviation between the N bootstrapping runs. For more details see
|
||||
*Van der Spoel, D. et al. (2010). g_wham—A Free Weighted Histogram Analysis Implementation Including Robust Error and
|
||||
Autocorrelation Estimates, JCTC, 6(12), 3713-3720*.
|
||||
@@ -84,26 +142,23 @@ To perform bayesian bootstrapping in WHAM, use the ```-bt <RUNS>``` flag to perf
|
||||
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
|
||||
Autocorrelation analysis
|
||||
---
|
||||
The example folder contains input and output files for two simple test systems:
|
||||
With the ```--uncorr``` flag, WHAM calculates the autocorrelation time ```tau``` for all timeseries and all collective
|
||||
variables. Timeseries are then filtered based on their highest autocorrelation time to remove correlated samples from
|
||||
the dataset. This reduces the number of data points but can improve the accuracy of the result.
|
||||
|
||||
- 1d_cyclic: Phi torsion angle of dialanine in vaccum
|
||||
- 2d_cyclic: Phi and psi torsion angles of the same system
|
||||
|
||||
|
||||
TODO
|
||||
---
|
||||
- better error estimation
|
||||
- Autocorrelation
|
||||
- Replica exchange
|
||||
For filtering, the statistical inefficiency `g` is calculated: ```g = 1 + 2*tau```, and only every `g`th element of the
|
||||
timeseries is used for unbiasing. A more detailed description of the method can be found in
|
||||
*Chodera, J.D. et al. (2007). Use of the weighted histogram analysis method for the analysis of simulated and parallel
|
||||
tempering simulations, JCTC 3(1):26-41*
|
||||
|
||||
License & Citing
|
||||
---
|
||||
WHAM is licensed under the GPL-3.0 license. Please read the LICENSE file in this
|
||||
repository for more information.
|
||||
|
||||
There's no publication for this WHAM implementation. However, there is a citeabe DOI. If you use this software for your work, please consider citing it: *Bauer, D, WHAM - An efficient weighted histogram analysis implementation written in Rust, Zenodo. https://doi.org/10.5281/zenodo.1488597*
|
||||
There's no publication for this WHAM implementation. However, there is a citeabe DOI. If you use this software for your work, please consider citing it: *Bauer, D., WHAM - An efficient weighted histogram analysis implementation written in Rust, Zenodo. https://doi.org/10.5281/zenodo.1488597*
|
||||
|
||||
Parts of this work, especially some perfomance optimizations and the I/O format, are inspired by the
|
||||
implementation of A. Grossfield (*Grossfield, A, WHAM: the weighted histogram analysis method, http://membrane.urmc.rochester.edu/content/wham*).
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
#coord1 Free Energy +/- Probability +/-
|
||||
-3.110177 7.158102 0.069244 0.003494 0.000067
|
||||
-3.047345 5.365727 0.068503 0.007168 0.000135
|
||||
-2.984513 3.873190 0.065883 0.013039 0.000226
|
||||
-2.921681 2.953162 0.066856 0.018855 0.000334
|
||||
-2.858849 1.949554 0.066705 0.028195 0.000501
|
||||
-2.796017 1.391747 0.064012 0.035261 0.000576
|
||||
-2.733186 1.128270 0.061522 0.039189 0.000598
|
||||
-2.670354 0.839970 0.060810 0.043991 0.000653
|
||||
-2.607522 0.624769 0.061888 0.047955 0.000733
|
||||
-2.544690 0.663757 0.062566 0.047211 0.000736
|
||||
-2.481858 1.051932 0.061093 0.040407 0.000616
|
||||
-2.419026 1.463048 0.062547 0.034267 0.000543
|
||||
-2.356194 1.990616 0.057022 0.027734 0.000373
|
||||
-2.293363 2.190692 0.044029 0.025597 0.000202
|
||||
-2.230531 2.553036 0.041867 0.022136 0.000157
|
||||
-2.167699 2.572522 0.044817 0.021964 0.000184
|
||||
-2.104867 2.472360 0.038778 0.022863 0.000155
|
||||
-2.042035 2.517562 0.030296 0.022453 0.000150
|
||||
-1.979203 2.469778 0.025852 0.022887 0.000167
|
||||
-1.916372 2.223125 0.030799 0.025266 0.000411
|
||||
-1.853540 2.080157 0.024928 0.026756 0.000365
|
||||
-1.790708 1.793841 0.027529 0.030011 0.000475
|
||||
-1.727876 1.458784 0.026130 0.034326 0.000462
|
||||
-1.665044 0.914441 0.024774 0.042697 0.000576
|
||||
-1.602212 0.303813 0.020400 0.054540 0.000701
|
||||
-1.539380 0.268335 0.020423 0.055321 0.000733
|
||||
-1.476549 0.000000 0.020271 0.061604 0.000835
|
||||
-1.413717 0.537061 0.023895 0.049671 0.000735
|
||||
-1.350885 1.439940 0.023678 0.034586 0.000528
|
||||
-1.288053 2.391838 0.025951 0.023614 0.000386
|
||||
-1.225221 3.779470 0.026215 0.013538 0.000224
|
||||
-1.162389 5.685555 0.028543 0.006305 0.000109
|
||||
-1.099557 7.661896 0.030579 0.002855 0.000051
|
||||
-1.036726 9.946594 0.039243 0.001142 0.000022
|
||||
-0.973894 12.359408 0.054067 0.000434 0.000009
|
||||
-0.911062 14.954655 0.066597 0.000153 0.000004
|
||||
-0.848230 17.742242 0.073582 0.000050 0.000002
|
||||
-0.785398 20.555785 0.074644 0.000016 0.000001
|
||||
-0.722566 22.811160 0.078503 0.000007 0.000000
|
||||
-0.659734 25.178094 0.088961 0.000003 0.000000
|
||||
-0.596903 26.442288 0.093509 0.000002 0.000000
|
||||
-0.534071 27.897565 0.091353 0.000001 0.000000
|
||||
-0.471239 29.062473 0.086244 0.000001 0.000000
|
||||
-0.408407 30.384521 0.084285 0.000000 0.000000
|
||||
-0.345575 31.638454 0.084871 0.000000 0.000000
|
||||
-0.282743 32.817727 0.092750 0.000000 0.000000
|
||||
-0.219911 33.770369 0.094479 0.000000 0.000000
|
||||
-0.157080 34.505503 0.095774 0.000000 0.000000
|
||||
-0.094248 35.431659 0.107598 0.000000 0.000000
|
||||
-0.031416 35.615810 0.108959 0.000000 0.000000
|
||||
0.031416 35.561946 0.107382 0.000000 0.000000
|
||||
0.094248 35.382089 0.096643 0.000000 0.000000
|
||||
0.157080 34.934827 0.107624 0.000000 0.000000
|
||||
0.219911 33.673460 0.100231 0.000000 0.000000
|
||||
0.282743 32.731563 0.096604 0.000000 0.000000
|
||||
0.345575 31.261855 0.099036 0.000000 0.000000
|
||||
0.408407 29.717377 0.107915 0.000000 0.000000
|
||||
0.471239 28.076620 0.104513 0.000001 0.000000
|
||||
0.534071 26.481097 0.103164 0.000002 0.000000
|
||||
0.596903 24.487358 0.103039 0.000003 0.000000
|
||||
0.659734 22.344251 0.100666 0.000008 0.000000
|
||||
0.722566 20.241543 0.102150 0.000018 0.000001
|
||||
0.785398 18.341869 0.101957 0.000039 0.000002
|
||||
0.848230 16.261582 0.105391 0.000091 0.000005
|
||||
0.911062 14.301801 0.107389 0.000199 0.000010
|
||||
0.973894 12.603788 0.105487 0.000394 0.000020
|
||||
1.036726 11.249601 0.106308 0.000678 0.000035
|
||||
1.099557 10.087886 0.106741 0.001079 0.000055
|
||||
1.162389 9.443303 0.106957 0.001398 0.000071
|
||||
1.225221 9.152799 0.105940 0.001570 0.000079
|
||||
1.288053 9.331937 0.105860 0.001462 0.000074
|
||||
1.350885 9.905546 0.105389 0.001161 0.000058
|
||||
1.413717 11.042050 0.105466 0.000736 0.000037
|
||||
1.476549 12.598167 0.105119 0.000395 0.000020
|
||||
1.539380 14.520167 0.104367 0.000183 0.000009
|
||||
1.602212 16.569783 0.104184 0.000080 0.000004
|
||||
1.665044 18.687390 0.104276 0.000034 0.000002
|
||||
1.727876 20.775408 0.104944 0.000015 0.000001
|
||||
1.790708 22.905200 0.101547 0.000006 0.000000
|
||||
1.853540 24.643852 0.103914 0.000003 0.000000
|
||||
1.916372 26.301740 0.101973 0.000002 0.000000
|
||||
1.979203 27.372071 0.101762 0.000001 0.000000
|
||||
2.042035 28.697726 0.105177 0.000001 0.000000
|
||||
2.104867 29.417901 0.100003 0.000000 0.000000
|
||||
2.167699 30.008351 0.100038 0.000000 0.000000
|
||||
2.230531 30.406016 0.096233 0.000000 0.000000
|
||||
2.293363 30.171275 0.096428 0.000000 0.000000
|
||||
2.356194 29.884646 0.108339 0.000000 0.000000
|
||||
2.419026 29.428153 0.106679 0.000000 0.000000
|
||||
2.481858 28.546982 0.123259 0.000001 0.000000
|
||||
2.544690 27.757520 0.108526 0.000001 0.000000
|
||||
2.607522 26.505787 0.111134 0.000001 0.000000
|
||||
2.670354 24.491866 0.095963 0.000003 0.000000
|
||||
2.733186 22.320664 0.096576 0.000008 0.000000
|
||||
2.796017 20.052723 0.098813 0.000020 0.000001
|
||||
2.858849 17.655650 0.097052 0.000052 0.000002
|
||||
2.921681 15.471590 0.100497 0.000125 0.000005
|
||||
2.984513 13.138167 0.092102 0.000318 0.000011
|
||||
3.047345 11.092386 0.081862 0.000722 0.000020
|
||||
3.110177 9.065722 0.072111 0.001626 0.000034
|
||||
-3.110177 7.158102 0.000000 0.003494 0.000000
|
||||
-3.047345 5.365727 0.000000 0.007168 0.000000
|
||||
-2.984513 3.873190 0.000000 0.013039 0.000000
|
||||
-2.921681 2.953162 0.000000 0.018855 0.000000
|
||||
-2.858849 1.949554 0.000000 0.028195 0.000000
|
||||
-2.796017 1.391747 0.000000 0.035261 0.000000
|
||||
-2.733186 1.128270 0.000000 0.039189 0.000000
|
||||
-2.670354 0.839970 0.000000 0.043991 0.000000
|
||||
-2.607522 0.624769 0.000000 0.047955 0.000000
|
||||
-2.544690 0.663757 0.000000 0.047211 0.000000
|
||||
-2.481858 1.051932 0.000000 0.040407 0.000000
|
||||
-2.419026 1.463048 0.000000 0.034267 0.000000
|
||||
-2.356194 1.990616 0.000000 0.027734 0.000000
|
||||
-2.293363 2.190692 0.000000 0.025597 0.000000
|
||||
-2.230531 2.553036 0.000000 0.022136 0.000000
|
||||
-2.167699 2.572522 0.000000 0.021964 0.000000
|
||||
-2.104867 2.472360 0.000000 0.022863 0.000000
|
||||
-2.042035 2.517562 0.000000 0.022453 0.000000
|
||||
-1.979203 2.469778 0.000000 0.022887 0.000000
|
||||
-1.916372 2.223125 0.000000 0.025266 0.000000
|
||||
-1.853540 2.080157 0.000000 0.026756 0.000000
|
||||
-1.790708 1.793841 0.000000 0.030011 0.000000
|
||||
-1.727876 1.458784 0.000000 0.034326 0.000000
|
||||
-1.665044 0.914441 0.000000 0.042697 0.000000
|
||||
-1.602212 0.303813 0.000000 0.054540 0.000000
|
||||
-1.539380 0.268335 0.000000 0.055321 0.000000
|
||||
-1.476549 0.000000 0.000000 0.061604 0.000000
|
||||
-1.413717 0.537061 0.000000 0.049671 0.000000
|
||||
-1.350885 1.439940 0.000000 0.034586 0.000000
|
||||
-1.288053 2.391838 0.000000 0.023614 0.000000
|
||||
-1.225221 3.779470 0.000000 0.013538 0.000000
|
||||
-1.162389 5.685555 0.000000 0.006305 0.000000
|
||||
-1.099557 7.661896 0.000000 0.002855 0.000000
|
||||
-1.036726 9.946594 0.000000 0.001142 0.000000
|
||||
-0.973894 12.359408 0.000000 0.000434 0.000000
|
||||
-0.911062 14.954655 0.000000 0.000153 0.000000
|
||||
-0.848230 17.742242 0.000000 0.000050 0.000000
|
||||
-0.785398 20.555785 0.000000 0.000016 0.000000
|
||||
-0.722566 22.811160 0.000000 0.000007 0.000000
|
||||
-0.659734 25.178094 0.000000 0.000003 0.000000
|
||||
-0.596903 26.442288 0.000000 0.000002 0.000000
|
||||
-0.534071 27.897565 0.000000 0.000001 0.000000
|
||||
-0.471239 29.062473 0.000000 0.000001 0.000000
|
||||
-0.408407 30.384521 0.000000 0.000000 0.000000
|
||||
-0.345575 31.638454 0.000000 0.000000 0.000000
|
||||
-0.282743 32.817727 0.000000 0.000000 0.000000
|
||||
-0.219911 33.770369 0.000000 0.000000 0.000000
|
||||
-0.157080 34.505503 0.000000 0.000000 0.000000
|
||||
-0.094248 35.431659 0.000000 0.000000 0.000000
|
||||
-0.031416 35.615810 0.000000 0.000000 0.000000
|
||||
0.031416 35.561946 0.000000 0.000000 0.000000
|
||||
0.094248 35.382089 0.000000 0.000000 0.000000
|
||||
0.157080 34.934827 0.000000 0.000000 0.000000
|
||||
0.219911 33.673460 0.000000 0.000000 0.000000
|
||||
0.282743 32.731563 0.000000 0.000000 0.000000
|
||||
0.345575 31.261855 0.000000 0.000000 0.000000
|
||||
0.408407 29.717377 0.000000 0.000000 0.000000
|
||||
0.471239 28.076620 0.000000 0.000001 0.000000
|
||||
0.534071 26.481097 0.000000 0.000002 0.000000
|
||||
0.596903 24.487358 0.000000 0.000003 0.000000
|
||||
0.659734 22.344251 0.000000 0.000008 0.000000
|
||||
0.722566 20.241543 0.000000 0.000018 0.000000
|
||||
0.785398 18.341869 0.000000 0.000039 0.000000
|
||||
0.848230 16.261582 0.000000 0.000091 0.000000
|
||||
0.911062 14.301801 0.000000 0.000199 0.000000
|
||||
0.973894 12.603788 0.000000 0.000394 0.000000
|
||||
1.036726 11.249601 0.000000 0.000678 0.000000
|
||||
1.099557 10.087886 0.000000 0.001079 0.000000
|
||||
1.162389 9.443303 0.000000 0.001398 0.000000
|
||||
1.225221 9.152799 0.000000 0.001570 0.000000
|
||||
1.288053 9.331937 0.000000 0.001462 0.000000
|
||||
1.350885 9.905546 0.000000 0.001161 0.000000
|
||||
1.413717 11.042050 0.000000 0.000736 0.000000
|
||||
1.476549 12.598167 0.000000 0.000395 0.000000
|
||||
1.539380 14.520167 0.000000 0.000183 0.000000
|
||||
1.602212 16.569783 0.000000 0.000080 0.000000
|
||||
1.665044 18.687390 0.000000 0.000034 0.000000
|
||||
1.727876 20.775408 0.000000 0.000015 0.000000
|
||||
1.790708 22.905200 0.000000 0.000006 0.000000
|
||||
1.853540 24.643852 0.000000 0.000003 0.000000
|
||||
1.916372 26.301740 0.000000 0.000002 0.000000
|
||||
1.979203 27.372071 0.000000 0.000001 0.000000
|
||||
2.042035 28.697726 0.000000 0.000001 0.000000
|
||||
2.104867 29.417901 0.000000 0.000000 0.000000
|
||||
2.167699 30.008351 0.000000 0.000000 0.000000
|
||||
2.230531 30.406016 0.000000 0.000000 0.000000
|
||||
2.293363 30.171275 0.000000 0.000000 0.000000
|
||||
2.356194 29.884646 0.000000 0.000000 0.000000
|
||||
2.419026 29.428153 0.000000 0.000000 0.000000
|
||||
2.481858 28.546982 0.000000 0.000001 0.000000
|
||||
2.544690 27.757520 0.000000 0.000001 0.000000
|
||||
2.607522 26.505787 0.000000 0.000001 0.000000
|
||||
2.670354 24.491866 0.000000 0.000003 0.000000
|
||||
2.733186 22.320664 0.000000 0.000008 0.000000
|
||||
2.796017 20.052723 0.000000 0.000020 0.000000
|
||||
2.858849 17.655650 0.000000 0.000052 0.000000
|
||||
2.921681 15.471590 0.000000 0.000125 0.000000
|
||||
2.984513 13.138167 0.000000 0.000318 0.000000
|
||||
3.047345 11.092386 0.000000 0.000722 0.000000
|
||||
3.110177 9.065722 0.000000 0.001626 0.000000
|
||||
|
||||
101
example/1d_cyclic/wham_bt.out
Normal file
101
example/1d_cyclic/wham_bt.out
Normal file
@@ -0,0 +1,101 @@
|
||||
#coord1 Free Energy +/- Probability +/-
|
||||
-3.110177 7.158102 0.066061 0.003494 0.000070
|
||||
-3.047345 5.365727 0.066577 0.007168 0.000135
|
||||
-2.984513 3.873190 0.064431 0.013039 0.000233
|
||||
-2.921681 2.953162 0.065142 0.018855 0.000334
|
||||
-2.858849 1.949554 0.064047 0.028195 0.000483
|
||||
-2.796017 1.391747 0.062115 0.035261 0.000594
|
||||
-2.733186 1.128270 0.059763 0.039189 0.000647
|
||||
-2.670354 0.839970 0.059287 0.043991 0.000712
|
||||
-2.607522 0.624769 0.058500 0.047955 0.000797
|
||||
-2.544690 0.663757 0.058265 0.047211 0.000798
|
||||
-2.481858 1.051932 0.056788 0.040407 0.000664
|
||||
-2.419026 1.463048 0.059709 0.034267 0.000622
|
||||
-2.356194 1.990616 0.053483 0.027734 0.000423
|
||||
-2.293363 2.190692 0.043319 0.025597 0.000266
|
||||
-2.230531 2.553036 0.039698 0.022136 0.000187
|
||||
-2.167699 2.572522 0.039097 0.021964 0.000156
|
||||
-2.104867 2.472360 0.036596 0.022863 0.000147
|
||||
-2.042035 2.517562 0.037999 0.022453 0.000209
|
||||
-1.979203 2.469778 0.038176 0.022887 0.000241
|
||||
-1.916372 2.223125 0.047408 0.025266 0.000449
|
||||
-1.853540 2.080157 0.037957 0.026756 0.000373
|
||||
-1.790708 1.793841 0.037537 0.030011 0.000435
|
||||
-1.727876 1.458784 0.038048 0.034326 0.000494
|
||||
-1.665044 0.914441 0.036602 0.042697 0.000617
|
||||
-1.602212 0.303813 0.033286 0.054540 0.000762
|
||||
-1.539380 0.268335 0.032947 0.055321 0.000800
|
||||
-1.476549 0.000000 0.032532 0.061604 0.000915
|
||||
-1.413717 0.537061 0.035421 0.049671 0.000786
|
||||
-1.350885 1.439940 0.036002 0.034586 0.000580
|
||||
-1.288053 2.391838 0.038449 0.023614 0.000426
|
||||
-1.225221 3.779470 0.038521 0.013538 0.000246
|
||||
-1.162389 5.685555 0.039935 0.006305 0.000119
|
||||
-1.099557 7.661896 0.039852 0.002855 0.000054
|
||||
-1.036726 9.946594 0.041239 0.001142 0.000022
|
||||
-0.973894 12.359408 0.044291 0.000434 0.000009
|
||||
-0.911062 14.954655 0.049774 0.000153 0.000003
|
||||
-0.848230 17.742242 0.059250 0.000050 0.000001
|
||||
-0.785398 20.555785 0.065401 0.000016 0.000001
|
||||
-0.722566 22.811160 0.073860 0.000007 0.000000
|
||||
-0.659734 25.178094 0.086184 0.000003 0.000000
|
||||
-0.596903 26.442288 0.091674 0.000002 0.000000
|
||||
-0.534071 27.897565 0.091810 0.000001 0.000000
|
||||
-0.471239 29.062473 0.093492 0.000001 0.000000
|
||||
-0.408407 30.384521 0.091621 0.000000 0.000000
|
||||
-0.345575 31.638454 0.094954 0.000000 0.000000
|
||||
-0.282743 32.817727 0.104975 0.000000 0.000000
|
||||
-0.219911 33.770369 0.107367 0.000000 0.000000
|
||||
-0.157080 34.505503 0.107448 0.000000 0.000000
|
||||
-0.094248 35.431659 0.122770 0.000000 0.000000
|
||||
-0.031416 35.615810 0.123003 0.000000 0.000000
|
||||
0.031416 35.561946 0.119921 0.000000 0.000000
|
||||
0.094248 35.382089 0.107837 0.000000 0.000000
|
||||
0.157080 34.934827 0.112907 0.000000 0.000000
|
||||
0.219911 33.673460 0.107974 0.000000 0.000000
|
||||
0.282743 32.731563 0.106959 0.000000 0.000000
|
||||
0.345575 31.261855 0.107235 0.000000 0.000000
|
||||
0.408407 29.717377 0.110897 0.000000 0.000000
|
||||
0.471239 28.076620 0.110736 0.000001 0.000000
|
||||
0.534071 26.481097 0.110570 0.000002 0.000000
|
||||
0.596903 24.487358 0.110678 0.000003 0.000000
|
||||
0.659734 22.344251 0.108746 0.000008 0.000000
|
||||
0.722566 20.241543 0.110764 0.000018 0.000001
|
||||
0.785398 18.341869 0.110562 0.000039 0.000002
|
||||
0.848230 16.261582 0.113400 0.000091 0.000005
|
||||
0.911062 14.301801 0.113555 0.000199 0.000010
|
||||
0.973894 12.603788 0.113740 0.000394 0.000020
|
||||
1.036726 11.249601 0.113019 0.000678 0.000035
|
||||
1.099557 10.087886 0.112748 0.001079 0.000056
|
||||
1.162389 9.443303 0.111507 0.001398 0.000072
|
||||
1.225221 9.152799 0.110347 0.001570 0.000081
|
||||
1.288053 9.331937 0.110858 0.001462 0.000076
|
||||
1.350885 9.905546 0.111592 0.001161 0.000061
|
||||
1.413717 11.042050 0.111362 0.000736 0.000039
|
||||
1.476549 12.598167 0.111371 0.000395 0.000021
|
||||
1.539380 14.520167 0.110164 0.000183 0.000010
|
||||
1.602212 16.569783 0.110233 0.000080 0.000004
|
||||
1.665044 18.687390 0.110987 0.000034 0.000002
|
||||
1.727876 20.775408 0.112748 0.000015 0.000001
|
||||
1.790708 22.905200 0.107353 0.000006 0.000000
|
||||
1.853540 24.643852 0.109825 0.000003 0.000000
|
||||
1.916372 26.301740 0.109608 0.000002 0.000000
|
||||
1.979203 27.372071 0.108712 0.000001 0.000000
|
||||
2.042035 28.697726 0.112741 0.000001 0.000000
|
||||
2.104867 29.417901 0.111171 0.000000 0.000000
|
||||
2.167699 30.008351 0.111253 0.000000 0.000000
|
||||
2.230531 30.406016 0.109443 0.000000 0.000000
|
||||
2.293363 30.171275 0.109685 0.000000 0.000000
|
||||
2.356194 29.884646 0.123195 0.000000 0.000000
|
||||
2.419026 29.428153 0.121519 0.000000 0.000000
|
||||
2.481858 28.546982 0.142684 0.000001 0.000000
|
||||
2.544690 27.757520 0.125824 0.000001 0.000000
|
||||
2.607522 26.505787 0.127311 0.000001 0.000000
|
||||
2.670354 24.491866 0.105644 0.000003 0.000000
|
||||
2.733186 22.320664 0.094847 0.000008 0.000000
|
||||
2.796017 20.052723 0.089885 0.000020 0.000001
|
||||
2.858849 17.655650 0.087837 0.000052 0.000002
|
||||
2.921681 15.471590 0.087834 0.000125 0.000005
|
||||
2.984513 13.138167 0.081947 0.000318 0.000011
|
||||
3.047345 11.092386 0.074513 0.000722 0.000020
|
||||
3.110177 9.065722 0.068298 0.001626 0.000036
|
||||
101
example/1d_cyclic/wham_uncorrelated.out
Normal file
101
example/1d_cyclic/wham_uncorrelated.out
Normal file
@@ -0,0 +1,101 @@
|
||||
#coord1 Free Energy +/- Probability +/-
|
||||
-3.110177 7.531315 0.000000 0.003080 0.000000
|
||||
-3.047345 5.690157 0.000000 0.006443 0.000000
|
||||
-2.984513 4.243063 0.000000 0.011509 0.000000
|
||||
-2.921681 3.334686 0.000000 0.016564 0.000000
|
||||
-2.858849 2.277349 0.000000 0.025309 0.000000
|
||||
-2.796017 1.723296 0.000000 0.031604 0.000000
|
||||
-2.733186 1.246264 0.000000 0.038265 0.000000
|
||||
-2.670354 1.099867 0.000000 0.040578 0.000000
|
||||
-2.607522 0.771910 0.000000 0.046279 0.000000
|
||||
-2.544690 0.770616 0.000000 0.046303 0.000000
|
||||
-2.481858 1.265507 0.000000 0.037971 0.000000
|
||||
-2.419026 1.562335 0.000000 0.033711 0.000000
|
||||
-2.356194 1.891577 0.000000 0.029542 0.000000
|
||||
-2.293363 2.227858 0.000000 0.025816 0.000000
|
||||
-2.230531 2.488355 0.000000 0.023256 0.000000
|
||||
-2.167699 2.502265 0.000000 0.023127 0.000000
|
||||
-2.104867 2.358037 0.000000 0.024503 0.000000
|
||||
-2.042035 2.278147 0.000000 0.025301 0.000000
|
||||
-1.979203 2.974067 0.000000 0.019141 0.000000
|
||||
-1.916372 2.696600 0.000000 0.021393 0.000000
|
||||
-1.853540 2.361827 0.000000 0.024466 0.000000
|
||||
-1.790708 1.516746 0.000000 0.034332 0.000000
|
||||
-1.727876 1.526829 0.000000 0.034194 0.000000
|
||||
-1.665044 0.884114 0.000000 0.044244 0.000000
|
||||
-1.602212 0.323912 0.000000 0.055385 0.000000
|
||||
-1.539380 0.197985 0.000000 0.058253 0.000000
|
||||
-1.476549 0.000000 0.000000 0.063065 0.000000
|
||||
-1.413717 0.458247 0.000000 0.052481 0.000000
|
||||
-1.350885 1.389410 0.000000 0.036131 0.000000
|
||||
-1.288053 2.386522 0.000000 0.024225 0.000000
|
||||
-1.225221 3.743253 0.000000 0.014062 0.000000
|
||||
-1.162389 5.566654 0.000000 0.006770 0.000000
|
||||
-1.099557 7.822800 0.000000 0.002740 0.000000
|
||||
-1.036726 10.128719 0.000000 0.001087 0.000000
|
||||
-0.973894 12.199246 0.000000 0.000474 0.000000
|
||||
-0.911062 14.488129 0.000000 0.000189 0.000000
|
||||
-0.848230 16.902310 0.000000 0.000072 0.000000
|
||||
-0.785398 18.910200 0.000000 0.000032 0.000000
|
||||
-0.722566 21.241681 0.000000 0.000013 0.000000
|
||||
-0.659734 22.706373 0.000000 0.000007 0.000000
|
||||
-0.596903 24.531129 0.000000 0.000003 0.000000
|
||||
-0.534071 25.936227 0.000000 0.000002 0.000000
|
||||
-0.471239 27.000262 0.000000 0.000001 0.000000
|
||||
-0.408407 28.673293 0.000000 0.000001 0.000000
|
||||
-0.345575 29.335203 0.000000 0.000000 0.000000
|
||||
-0.282743 30.841118 0.000000 0.000000 0.000000
|
||||
-0.219911 31.983859 0.000000 0.000000 0.000000
|
||||
-0.157080 32.144015 0.000000 0.000000 0.000000
|
||||
-0.094248 33.885395 0.000000 0.000000 0.000000
|
||||
-0.031416 33.783105 0.000000 0.000000 0.000000
|
||||
0.031416 34.243727 0.000000 0.000000 0.000000
|
||||
0.094248 33.975567 0.000000 0.000000 0.000000
|
||||
0.157080 32.994787 0.000000 0.000000 0.000000
|
||||
0.219911 32.607398 0.000000 0.000000 0.000000
|
||||
0.282743 31.401902 0.000000 0.000000 0.000000
|
||||
0.345575 29.911670 0.000000 0.000000 0.000000
|
||||
0.408407 28.603574 0.000000 0.000001 0.000000
|
||||
0.471239 26.925443 0.000000 0.000001 0.000000
|
||||
0.534071 25.298070 0.000000 0.000002 0.000000
|
||||
0.596903 23.638560 0.000000 0.000005 0.000000
|
||||
0.659734 21.156231 0.000000 0.000013 0.000000
|
||||
0.722566 19.126480 0.000000 0.000029 0.000000
|
||||
0.785398 17.351953 0.000000 0.000060 0.000000
|
||||
0.848230 15.135525 0.000000 0.000146 0.000000
|
||||
0.911062 13.188112 0.000000 0.000319 0.000000
|
||||
0.973894 11.536983 0.000000 0.000618 0.000000
|
||||
1.036726 10.158328 0.000000 0.001074 0.000000
|
||||
1.099557 9.109036 0.000000 0.001636 0.000000
|
||||
1.162389 8.282343 0.000000 0.002279 0.000000
|
||||
1.225221 8.022102 0.000000 0.002530 0.000000
|
||||
1.288053 8.162415 0.000000 0.002391 0.000000
|
||||
1.350885 8.600135 0.000000 0.002006 0.000000
|
||||
1.413717 9.837348 0.000000 0.001222 0.000000
|
||||
1.476549 11.363156 0.000000 0.000663 0.000000
|
||||
1.539380 13.077849 0.000000 0.000333 0.000000
|
||||
1.602212 15.353594 0.000000 0.000134 0.000000
|
||||
1.665044 17.565051 0.000000 0.000055 0.000000
|
||||
1.727876 19.710884 0.000000 0.000023 0.000000
|
||||
1.790708 21.721260 0.000000 0.000010 0.000000
|
||||
1.853540 23.567649 0.000000 0.000005 0.000000
|
||||
1.916372 25.008817 0.000000 0.000003 0.000000
|
||||
1.979203 26.405367 0.000000 0.000002 0.000000
|
||||
2.042035 28.070821 0.000000 0.000001 0.000000
|
||||
2.104867 28.877213 0.000000 0.000001 0.000000
|
||||
2.167699 29.378146 0.000000 0.000000 0.000000
|
||||
2.230531 31.093267 0.000000 0.000000 0.000000
|
||||
2.293363 30.704994 0.000000 0.000000 0.000000
|
||||
2.356194 30.563093 0.000000 0.000000 0.000000
|
||||
2.419026 31.215952 0.000000 0.000000 0.000000
|
||||
2.481858 30.331416 0.000000 0.000000 0.000000
|
||||
2.544690 29.005123 0.000000 0.000001 0.000000
|
||||
2.607522 27.674618 0.000000 0.000001 0.000000
|
||||
2.670354 24.911788 0.000000 0.000003 0.000000
|
||||
2.733186 22.746417 0.000000 0.000007 0.000000
|
||||
2.796017 20.608288 0.000000 0.000016 0.000000
|
||||
2.858849 18.018280 0.000000 0.000046 0.000000
|
||||
2.921681 15.949215 0.000000 0.000105 0.000000
|
||||
2.984513 13.617809 0.000000 0.000268 0.000000
|
||||
3.047345 11.432193 0.000000 0.000645 0.000000
|
||||
3.110177 9.461494 0.000000 0.001420 0.000000
|
||||
18
src/cli.yml
18
src/cli.yml
@@ -1,5 +1,5 @@
|
||||
name: wham
|
||||
version: "0.9.0"
|
||||
version: "1.1.3"
|
||||
author: D. Bauer <bauer@bio.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.
|
||||
@@ -101,3 +101,19 @@ args:
|
||||
help: Skip rows in timeseries with an index larger than this value (defaults to 1e+20)
|
||||
takes_value: true
|
||||
required: false
|
||||
- uncorr:
|
||||
short: g
|
||||
long: uncorr
|
||||
help: Estimates statistical inefficiency of each timeseries via autocorrelation and removes correlated samples (default is off).
|
||||
takes_value: false
|
||||
required: false
|
||||
- convdt:
|
||||
long: convdt
|
||||
help: "Performs WHAM for slices with the given delta in time and returns an output file for each slice. THis is useful to check the result for convergence. Example: with --convdt 100 and a timeseries ranging from 0-300, free energy surfaces for slices 0-100, 0-200 and 0-300 will be given returned."
|
||||
takes_value: true
|
||||
required: false
|
||||
- ignore_empty:
|
||||
long: ignore_empty
|
||||
help: If this is set, do not fail if a histogram is empty.
|
||||
takes_value: false
|
||||
required: false
|
||||
|
||||
78
src/correlation_analysis.rs
Normal file
78
src/correlation_analysis.rs
Normal file
@@ -0,0 +1,78 @@
|
||||
use super::statistics;
|
||||
|
||||
// calculates the statistical inefficiency g of the given timeseries
|
||||
// the quantity g can be thought of: N/g is the number of uncorrelated
|
||||
// configurations in the timeseries, where samples are separated by
|
||||
// the a multiple of g
|
||||
// For details, see "Chodera et al. (2007). Use of a Weighted Histogram Analysis
|
||||
// Method for the Analysis of Simulated and Parallel Tempering Simulations, JCTC"
|
||||
pub fn statistical_ineff(timeseries: &[f64]) -> f64 {
|
||||
let n = timeseries.len();
|
||||
let mean = statistics::mean(timeseries);
|
||||
let d_mean = timeseries.iter().map(|x| x-mean).collect::<Vec<f64>>();
|
||||
let cov = statistics::autocov(timeseries);
|
||||
|
||||
let mut g = 1.0;
|
||||
for t in 1..(n-1) {
|
||||
let tmp = d_mean[0..n-t].iter().zip(d_mean[t..n].iter()).map(|(x,y)| x*y);
|
||||
let c = tmp.map(|x| x+x).sum::<f64>() / (2.0 * (n as f64 - t as f64)*cov);
|
||||
if c <= 0.0 {
|
||||
break;
|
||||
}
|
||||
g = g + (2.0*c*(1.0-t as f64/n as f64))
|
||||
}
|
||||
if g < 1.0 {
|
||||
1.0
|
||||
} else {
|
||||
g
|
||||
}
|
||||
}
|
||||
|
||||
// The autocorrelation time of a timeseries can be deduced from the
|
||||
// `statistical_ineff` by (g-1)/2.0
|
||||
pub fn autocorrelation_time(g: f64) -> f64 {
|
||||
(g - 1.0) / 2.0
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io::{BufRead, BufReader};
|
||||
use std::fs::File;
|
||||
|
||||
fn read_timeseries(filename: &str) -> Vec<f64> {
|
||||
let mut timeseries: Vec<f64> = Vec::new();
|
||||
let file = File::open(filename).unwrap();
|
||||
let reader = BufReader::new(&file);
|
||||
for line in reader.lines() {
|
||||
let val = line.unwrap().split_whitespace()
|
||||
.collect::<Vec<&str>>()[1].parse::<f64>().unwrap();
|
||||
timeseries.push(val);
|
||||
}
|
||||
timeseries
|
||||
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn statistical_ineff() {
|
||||
let timeseries = read_timeseries("example/1d_cyclic/COLVAR-2.5.xvg");
|
||||
let g = super::statistical_ineff(×eries);
|
||||
println!("{:?}", g);
|
||||
assert!((g - 3.859).abs() < 0.001);
|
||||
|
||||
// a "random" timeseries with g < 1.0
|
||||
let timeseries = [1_f64, 4_f64, 921_f64, 121213_f64, 23192_f64,
|
||||
8913_f64, 1232_f64, 2_f64, 151_f64, 123091_f64];
|
||||
let g = super::statistical_ineff(×eries);
|
||||
assert_approx_eq!(g, 1.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn autocorrelation_time() {
|
||||
let timeseries = read_timeseries("example/1d_cyclic/COLVAR-2.5.xvg");
|
||||
let g = super::statistical_ineff(×eries);
|
||||
let tau = super::autocorrelation_time(g);
|
||||
println!("{:?}", tau);
|
||||
assert!((tau - 1.430).abs() < 0.001)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
use rand::{SeedableRng, StdRng, Rng};
|
||||
use rand::prelude::*;
|
||||
use super::histogram::{Dataset};
|
||||
use super::perform_wham;
|
||||
use super::{Config,calc_free_energy};
|
||||
use rgsl::statistics;
|
||||
use super::statistics;
|
||||
|
||||
// returns a set of num_windows continious weights by
|
||||
// a) generate num_windows-1 random variables and sort them
|
||||
@@ -48,7 +48,7 @@ pub fn run_bootstrap(cfg: &Config, ds: Dataset, num_runs: usize) -> (Vec<f64>,Ve
|
||||
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::<Vec<f64>>();
|
||||
P_se[bin] = statistics::sd(&Ps, 1, num_runs)/(num_runs as f64).sqrt();
|
||||
P_se[bin] = statistics::sd(&Ps)/(num_runs as f64).sqrt();
|
||||
}
|
||||
|
||||
// SE of A
|
||||
@@ -60,47 +60,48 @@ pub fn run_bootstrap(cfg: &Config, ds: Dataset, num_runs: usize) -> (Vec<f64>,Ve
|
||||
let mut A_se = vec![0.0; ds.num_bins];
|
||||
for bin in 0..ds.num_bins {
|
||||
let As = bootstrapped_As.iter().map(|window| window[bin]).collect::<Vec<f64>>();
|
||||
A_se[bin] = statistics::sd(&As, 1, num_runs)/(num_runs as f64).sqrt();
|
||||
A_se[bin] = statistics::sd(&As)/(num_runs as f64).sqrt();
|
||||
}
|
||||
|
||||
(P_se, A_se)
|
||||
}
|
||||
|
||||
#[cfg(tests)]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::super::k_B;
|
||||
use super::super::histogram::Histogram;
|
||||
|
||||
fn build_hist() -> Histogram {
|
||||
Histogram::new(
|
||||
22, // num_points
|
||||
vec![1.0, 1.0, 3.0, 5.0, 12.0] // bins
|
||||
)
|
||||
}
|
||||
Histogram::new(
|
||||
22, // num_points
|
||||
vec![1.0, 1.0, 3.0, 5.0, 12.0] // bins
|
||||
)
|
||||
}
|
||||
|
||||
fn build_hist_set() -> Dataset {
|
||||
let h1 = build_hist();
|
||||
let h2 = build_hist();
|
||||
let h3 = build_hist();
|
||||
Dataset::new(
|
||||
5, // num bins
|
||||
vec![3],
|
||||
vec![1.0], // bin width
|
||||
vec![0.0], // hist min
|
||||
vec![9.0], // hist max
|
||||
vec![4.5, 4.5, 4.5], // x0
|
||||
vec![10.0, 10.0, 10.0], // fc
|
||||
300.0*k_B, // kT
|
||||
vec![h1, h2, h3], // hists
|
||||
false // cyclic
|
||||
)
|
||||
}
|
||||
fn build_hist_set() -> Dataset {
|
||||
let h1 = build_hist();
|
||||
let h2 = build_hist();
|
||||
let h3 = build_hist();
|
||||
Dataset::new(
|
||||
5, // num bins
|
||||
vec![3],
|
||||
vec![1.0], // bin width
|
||||
vec![0.0], // hist min
|
||||
vec![9.0], // hist max
|
||||
vec![4.5, 4.5, 4.5], // x0
|
||||
vec![10.0, 10.0, 10.0], // fc
|
||||
300.0*k_B, // kT
|
||||
vec![h1, h2, h3], // hists
|
||||
false // cyclic
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn random_weights() {
|
||||
let mut rng = StdRng::from_entropy();
|
||||
let num_windows = 5;
|
||||
let weights = generate_random_weights(num_windows);
|
||||
let weights = generate_random_weights(num_windows, &mut rng);
|
||||
assert_eq!(num_windows, weights.len());
|
||||
for w in weights {
|
||||
assert!(0.0 < w && w < 1.0);
|
||||
@@ -109,8 +110,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn random_weighted_dataset() {
|
||||
let mut rng = StdRng::from_entropy();
|
||||
let ds = build_hist_set();
|
||||
let rnd_weights_ds = generate_random_weighted_dataset(ds);
|
||||
let rnd_weights_ds = generate_random_weighted_dataset(ds, &mut rng);
|
||||
println!("{:?}", rnd_weights_ds.weights);
|
||||
for w in rnd_weights_ds.weights {
|
||||
assert!(w > 0.0);
|
||||
|
||||
396
src/histogram.rs
396
src/histogram.rs
@@ -3,266 +3,266 @@ use std::fmt;
|
||||
// One histogram
|
||||
#[derive(Debug,Clone)]
|
||||
pub struct Histogram {
|
||||
// total number of data points stored in the histogram
|
||||
pub num_points: u32,
|
||||
// total number of data points stored in the histogram
|
||||
pub num_points: u32,
|
||||
|
||||
// histogram bins
|
||||
pub bins: Vec<f64>
|
||||
// histogram bins
|
||||
pub bins: Vec<f64>
|
||||
}
|
||||
|
||||
impl Histogram {
|
||||
pub fn new(num_points: u32, bins: Vec<f64>) -> Histogram {
|
||||
Histogram {num_points, bins}
|
||||
}
|
||||
pub fn new(num_points: u32, bins: Vec<f64>) -> Histogram {
|
||||
Histogram {num_points, bins}
|
||||
}
|
||||
}
|
||||
|
||||
// a set of histograms
|
||||
#[derive(Debug,Clone)]
|
||||
pub struct Dataset {
|
||||
// number of histogram windows (number of simulations)
|
||||
pub num_windows: usize,
|
||||
// number of histogram windows (number of simulations)
|
||||
pub num_windows: usize,
|
||||
|
||||
// total number of bins
|
||||
pub num_bins: usize,
|
||||
// total number of bins
|
||||
pub num_bins: usize,
|
||||
|
||||
// number of bins in each dimension
|
||||
pub dimens_lengths: Vec<usize>,
|
||||
// number of bins in each dimension
|
||||
pub dimens_lengths: Vec<usize>,
|
||||
|
||||
// min values of the histogram in each dimension
|
||||
hist_min: Vec<f64>,
|
||||
// min values of the histogram in each dimension
|
||||
hist_min: Vec<f64>,
|
||||
|
||||
// max values of the histogram in each dimension
|
||||
hist_max: Vec<f64>,
|
||||
// max values of the histogram in each dimension
|
||||
hist_max: Vec<f64>,
|
||||
|
||||
// width of a bin in unit of its dimension
|
||||
bin_width: Vec<f64>,
|
||||
// width of a bin in unit of its dimension
|
||||
bin_width: Vec<f64>,
|
||||
|
||||
// value of kT
|
||||
pub kT: f64,
|
||||
// value of kT
|
||||
pub kT: f64,
|
||||
|
||||
// histogram for each window
|
||||
pub histograms: Vec<Histogram>,
|
||||
// histogram for each window
|
||||
pub histograms: Vec<Histogram>,
|
||||
|
||||
// flag for cyclic reaction coordinates
|
||||
pub cyclic: bool,
|
||||
// flag for cyclic reaction coordinates
|
||||
pub cyclic: bool,
|
||||
|
||||
// locations of biases
|
||||
bias_pos: Vec<f64>,
|
||||
// locations of biases
|
||||
bias_pos: Vec<f64>,
|
||||
|
||||
// force constants of biases
|
||||
bias_fc: Vec<f64>,
|
||||
// force constants of biases
|
||||
bias_fc: Vec<f64>,
|
||||
|
||||
// bias value cache
|
||||
bias: Vec<f64>,
|
||||
// bias value cache
|
||||
bias: Vec<f64>,
|
||||
|
||||
// histogram weight
|
||||
pub weights: Vec<f64>,
|
||||
// histogram weight
|
||||
pub weights: Vec<f64>,
|
||||
}
|
||||
|
||||
impl Dataset {
|
||||
|
||||
pub fn new(num_bins: usize, dimens_lengths: Vec<usize>, bin_width: Vec<f64>,
|
||||
pub fn new(num_bins: usize, dimens_lengths: Vec<usize>, bin_width: Vec<f64>,
|
||||
hist_min: Vec<f64>, hist_max: Vec<f64>, bias_pos: Vec<f64>,
|
||||
bias_fc: Vec<f64>, kT: f64, histograms: Vec<Histogram>, cyclic: bool) -> Dataset {
|
||||
let num_windows = histograms.len();
|
||||
let bias: Vec<f64> = vec![0.0; num_bins*num_windows];
|
||||
let weights = vec![1.0; num_windows];
|
||||
let mut ds = Dataset{
|
||||
num_windows,
|
||||
num_bins,
|
||||
dimens_lengths,
|
||||
bin_width,
|
||||
hist_min,
|
||||
hist_max,
|
||||
kT,
|
||||
histograms,
|
||||
cyclic,
|
||||
bias_pos,
|
||||
bias_fc,
|
||||
bias,
|
||||
weights
|
||||
};
|
||||
for window in 0..num_windows {
|
||||
for bin in 0..num_bins {
|
||||
let ndx = window * num_bins + bin;
|
||||
ds.bias[ndx] = ds.calc_bias(bin, window);
|
||||
}
|
||||
}
|
||||
ds
|
||||
let num_windows = histograms.len();
|
||||
let bias: Vec<f64> = vec![0.0; num_bins*num_windows];
|
||||
let weights = vec![1.0; num_windows];
|
||||
let mut ds = Dataset{
|
||||
num_windows,
|
||||
num_bins,
|
||||
dimens_lengths,
|
||||
bin_width,
|
||||
hist_min,
|
||||
hist_max,
|
||||
kT,
|
||||
histograms,
|
||||
cyclic,
|
||||
bias_pos,
|
||||
bias_fc,
|
||||
bias,
|
||||
weights
|
||||
};
|
||||
for window in 0..num_windows {
|
||||
for bin in 0..num_bins {
|
||||
let ndx = window * num_bins + bin;
|
||||
ds.bias[ndx] = ds.calc_bias(bin, window);
|
||||
}
|
||||
}
|
||||
ds
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_weighted(ds: Dataset, weights: Vec<f64>) -> Dataset {
|
||||
Dataset {
|
||||
weights,
|
||||
..ds
|
||||
}
|
||||
}
|
||||
pub fn new_weighted(ds: Dataset, weights: Vec<f64>) -> Dataset {
|
||||
Dataset {
|
||||
weights,
|
||||
..ds
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_weighted_bin_count(&self, bin: usize) -> f64 {
|
||||
self.histograms.iter().enumerate().map(|(idx,h)| self.weights[idx]*h.bins[bin]).sum()
|
||||
}
|
||||
pub fn get_weighted_bin_count(&self, bin: usize) -> f64 {
|
||||
self.histograms.iter().enumerate().map(|(idx,h)| self.weights[idx]*h.bins[bin]).sum()
|
||||
}
|
||||
|
||||
fn expand_index(&self, bin: usize, lengths: &[usize]) -> Vec<usize> {
|
||||
let mut tmp = bin;
|
||||
let mut idx = vec![0; lengths.len()];
|
||||
for dimen in (1..lengths.len()).rev() {
|
||||
let denom: usize = lengths.iter().take(dimen).product();
|
||||
idx[dimen] = tmp / denom;
|
||||
tmp %= denom;
|
||||
}
|
||||
idx[0] = tmp;
|
||||
idx
|
||||
}
|
||||
fn expand_index(&self, bin: usize, lengths: &[usize]) -> Vec<usize> {
|
||||
let mut tmp = bin;
|
||||
let mut idx = vec![0; lengths.len()];
|
||||
for dimen in (1..lengths.len()).rev() {
|
||||
let denom: usize = lengths.iter().take(dimen).product();
|
||||
idx[dimen] = tmp / denom;
|
||||
tmp %= denom;
|
||||
}
|
||||
idx[0] = tmp;
|
||||
idx
|
||||
}
|
||||
|
||||
// get center x value for a bin
|
||||
pub fn get_coords_for_bin(&self, bin: usize) -> Vec<f64> {
|
||||
self.expand_index(bin, &self.dimens_lengths).iter().enumerate().map(|(i, dimen_bin)| {
|
||||
self.hist_min[i] + self.bin_width[i]*(*dimen_bin as f64 + 0.5)
|
||||
}).collect()
|
||||
}
|
||||
// get center x value for a bin
|
||||
pub fn get_coords_for_bin(&self, bin: usize) -> Vec<f64> {
|
||||
self.expand_index(bin, &self.dimens_lengths).iter().enumerate().map(|(i, dimen_bin)| {
|
||||
self.hist_min[i] + self.bin_width[i]*(*dimen_bin as f64 + 0.5)
|
||||
}).collect()
|
||||
}
|
||||
|
||||
pub fn get_bias(&self, bin: usize, window: usize) -> f64 {
|
||||
let ndx = window * self.num_bins + bin;
|
||||
self.bias[ndx]
|
||||
}
|
||||
pub fn get_bias(&self, bin: usize, window: usize) -> f64 {
|
||||
let ndx = window * self.num_bins + bin;
|
||||
self.bias[ndx]
|
||||
}
|
||||
|
||||
// Harmonic bias calculation: bias = 0.5*k(dx)^2
|
||||
// if cyclic is true, lowest and highest bins are assumed to be
|
||||
// neighbors. This returns exp(U/kT) instead of U for better performance.
|
||||
fn calc_bias(&self, bin: usize, window: usize) -> f64 {
|
||||
let dimens = self.dimens_lengths.len();
|
||||
// index of the bias value depends on the window und dimension
|
||||
let bias_ndx: Vec<usize> = (0..dimens)
|
||||
.map(|dimen| { window * dimens + dimen }).collect();
|
||||
// Harmonic bias calculation: bias = 0.5*k(dx)^2
|
||||
// if cyclic is true, lowest and highest bins are assumed to be
|
||||
// neighbors. This returns exp(U/kT) instead of U for better performance.
|
||||
fn calc_bias(&self, bin: usize, window: usize) -> f64 {
|
||||
let dimens = self.dimens_lengths.len();
|
||||
// index of the bias value depends on the window und dimension
|
||||
let bias_ndx: Vec<usize> = (0..dimens)
|
||||
.map(|dimen| { window * dimens + dimen }).collect();
|
||||
|
||||
// find the N coords, force constants and bias coords
|
||||
let coord = self.get_coords_for_bin(bin);
|
||||
let bias_fc: Vec<f64> = bias_ndx.iter().map(|ndx| { self.bias_fc[*ndx] }).collect();
|
||||
let bias_pos: Vec<f64> = bias_ndx.iter().map(|ndx| { self.bias_pos[*ndx] }).collect();
|
||||
// find the N coords, force constants and bias coords
|
||||
let coord = self.get_coords_for_bin(bin);
|
||||
let bias_fc: Vec<f64> = bias_ndx.iter().map(|ndx| { self.bias_fc[*ndx] }).collect();
|
||||
let bias_pos: Vec<f64> = bias_ndx.iter().map(|ndx| { self.bias_pos[*ndx] }).collect();
|
||||
|
||||
let mut bias_sum = 0.0;
|
||||
for i in 0..dimens {
|
||||
let mut dist = (coord[i] - bias_pos[i]).abs();
|
||||
if self.cyclic { // periodic conditions
|
||||
let hist_len = self.hist_max[i] - self.hist_min[i];
|
||||
if dist > 0.5 * hist_len {
|
||||
dist -= hist_len;
|
||||
}
|
||||
}
|
||||
// store exp(U/kT) for better performance
|
||||
bias_sum += 0.5 * bias_fc[i] * dist * dist
|
||||
}
|
||||
(-bias_sum/self.kT).exp()
|
||||
}
|
||||
let mut bias_sum = 0.0;
|
||||
for i in 0..dimens {
|
||||
let mut dist = (coord[i] - bias_pos[i]).abs();
|
||||
if self.cyclic { // periodic conditions
|
||||
let hist_len = self.hist_max[i] - self.hist_min[i];
|
||||
if dist > 0.5 * hist_len {
|
||||
dist -= hist_len;
|
||||
}
|
||||
}
|
||||
// store exp(U/kT) for better performance
|
||||
bias_sum += 0.5 * bias_fc[i] * dist * dist
|
||||
}
|
||||
(-bias_sum/self.kT).exp()
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Dataset {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut datapoints: u32 = 0;
|
||||
for h in &self.histograms {
|
||||
datapoints += h.num_points;
|
||||
}
|
||||
write!(f, "{} windows, {} datapoints", self.num_windows, datapoints)
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut datapoints: u32 = 0;
|
||||
for h in &self.histograms {
|
||||
datapoints += h.num_points;
|
||||
}
|
||||
write!(f, "{} windows, {} datapoints", self.num_windows, datapoints)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::super::k_B;
|
||||
use super::*;
|
||||
use super::super::k_B;
|
||||
|
||||
macro_rules! assert_delta {
|
||||
macro_rules! assert_delta {
|
||||
($x:expr, $y:expr, $d:expr) => {
|
||||
assert!(($x-$y).abs() < $d, "{} != {}", $x, $y)
|
||||
}
|
||||
}
|
||||
|
||||
fn build_hist() -> Histogram {
|
||||
Histogram::new(
|
||||
22, // num_points
|
||||
vec![1.0, 1.0, 3.0, 5.0, 12.0] // bins
|
||||
)
|
||||
}
|
||||
fn build_hist() -> Histogram {
|
||||
Histogram::new(
|
||||
22, // num_points
|
||||
vec![1.0, 1.0, 3.0, 5.0, 12.0] // bins
|
||||
)
|
||||
}
|
||||
|
||||
fn build_hist_set() -> Dataset {
|
||||
let h = build_hist();
|
||||
Dataset::new(
|
||||
5, // num bins
|
||||
vec![1],
|
||||
vec![1.0], // bin width
|
||||
vec![0.0], // hist min
|
||||
vec![9.0], // hist max
|
||||
vec![4.5], // x0
|
||||
vec![10.0], // fc
|
||||
300.0*k_B, // kT
|
||||
vec![h], // hists
|
||||
false // cyclic
|
||||
)
|
||||
}
|
||||
fn build_hist_set() -> Dataset {
|
||||
let h = build_hist();
|
||||
Dataset::new(
|
||||
5, // num bins
|
||||
vec![1],
|
||||
vec![1.0], // bin width
|
||||
vec![0.0], // hist min
|
||||
vec![9.0], // hist max
|
||||
vec![4.5], // x0
|
||||
vec![10.0], // fc
|
||||
300.0*k_B, // kT
|
||||
vec![h], // hists
|
||||
false // cyclic
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calc_bias() {
|
||||
let ds = build_hist_set(); // k = 10
|
||||
#[test]
|
||||
fn calc_bias() {
|
||||
let ds = build_hist_set(); // k = 10
|
||||
|
||||
// 3th element -> x=3.5, x0=3.5
|
||||
assert_delta!(0.134_722_337_796, ds.calc_bias(3, 0), 0.000_000_01);
|
||||
// 3th element -> x=3.5, x0=3.5
|
||||
assert_delta!(0.134_722_337_796, ds.calc_bias(3, 0), 0.000_000_01);
|
||||
|
||||
// 8th element -> x=8.5, x0=3.5
|
||||
assert_delta!(1.0, ds.calc_bias(4,0), 0.000_000_01);
|
||||
|
||||
// 1st element -> x=0.5, x0=3.5. non-cyclic!
|
||||
assert_delta!(0.0, ds.calc_bias(0,0), 0.000_000_1);
|
||||
}
|
||||
// 8th element -> x=8.5, x0=3.5
|
||||
assert_delta!(1.0, ds.calc_bias(4,0), 0.000_000_01);
|
||||
|
||||
// 1st element -> x=0.5, x0=3.5. non-cyclic!
|
||||
assert_delta!(0.0, ds.calc_bias(0,0), 0.000_000_1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calc_biascyclic() {
|
||||
let mut ds = build_hist_set();
|
||||
ds.cyclic = true;
|
||||
#[test]
|
||||
fn calc_biascyclic() {
|
||||
let mut ds = build_hist_set();
|
||||
ds.cyclic = true;
|
||||
|
||||
// 7th element -> x=3.5, x0=3.5
|
||||
assert_delta!(0.134_722_337_796, ds.calc_bias(3, 0), 0.000_000_01);
|
||||
// 7th element -> x=3.5, x0=3.5
|
||||
assert_delta!(0.134_722_337_796, ds.calc_bias(3, 0), 0.000_000_01);
|
||||
|
||||
// 8th element -> x=4.5, x0=3.5
|
||||
assert_delta!(1.0, ds.calc_bias(4, 0), 0.000_000_01);
|
||||
|
||||
// 8th element -> x=4.5, x0=3.5
|
||||
assert_delta!(1.0, ds.calc_bias(4, 0), 0.000_000_01);
|
||||
|
||||
|
||||
// 1th element -> x=0.5, x0=3.5
|
||||
// cyclic flag makes bin 0 neighboring bin 9, so the distance is actually 2
|
||||
assert_delta!(0.000_000_000_000_011_776_9, ds.calc_bias(0, 0), 0.000_000_01);
|
||||
// 1th element -> x=0.5, x0=3.5
|
||||
// cyclic flag makes bin 0 neighboring bin 9, so the distance is actually 2
|
||||
assert_delta!(0.000_000_000_000_011_776_9, ds.calc_bias(0, 0), 0.000_000_01);
|
||||
|
||||
// 2nd element -> x=1.5, x0=3.5
|
||||
assert_delta!(0.000_000_01, ds.calc_bias(1, 0), 0.000_000_01);
|
||||
}
|
||||
// 2nd element -> x=1.5, x0=3.5
|
||||
assert_delta!(0.000_000_01, ds.calc_bias(1, 0), 0.000_000_01);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_x_for_bin() {
|
||||
let ds = build_hist_set();
|
||||
let expected: Vec<f64> = vec![0,1,2,3,4,5,6,7,8].iter()
|
||||
.map(|x| *x as f64 + 0.5).collect();
|
||||
#[test]
|
||||
fn get_x_for_bin() {
|
||||
let ds = build_hist_set();
|
||||
let expected: Vec<f64> = vec![0,1,2,3,4,5,6,7,8].iter()
|
||||
.map(|x| *x as f64 + 0.5).collect();
|
||||
expected.iter().enumerate().for_each(|(i, exp)| {
|
||||
assert_approx_eq!(exp, &ds.get_coords_for_bin(i)[0]);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_bin_count() {
|
||||
let ds = Dataset::new(
|
||||
5, // num bins
|
||||
vec![1],
|
||||
vec![1.0, 1.0], // bin width
|
||||
vec![0.0, 0.0], // hist min
|
||||
vec![5.0, 5.0], // hist max
|
||||
vec![7.5, 7.5], // x0
|
||||
vec![10.0, 10.0], // fc
|
||||
300.0*k_B, // kT
|
||||
vec![build_hist(), build_hist()], // hists
|
||||
false // cyclic
|
||||
);
|
||||
assert_delta!(2.0, ds.get_weighted_bin_count(0), 0.000_000_000_1);
|
||||
assert_delta!(2.0, ds.get_weighted_bin_count(1), 0.000_000_000_1);
|
||||
assert_delta!(6.0, ds.get_weighted_bin_count(2), 0.000_000_000_1);
|
||||
assert_delta!(10.0, ds.get_weighted_bin_count(3), 0.000_000_000_1);
|
||||
assert_delta!(24.0, ds.get_weighted_bin_count(4), 0.000_000_000_1);
|
||||
}
|
||||
#[test]
|
||||
fn get_bin_count() {
|
||||
let ds = Dataset::new(
|
||||
5, // num bins
|
||||
vec![1],
|
||||
vec![1.0, 1.0], // bin width
|
||||
vec![0.0, 0.0], // hist min
|
||||
vec![5.0, 5.0], // hist max
|
||||
vec![7.5, 7.5], // x0
|
||||
vec![10.0, 10.0], // fc
|
||||
300.0*k_B, // kT
|
||||
vec![build_hist(), build_hist()], // hists
|
||||
false // cyclic
|
||||
);
|
||||
assert_delta!(2.0, ds.get_weighted_bin_count(0), 0.000_000_000_1);
|
||||
assert_delta!(2.0, ds.get_weighted_bin_count(1), 0.000_000_000_1);
|
||||
assert_delta!(6.0, ds.get_weighted_bin_count(2), 0.000_000_000_1);
|
||||
assert_delta!(10.0, ds.get_weighted_bin_count(3), 0.000_000_000_1);
|
||||
assert_delta!(24.0, ds.get_weighted_bin_count(4), 0.000_000_000_1);
|
||||
}
|
||||
}
|
||||
467
src/io.rs
467
src/io.rs
@@ -1,6 +1,8 @@
|
||||
use super::histogram::Dataset;
|
||||
use super::histogram::Histogram;
|
||||
use super::Config;
|
||||
use super::correlation_analysis::{statistical_ineff, autocorrelation_time};
|
||||
use std::fs::OpenOptions;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::io::{BufReader,BufWriter};
|
||||
@@ -25,17 +27,27 @@ pub fn vprintln(s: String, verbose: bool) {
|
||||
}
|
||||
|
||||
// Read input data into a histogram set by iterating over input files
|
||||
// given in the metadata file
|
||||
pub fn read_data(cfg: &Config) -> Result<Dataset> {
|
||||
let mut bias_pos: Vec<f64> = Vec::new();
|
||||
let mut bias_fc: Vec<f64> = Vec::new();
|
||||
let mut histograms: Vec<Histogram> = Vec::new();
|
||||
// given in the metadata file. This generates at least one Dataset,
|
||||
// or multiple Datasets if convdt is set in the config
|
||||
pub fn read_data(cfg: &Config) -> Result<Vec<Dataset>> {
|
||||
let mut bias_pos: Vec<f64> = Vec::new();
|
||||
let mut bias_fc: Vec<f64> = Vec::new();
|
||||
let mut timeseries_lengths: Vec<usize> = Vec::new();
|
||||
let mut paths = Vec::new();
|
||||
|
||||
let kT = cfg.temperature * k_B;
|
||||
// Boundaries of individual histograms if convdt is set.
|
||||
let dataset_boundaries: Vec<(f64, f64)> = get_convdt_boundaries(cfg.start, cfg.end, cfg.convdt);
|
||||
let num_datasets = dataset_boundaries.len();
|
||||
|
||||
// for each timeseries, histograms are build for slices according to
|
||||
// start..convdt, start..2*convdt, ...
|
||||
let mut histograms = vec![Vec::new(); dataset_boundaries.len()];
|
||||
|
||||
let kT = cfg.temperature * k_B;
|
||||
let bin_width: Vec<f64> = (0..cfg.dimens).map(|idx| {
|
||||
(cfg.hist_max[idx] - cfg.hist_min[idx])/(cfg.num_bins[idx] as f64)
|
||||
}).collect();
|
||||
let num_bins = cfg.num_bins.iter().product();
|
||||
let num_bins: usize = cfg.num_bins.iter().product();
|
||||
let dimens_length = cfg.num_bins.clone();
|
||||
|
||||
let f = File::open(&cfg.metadata_file).chain_err(|| "Failed to open metadata file")?;
|
||||
@@ -43,29 +55,18 @@ pub fn read_data(cfg: &Config) -> Result<Dataset> {
|
||||
|
||||
// read each metadata file line and parse it
|
||||
for (line_num,l) in buf.lines().enumerate() {
|
||||
let line = l.chain_err(|| "Failed to read line")?;
|
||||
let line = l.chain_err(|| "Failed to read line")?;
|
||||
|
||||
// skip comments and empty lines
|
||||
if line.starts_with('#') || line.is_empty() {
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let split: Vec<&str> = line.split_whitespace().collect();
|
||||
let split: Vec<&str> = line.split_whitespace().collect();
|
||||
if split.len() < 1 + cfg.dimens * 2 {
|
||||
bail!(format!("Wrong number of columns in line {} of metadata file. Empty Line?", line_num+1));
|
||||
}
|
||||
|
||||
// parse histogram data
|
||||
let path = get_relative_path(&cfg.metadata_file, split[0]);
|
||||
let h = read_window_file(&path, cfg)
|
||||
.chain_err(|| format!("Failed to parse process data file {}", &path))?;
|
||||
if h.num_points == 0 {
|
||||
bail!(format!("No data points in histogram boundaries: {}", &path))
|
||||
}
|
||||
histograms.push(h);
|
||||
vprintln(format!("{}, {} data points added.", &path,
|
||||
histograms.last().unwrap().num_points), cfg.verbose);
|
||||
|
||||
// parse bias force constants and positions
|
||||
for val in split.iter().skip(1).take(cfg.dimens) {
|
||||
let pos = val.parse()
|
||||
@@ -77,15 +78,145 @@ pub fn read_data(cfg: &Config) -> Result<Dataset> {
|
||||
.chain_err(|| format!("Failed to read bias fc in line {} of metadata file", line_num+1))?;
|
||||
bias_fc.push(fc);
|
||||
}
|
||||
|
||||
// parse histogram data
|
||||
let path = get_relative_path(&cfg.metadata_file, split[0]);
|
||||
paths.push(path.clone());
|
||||
let (timeseries, timeseries_initial_lengths) = read_window_file(&path, cfg)
|
||||
.chain_err(|| format!("Failed to read time series from {}", &path))?;
|
||||
timeseries_lengths.push(timeseries_initial_lengths);
|
||||
|
||||
for (idx, interval) in dataset_boundaries.iter().enumerate() {
|
||||
// build histogram for slice start.._stop
|
||||
let (start, stop) = interval;
|
||||
let timeseries_mask: Vec<bool> = (0..timeseries[0].len()).map(|i| {
|
||||
is_in_time_boundaries(timeseries[0][i], *start, *stop)
|
||||
}).collect();
|
||||
let hist = build_histogram_from_timeseries(×eries, ×eries_mask, cfg);
|
||||
histograms[idx].push(hist);
|
||||
|
||||
if (cfg.convdt == 0.00) || idx+1 == num_datasets {
|
||||
vprintln(format!("{}, {} data points added.",
|
||||
&path, histograms[idx].last().unwrap().num_points), cfg.verbose);
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !histograms.is_empty() {
|
||||
Ok(Dataset::new(num_bins, dimens_length, bin_width, cfg.hist_min.clone(), cfg.hist_max.clone(), bias_pos, bias_fc, kT, histograms, cfg.cyclic))
|
||||
|
||||
// Datasets are created from histograms.
|
||||
// Empty histograms result in an error when its the final dataset, and a warning otherwise.
|
||||
vprintln(format!("Generating {} datasets from histograms.", num_datasets), cfg.verbose);
|
||||
let datasets: Vec<Dataset> = histograms.into_iter().enumerate().map(|(dataset_idx, dataset_histograms)| {
|
||||
for (hs, path) in dataset_histograms.iter().zip(&paths) {
|
||||
if hs.num_points == 0 {
|
||||
let warning = format!("No data points for interval {}-{} in histogram boundaries: {}.",
|
||||
dataset_boundaries[dataset_idx].0, dataset_boundaries[dataset_idx].1 ,&path);
|
||||
|
||||
if dataset_idx+1 == num_datasets {
|
||||
let warning = warning + " This is the final dataset.";
|
||||
if cfg.ignore_empty {
|
||||
eprintln!("{}", warning);
|
||||
} else {
|
||||
bail!(warning);
|
||||
}
|
||||
} else {
|
||||
eprintln!("{}", warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(Dataset::new(num_bins, dimens_length.clone(), bin_width.clone(),
|
||||
cfg.hist_min.clone(), cfg.hist_max.clone(), bias_pos.clone(),
|
||||
bias_fc.clone(), kT, dataset_histograms, cfg.cyclic))
|
||||
}).collect::<Result<Vec<Dataset>>>().chain_err(|| "Failed to create datasets.")?;
|
||||
|
||||
if datasets.is_empty() {
|
||||
bail!("No datasets created.")
|
||||
} else if datasets[0].histograms.is_empty() {
|
||||
bail!("Dataset has no associated data points.")
|
||||
} else {
|
||||
bail!("Histogram has no datapoints.")
|
||||
if datasets.len() > 1 {
|
||||
println!("Datasets:");
|
||||
println!("Dataset\t\tTime interval\t\tWindows\t\tN_total");
|
||||
for (idx, dataset) in datasets.iter().enumerate() {
|
||||
let n: u32 = dataset.histograms.iter().map(|h| h.num_points).sum();
|
||||
let mut stop = cfg.start+cfg.convdt*(idx+1) as f64;
|
||||
if stop > cfg.end {
|
||||
stop = cfg.end;
|
||||
}
|
||||
println!("{:?}\t\t{:?}-{:?}\t\t{:?}\t\t{:?}", idx+1, cfg.start, stop, dataset.histograms.len(), n);
|
||||
}
|
||||
}
|
||||
|
||||
let histograms = &datasets.last().unwrap().histograms;
|
||||
if cfg.uncorr {
|
||||
println!("Timeseries Correlation:");
|
||||
println!("Window\t\tN\t\tN_uncorr\tN/N_uncorr");
|
||||
for (idx, (n, h)) in timeseries_lengths.iter().zip(histograms.iter()).enumerate() {
|
||||
println!("{:?}\t\t{:?}\t\t{:?}\t\t{:.2}",
|
||||
idx+1, n, h.num_points, h.num_points as f64 / *n as f64);
|
||||
}
|
||||
let total_n = timeseries_lengths.iter().sum::<usize>() as f64;
|
||||
let total_h = histograms.iter().map(|h| h.num_points).sum::<u32>() as f64;
|
||||
println!("\t\t\t\t\tTotal:\t{:.2}", total_h/total_n);
|
||||
}
|
||||
|
||||
Ok(datasets)
|
||||
}
|
||||
}
|
||||
|
||||
// builds a time boundaries for datasets from convdt, start and end
|
||||
fn get_convdt_boundaries(start: f64, end: f64, convdt: f64) -> Vec<(f64, f64)> {
|
||||
if convdt == 0.0 {
|
||||
vec![(start, end)]
|
||||
} else {
|
||||
let intervals: usize = ((end - start) / convdt).ceil() as usize;
|
||||
(1..intervals+1).map(|i| {
|
||||
let interval_end = i as f64 * convdt + start;
|
||||
if interval_end > end {
|
||||
end
|
||||
} else {
|
||||
interval_end
|
||||
}
|
||||
}).map(|interval_end| { (start, interval_end) }).collect()
|
||||
}
|
||||
}
|
||||
|
||||
// build a histogram from a timeseries
|
||||
// mask is used to filter the timeseries for selected frames
|
||||
fn build_histogram_from_timeseries(timeseries: &[Vec<f64>], mask: &[bool],
|
||||
cfg: &Config) -> Histogram {
|
||||
|
||||
// total number of bins is the product of all dimensions length
|
||||
let total_bins = cfg.num_bins.iter().product();
|
||||
|
||||
// bin width for each dimension: (max-min)/bins
|
||||
let bin_width: Vec<f64> = (0..cfg.dimens).map(|idx| {
|
||||
(cfg.hist_max[idx] - cfg.hist_min[idx])/(cfg.num_bins[idx] as f64)
|
||||
}).collect();
|
||||
|
||||
// build histogram for slice start..convdt_stop
|
||||
let mut hist = vec![0.0; total_bins];
|
||||
for i in (0..timeseries[0].len()).filter(|i| mask[*i]) {
|
||||
let mut values: Vec<f64> = vec![f64::NAN; cfg.dimens+1];
|
||||
for j in 0..values.len() {
|
||||
values[j] = timeseries[j][i];
|
||||
}
|
||||
|
||||
if is_in_hist_boundaries(&values[1..], cfg) {
|
||||
let bin_indeces: Vec<usize> = (0..cfg.dimens).map(|dimen: usize| {
|
||||
let val = values[dimen+1];
|
||||
((val - cfg.hist_min[dimen]) / bin_width[dimen]) as usize
|
||||
}).collect();
|
||||
let index = flat_index(&bin_indeces, &cfg.num_bins);
|
||||
hist[index] += 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
let num_points: f64 = hist.iter().sum();
|
||||
Histogram::new(num_points as u32, hist)
|
||||
}
|
||||
|
||||
// transforms a multidimensional index into a one dimensional index
|
||||
// indeces: multidimensional indeces
|
||||
// lengths: length of the matrix in each dimension
|
||||
@@ -108,33 +239,57 @@ fn is_in_hist_boundaries(values: &[f64], cfg: &Config) -> bool {
|
||||
}
|
||||
|
||||
// returns true given time in inside the time boundaries defined by cfg
|
||||
fn is_in_time_boundaries(time: f64, cfg: &Config) -> bool {
|
||||
if cfg.start <= time && time <= cfg.end {
|
||||
fn is_in_time_boundaries(time: f64, start: f64, end: f64) -> bool {
|
||||
if start <= time && time <= end {
|
||||
return true
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
// parse a time series file into a histogram
|
||||
fn read_window_file(window_file: &str, cfg: &Config) -> Result<Histogram> {
|
||||
let f = File::open(window_file)
|
||||
// parse a time series file
|
||||
fn read_window_file(window_file: &str, cfg: &Config) -> Result<(Vec<Vec<f64>>, usize)> {
|
||||
let mut timeseries: Vec<Vec<f64>> = read_timeseries(window_file, cfg)?;
|
||||
|
||||
// filter the timeseries based on start/end parameters
|
||||
let time_series_mask: Vec<bool> = timeseries[0].iter()
|
||||
.map(|t| is_in_time_boundaries(*t, cfg.start, cfg.end)).collect();
|
||||
timeseries = timeseries.into_iter().map(|ts| {
|
||||
ts.into_iter().zip(time_series_mask.iter()).filter_map(|(val, mask)| {
|
||||
if *mask {
|
||||
Some(val)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}).collect()
|
||||
}).collect::<Vec<Vec<f64>>>();
|
||||
|
||||
let timeseries_inital_length = timeseries[0].len();
|
||||
if cfg.uncorr {
|
||||
timeseries = uncorrelate(timeseries, cfg);
|
||||
}
|
||||
|
||||
if timeseries[0].is_empty() && !cfg.ignore_empty {
|
||||
bail!("Time series is empty")
|
||||
}
|
||||
|
||||
Ok((timeseries, timeseries_inital_length))
|
||||
}
|
||||
|
||||
// Read a multidimensional timeseries
|
||||
// The resulting vector contains one vector per dimension
|
||||
fn read_timeseries(window_file: &str, cfg: &Config) -> Result<Vec<Vec<f64>>> {
|
||||
let f = File::open(window_file)
|
||||
.chain_err(|| format!("Failed to open sample data file {}.", window_file))?;
|
||||
let mut buf = BufReader::new(&f);
|
||||
|
||||
// total number of bins is the product of all dimensions length
|
||||
let total_bins = cfg.num_bins.iter().product();
|
||||
let mut hist = vec![0.0; total_bins];
|
||||
|
||||
// bin width for each dimension: (max-min)/bins
|
||||
let bin_width: Vec<f64> = (0..cfg.dimens).map(|idx| {
|
||||
(cfg.hist_max[idx] - cfg.hist_min[idx])/(cfg.num_bins[idx] as f64)
|
||||
}).collect();
|
||||
let mut timeseries = vec![Vec::new(); cfg.dimens+1];
|
||||
|
||||
// read and parse each timeseries line
|
||||
let mut line = String::new();
|
||||
let mut linecount = 0;
|
||||
while buf.read_line(&mut line).chain_err(|| "Failed to read line")? > 0 {
|
||||
linecount += 1;
|
||||
|
||||
// skip comments and empty lines
|
||||
if line.starts_with('#') || line.starts_with('@') || line.is_empty() {
|
||||
line.clear();
|
||||
@@ -142,43 +297,76 @@ fn read_window_file(window_file: &str, cfg: &Config) -> Result<Histogram> {
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
let split: Vec<&str> = line.split_whitespace().collect();
|
||||
if split.len() < cfg.dimens+1 {
|
||||
bail!(format!("Wrong number of columns in line {} of window file {}. Empty Line?.", linecount, window_file));
|
||||
}
|
||||
|
||||
let mut values: Vec<f64> = vec![f64::NAN; cfg.dimens+1];
|
||||
for i in 0..values.len() {
|
||||
values[i] = split[i].parse::<f64>()
|
||||
.chain_err(|| format!("Failed to parse line {} of window file {}.", linecount, window_file))?;
|
||||
}
|
||||
for i in 0..cfg.dimens+1 {
|
||||
timeseries[i].push(split[i].parse::<f64>()
|
||||
.chain_err(|| format!("Failed to parse line {} of window file {}.", linecount, window_file))?
|
||||
|
||||
if is_in_hist_boundaries(&values[1..], cfg) && is_in_time_boundaries(values[0], cfg) {
|
||||
let bin_indeces: Vec<usize> = (0..cfg.dimens).map(|dimen: usize| {
|
||||
let val = values[dimen+1];
|
||||
((val - cfg.hist_min[dimen]) / bin_width[dimen]) as usize
|
||||
}).collect();
|
||||
let index = flat_index(&bin_indeces, &cfg.num_bins);
|
||||
hist[index] += 1.0;
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
line.clear();
|
||||
}
|
||||
Ok(timeseries)
|
||||
}
|
||||
|
||||
let num_points: f64 = hist.iter().sum();
|
||||
Ok(Histogram::new(num_points as u32, hist))
|
||||
|
||||
// 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>> {
|
||||
// calculate inefficiencies and find the highest one
|
||||
let gs: Vec<f64> = timeseries[1..].iter().map(|ts| statistical_ineff(ts)).collect();
|
||||
let mut max_g = 1.0;
|
||||
for g in gs {
|
||||
if g > max_g {
|
||||
max_g = g;
|
||||
}
|
||||
}
|
||||
|
||||
// round g up
|
||||
let mut trunc_g = max_g.trunc() as usize;
|
||||
if (trunc_g as f64 - max_g).abs() > 0.000_000_000_1 {
|
||||
trunc_g += 1;
|
||||
}
|
||||
|
||||
// filter correlated samples from timeseries
|
||||
let prev_len = timeseries[0].len();
|
||||
let timeseries = timeseries.into_iter().map(|ts| {
|
||||
ts.into_iter().step_by(trunc_g).collect::<Vec<f64>>()
|
||||
}).collect::<Vec<Vec<f64>>>();
|
||||
|
||||
let new_len = timeseries[0].len();
|
||||
if cfg.verbose {
|
||||
let tau = autocorrelation_time(max_g)* (timeseries[0][1]-timeseries[0][0]);
|
||||
vprintln(format!("{:?}/{:?} samples are uncorrelated. {:?} samples removed from timeseries (tau={:.5})", new_len, prev_len, prev_len-new_len, tau), true);
|
||||
}
|
||||
timeseries
|
||||
}
|
||||
|
||||
// Write WHAM calculation results to out_file.
|
||||
pub fn write_results(out_file: &str, ds: &Dataset, free: &[f64],
|
||||
free_std: &[f64], prob: &[f64], prob_std: &[f64]) -> Result<()> {
|
||||
let output = File::create(out_file)
|
||||
pub fn write_results(out_file: &str, append: bool, ds: &Dataset, free: &[f64],
|
||||
free_std: &[f64], prob: &[f64], prob_std: &[f64], index: Option<usize>) -> Result<()> {
|
||||
|
||||
if !append && Path::new(out_file).exists() {
|
||||
std::fs::remove_file(out_file).chain_err(|| "Failed to delete file.")?;
|
||||
}
|
||||
let output = OpenOptions::new().write(true)
|
||||
.append(true)
|
||||
.create(true)
|
||||
.open(out_file)
|
||||
.chain_err(|| format!("Failed to create file with path {}", out_file))?;
|
||||
let mut buf = BufWriter::new(output);
|
||||
|
||||
let header: String = (0..ds.dimens_lengths.len()).map(|d| format!("coord{}", d+1))
|
||||
.collect::<Vec<String>>().join(" ");
|
||||
if let Some(index) = index {
|
||||
writeln!(buf, "#Dataset {}", index).unwrap();
|
||||
}
|
||||
writeln!(buf, "#{} Free Energy +/- Probability +/-", header).unwrap();
|
||||
|
||||
for bin in 0..free.len() {
|
||||
@@ -214,7 +402,10 @@ mod tests {
|
||||
bootstrap: 0,
|
||||
bootstrap_seed: 1234,
|
||||
start: 0.0,
|
||||
end: 1e+20
|
||||
end: 1e+20,
|
||||
uncorr: false,
|
||||
convdt: 0.0,
|
||||
ignore_empty: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,8 +413,11 @@ mod tests {
|
||||
fn read_window_file() {
|
||||
let f = "example/1d_cyclic/COLVAR+0.0.xvg";
|
||||
let cfg = cfg();
|
||||
let h = super::read_window_file(&f, &cfg).unwrap();
|
||||
let (timeseries, timeseries_inital_length) = super::read_window_file(&f, &cfg).unwrap();
|
||||
let mask = vec![true; timeseries[0].len()];
|
||||
let h = build_histogram_from_timeseries(×eries, &mask, &cfg);
|
||||
println!("{:?}", h);
|
||||
assert_eq!(5000, timeseries_inital_length);
|
||||
assert_eq!(5000, h.num_points);
|
||||
assert_approx_eq!(0.0, h.bins[2]);
|
||||
assert_approx_eq!(11.0, h.bins[3]);
|
||||
@@ -233,11 +427,31 @@ mod tests {
|
||||
assert_approx_eq!(0.0, h.bins[7]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn read_timeseries() {
|
||||
let f = "example/1d_cyclic/COLVAR+0.0.xvg";
|
||||
let cfg = cfg();
|
||||
let ts = super::read_timeseries(&f, &cfg).unwrap();
|
||||
let expected = [
|
||||
-0.153_145,
|
||||
-0.377_860,
|
||||
0.010_992,
|
||||
0.123_074,
|
||||
0.108_291,
|
||||
0.261_607,
|
||||
];
|
||||
assert!(ts.len() == 2);
|
||||
assert!(ts[0].len() == 5000);
|
||||
println!("{:?}", ts);
|
||||
for (actual, expected) in ts[1].iter().zip(expected.iter()) {
|
||||
assert!((actual-expected).abs() < 0.001, "{:?} != {:?}", actual, expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn read_data() {
|
||||
let cfg = cfg();
|
||||
let ds = super::read_data(&cfg).unwrap();
|
||||
let ds = &super::read_data(&cfg).unwrap()[0];
|
||||
println!("{:?}", ds);
|
||||
assert_eq!(25, ds.num_windows);
|
||||
assert_eq!(cfg.num_bins.len(), ds.dimens_lengths.len());
|
||||
@@ -246,6 +460,99 @@ mod tests {
|
||||
assert_eq!(25, ds.histograms.len())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn read_data_empty() {
|
||||
let mut cfg = cfg();
|
||||
cfg.metadata_file = "tests/data/metadata_convdt.dat".to_string();
|
||||
cfg.start = 2.5;
|
||||
cfg.end = 9.0;
|
||||
cfg.ignore_empty = false;
|
||||
|
||||
// should throw an error since one first timeseries ends at 2
|
||||
let ds = super::read_data(&cfg);
|
||||
if ds.is_ok() {
|
||||
panic!()
|
||||
}
|
||||
|
||||
// should not throw an error because ignore_empty is set
|
||||
cfg.ignore_empty = true;
|
||||
let ds = super::read_data(&cfg);
|
||||
if ds.is_err() {
|
||||
panic!()
|
||||
}
|
||||
}
|
||||
|
||||
// test if convdt results in correct parsing
|
||||
// 6 timeseries are loaded ranging from:
|
||||
// 1. 0-10, 500 datapoints
|
||||
// 2. 0-2, 100 datapoints
|
||||
// 3. 0-5, 250 datapoints
|
||||
// 4. 5-10, 250 datapoints
|
||||
// 5. 7-10, 150 datapoints
|
||||
// 6 2-7, 250 datapoints
|
||||
#[test]
|
||||
fn read_data_convdt() {
|
||||
let mut cfg = cfg();
|
||||
cfg.metadata_file = "tests/data/metadata_convdt.dat".to_string();
|
||||
cfg.convdt = 2.0;
|
||||
cfg.start = 0.0;
|
||||
cfg.end = 9.0;
|
||||
let dss = super::read_data(&cfg).unwrap();
|
||||
assert_eq!(5, dss.len());
|
||||
|
||||
for ds in &dss {
|
||||
assert_eq!(6, ds.num_windows);
|
||||
assert_eq!(6, ds.histograms.len());
|
||||
}
|
||||
|
||||
let hist_points: Vec<u32> = dss.iter().map(|ds| {
|
||||
ds.histograms.iter().map(|h| h.num_points).sum()
|
||||
}).collect();
|
||||
|
||||
let expected_hist_points = vec![
|
||||
300, // 0-2: 100+100+100+0+0
|
||||
600, // 0-4: 200+100+200+0+0+100
|
||||
900, // 0-6: 300+100+250+50+0+200
|
||||
1200, // 0-8: 400+100+250+150+50+250
|
||||
1350, // 0-9: 450+100+250+200+100+250
|
||||
];
|
||||
for (expected, actual) in expected_hist_points.iter().zip(hist_points.iter()) {
|
||||
assert_eq!(expected, actual);
|
||||
}
|
||||
}
|
||||
|
||||
// test convdt with a single time series
|
||||
#[test]
|
||||
fn read_data_convdt_single() {
|
||||
let mut cfg = cfg();
|
||||
cfg.metadata_file = "tests/data/metadata_convdt_single.dat".to_string();
|
||||
cfg.convdt = 2.0;
|
||||
cfg.start = 0.0;
|
||||
cfg.end = 9.0;
|
||||
let dss = super::read_data(&cfg).unwrap();
|
||||
assert_eq!(5, dss.len());
|
||||
|
||||
for ds in &dss {
|
||||
assert_eq!(1, ds.num_windows);
|
||||
assert_eq!(1, ds.histograms.len());
|
||||
}
|
||||
|
||||
let hist_points: Vec<u32> = dss.iter().map(|ds| {
|
||||
ds.histograms.iter().map(|h| h.num_points).sum()
|
||||
}).collect();
|
||||
|
||||
let expected_hist_points = vec![
|
||||
0, // 0-2
|
||||
100, // 0-4
|
||||
200, // 0-6
|
||||
250, // 0-8
|
||||
250, // 0-9
|
||||
];
|
||||
for (expected, actual) in expected_hist_points.iter().zip(hist_points.iter()) {
|
||||
assert_eq!(expected, actual);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_relative_path() {
|
||||
let path1 = "path/to/some_file.dat";
|
||||
@@ -256,4 +563,42 @@ mod tests {
|
||||
let relative3 = super::get_relative_path(&path1, &path3);
|
||||
assert_eq!("path/to/subfolder/another_file.dat" ,relative3);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn is_in_time_boundaries() {
|
||||
let start = 10.0;
|
||||
let end = 20.0;
|
||||
assert!(super::is_in_time_boundaries(15.0, start, end));
|
||||
assert!(super::is_in_time_boundaries(10.0, start, end));
|
||||
assert!(super::is_in_time_boundaries(20.0, start, end));
|
||||
assert!(!super::is_in_time_boundaries(9.9999999, start, end));
|
||||
assert!(!super::is_in_time_boundaries(20.000001, start, end));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_convdt_boundaries() {
|
||||
let test = super::get_convdt_boundaries(10.0, 20.0, 10.0);
|
||||
println!("{:?}", test);
|
||||
assert!(test.len() == 1);
|
||||
assert_approx_eq!(test[0].0, 10.0);
|
||||
assert_approx_eq!(test[0].1, 20.0);
|
||||
|
||||
let test = super::get_convdt_boundaries(10.0, 20.0, 5.0);
|
||||
println!("{:?}", test);
|
||||
assert!(test.len() == 2);
|
||||
assert_approx_eq!(test[0].0, 10.0);
|
||||
assert_approx_eq!(test[0].1, 15.0);
|
||||
assert_approx_eq!(test[1].0, 10.0);
|
||||
assert_approx_eq!(test[1].1, 20.0);
|
||||
|
||||
let test = super::get_convdt_boundaries(5.0, 30.0, 10.0);
|
||||
println!("{:?}", test);
|
||||
assert!(test.len() == 3);
|
||||
assert_approx_eq!(test[0].0, 5.0);
|
||||
assert_approx_eq!(test[0].1, 15.0);
|
||||
assert_approx_eq!(test[1].0, 5.0);
|
||||
assert_approx_eq!(test[1].1, 25.0);
|
||||
assert_approx_eq!(test[2].0, 5.0);
|
||||
assert_approx_eq!(test[2].1, 30.0);
|
||||
}
|
||||
}
|
||||
|
||||
245
src/lib.rs
245
src/lib.rs
@@ -3,7 +3,6 @@
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
extern crate rand;
|
||||
extern crate rgsl;
|
||||
extern crate rayon;
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
@@ -13,6 +12,8 @@ extern crate assert_approx_eq;
|
||||
pub mod io;
|
||||
pub mod histogram;
|
||||
pub mod error_analysis;
|
||||
pub mod correlation_analysis;
|
||||
pub mod statistics;
|
||||
|
||||
use histogram::Dataset;
|
||||
use std::f64;
|
||||
@@ -30,31 +31,36 @@ static k_B: f64 = 0.008_314_462_1; // kJ/mol*K
|
||||
// Application config
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
pub metadata_file: String,
|
||||
pub hist_min: Vec<f64>,
|
||||
pub hist_max: Vec<f64>,
|
||||
pub num_bins: Vec<usize>,
|
||||
pub dimens: usize,
|
||||
pub verbose: bool,
|
||||
pub tolerance: f64,
|
||||
pub max_iterations: usize,
|
||||
pub temperature: f64,
|
||||
pub cyclic: bool,
|
||||
pub output: String,
|
||||
pub bootstrap: usize,
|
||||
pub metadata_file: String,
|
||||
pub hist_min: Vec<f64>,
|
||||
pub hist_max: Vec<f64>,
|
||||
pub num_bins: Vec<usize>,
|
||||
pub dimens: usize,
|
||||
pub verbose: bool,
|
||||
pub tolerance: f64,
|
||||
pub max_iterations: usize,
|
||||
pub temperature: f64,
|
||||
pub cyclic: bool,
|
||||
pub output: String,
|
||||
pub bootstrap: usize,
|
||||
pub bootstrap_seed: u64,
|
||||
pub start: f64,
|
||||
pub end: f64,
|
||||
pub uncorr: bool,
|
||||
pub convdt: f64,
|
||||
pub ignore_empty: bool
|
||||
}
|
||||
|
||||
impl fmt::Display for Config {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "Metadata={}, hist_min={:?}, hist_max={:?}, bins={:?},
|
||||
verbose={}, tolerance={}, iterations={}, temperature={},
|
||||
cyclic={:?}, bootstrap={:?}, seed={:?}",
|
||||
cyclic={:?}, uncorr={:?}, bootstrap={:?}, seed={:?},
|
||||
uncorr={:?}, start={:?}, end={:?}, convdt={:?}, ignore_empty={:?}",
|
||||
self.metadata_file, self.hist_min, self.hist_max, self.num_bins,
|
||||
self.verbose, self.tolerance, self.max_iterations, self.temperature,
|
||||
self.cyclic, self.bootstrap, self.bootstrap_seed)
|
||||
self.cyclic, self.uncorr, self.bootstrap, self.bootstrap_seed,
|
||||
self.uncorr, self.start, self.end, self.convdt, self.ignore_empty)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +70,7 @@ impl fmt::Display for Config {
|
||||
fn is_converged(old_F: &[f64], new_F: &[f64], tolerance: f64) -> bool {
|
||||
// calculates abs diff between every old and new F and checks if any
|
||||
// is larger than tolerance
|
||||
!new_F.iter()
|
||||
!new_F.iter()
|
||||
.zip(old_F.iter())
|
||||
.map(|x| { (x.0-x.1).abs() })
|
||||
.any(|diff| { diff > tolerance })
|
||||
@@ -75,13 +81,13 @@ fn is_converged(old_F: &[f64], new_F: &[f64], tolerance: f64) -> bool {
|
||||
// P(x) = \frac {\sum_{i=1}^N{n_i(x)}}
|
||||
// {\sum_{i=1}^N{ N_i exp(\beta [F_i - U_{bias,i}(x)])}}
|
||||
fn calc_bin_probability(bin: usize, dataset: &Dataset, F: &[f64]) -> f64 {
|
||||
let mut denom_sum: f64 = 0.0;
|
||||
let bin_count: f64 = dataset.get_weighted_bin_count(bin);
|
||||
let mut denom_sum: f64 = 0.0;
|
||||
let bin_count: f64 = dataset.get_weighted_bin_count(bin);
|
||||
for (window, h) in dataset.histograms.iter().enumerate() {
|
||||
let bias = dataset.get_bias(bin, window);
|
||||
let bias = dataset.get_bias(bin, window);
|
||||
denom_sum += (dataset.weights[window] * h.num_points as f64)
|
||||
* bias * F[window];
|
||||
}
|
||||
}
|
||||
bin_count / denom_sum
|
||||
}
|
||||
|
||||
@@ -103,26 +109,26 @@ fn calc_window_F(window: usize, dataset: &Dataset, P: &[f64]) -> f64 {
|
||||
// offsets F based on previous bias offsets F_prev. This updates the values in
|
||||
// vectors F and P.
|
||||
fn perform_wham_iteration(dataset: &Dataset, F_prev: &[f64], F: &mut Vec<f64>, P: &mut Vec<f64>) {
|
||||
// Update P
|
||||
// Update P
|
||||
// evaluate first WHAM equation for each bin to
|
||||
// estimate probabilities based on previous offsets (F_prev))
|
||||
// estimate probabilities based on previous offsets (F_prev))
|
||||
(0..dataset.num_bins).into_par_iter()
|
||||
.map(|bin| { calc_bin_probability(bin, dataset, F_prev) })
|
||||
.collect_into_vec(P);
|
||||
.map(|bin| { calc_bin_probability(bin, dataset, F_prev) })
|
||||
.collect_into_vec(P);
|
||||
|
||||
// Update F
|
||||
// evaluate second WHAM equation for each window to
|
||||
// estimate new bias offsets from propabilities
|
||||
(0..dataset.num_windows).into_par_iter()
|
||||
.map(|window| {calc_window_F(window, dataset, P)} )
|
||||
.collect_into_vec(F);
|
||||
// evaluate second WHAM equation for each window to
|
||||
// estimate new bias offsets from propabilities
|
||||
(0..dataset.num_windows).into_par_iter()
|
||||
.map(|window| {calc_window_F(window, dataset, P)} )
|
||||
.collect_into_vec(F);
|
||||
}
|
||||
|
||||
// Full WHAM calculation. Calls `perform_wham_iteration` until convergence
|
||||
// criteria are met or max iterations reached.
|
||||
pub fn perform_wham(cfg: &Config, dataset: &Dataset)
|
||||
-> Result<(Vec<f64>, Vec<f64>, Vec<f64>)> {
|
||||
// allocate required vectors.
|
||||
// allocate required vectors.
|
||||
|
||||
// bin probability
|
||||
let mut P: Vec<f64> = vec![f64::NAN; dataset.num_bins];
|
||||
@@ -171,54 +177,67 @@ pub fn perform_wham(cfg: &Config, dataset: &Dataset)
|
||||
}
|
||||
|
||||
if iteration == cfg.max_iterations {
|
||||
bail!("WHAM not converged! (max iterations reached)");
|
||||
bail!("WHAM not converged! (max iterations reached)");
|
||||
}
|
||||
|
||||
Ok((P, F, F_prev))
|
||||
Ok((P, F, F_prev))
|
||||
}
|
||||
|
||||
pub fn run(cfg: &Config) -> Result<()>{
|
||||
println!("Supplied WHAM options: {}", &cfg);
|
||||
|
||||
println!("Reading input files.");
|
||||
let dataset = io::read_data(&cfg).chain_err(|| "Failed to create histogram.")?;
|
||||
println!("{}", &dataset);
|
||||
let datasets = io::read_data(&cfg).chain_err(|| "Failed to read data.")?;
|
||||
|
||||
let (P, F, F_prev) = perform_wham(&cfg, &dataset)?;
|
||||
println!("WHAM converged.");
|
||||
for (idx, dataset) in datasets.iter().enumerate() {
|
||||
if datasets.len() > 1 {
|
||||
println!("Dataset {}/{}: {}", idx+1, datasets.len(), &dataset);
|
||||
}
|
||||
else {
|
||||
println!("{}", &dataset);
|
||||
}
|
||||
let (P, F, F_prev) = perform_wham(&cfg, &dataset)?;
|
||||
println!("WHAM converged.");
|
||||
|
||||
let (P_std, free_energy_std) = if cfg.bootstrap > 0 {
|
||||
println!("Bootstrapping..");
|
||||
error_analysis::run_bootstrap(&cfg, dataset.clone(), cfg.bootstrap)
|
||||
} else {
|
||||
(vec![0.0; P.len()], vec![0.0; P.len()])
|
||||
};
|
||||
let (P_std, free_energy_std) = if cfg.bootstrap > 0 {
|
||||
println!("Bootstrapping..");
|
||||
error_analysis::run_bootstrap(&cfg, dataset.clone(), cfg.bootstrap)
|
||||
} else {
|
||||
(vec![0.0; P.len()], vec![0.0; P.len()])
|
||||
};
|
||||
|
||||
// calculate free energy and dump state
|
||||
println!("Finished. Dumping final PMF");
|
||||
let free_energy = calc_free_energy(&dataset, &P);
|
||||
dump_state(&dataset, &F, &F_prev, &P, &P_std, &free_energy, &free_energy_std);
|
||||
|
||||
io::write_results(&cfg.output, &dataset, &free_energy, &free_energy_std, &P, &P_std)
|
||||
.chain_err(|| "Could not write results to output file")?;
|
||||
// calculate free energy and dump state
|
||||
println!("Finished. Dumping PMF");
|
||||
let free_energy = calc_free_energy(&dataset, &P);
|
||||
|
||||
dump_state(&dataset, &F, &F_prev, &P, &P_std, &free_energy, &free_energy_std);
|
||||
let append = idx > 0 && datasets.len() > 1;
|
||||
let index = if datasets.len() > 1 {
|
||||
Some(idx)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
io::write_results(&cfg.output, append, &dataset, &free_energy, &free_energy_std, &P, &P_std, index)
|
||||
.chain_err(|| "Could not write results to output file")?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
// get average difference between two bias offset sets
|
||||
fn diff_avg(F: &[f64], F_prev: &[f64]) -> f64 {
|
||||
let mut F_sum: f64 = 0.0;
|
||||
for i in 0..F.len() {
|
||||
F_sum += (F[i]-F_prev[i]).abs()
|
||||
}
|
||||
F_sum / F.len() as f64
|
||||
let mut F_sum: f64 = 0.0;
|
||||
for i in 0..F.len() {
|
||||
F_sum += (F[i]-F_prev[i]).abs()
|
||||
}
|
||||
F_sum / F.len() as f64
|
||||
}
|
||||
|
||||
// calculate the normalized free energy from probability values
|
||||
fn calc_free_energy(dataset: &Dataset, P: &[f64]) -> Vec<f64> {
|
||||
let mut minimum = f64::MAX;
|
||||
let mut free_energy: Vec<f64> = P.iter()
|
||||
let mut free_energy: Vec<f64> = P.iter()
|
||||
.map(|p| {
|
||||
-dataset.kT * p.ln()
|
||||
})
|
||||
@@ -238,28 +257,28 @@ fn calc_free_energy(dataset: &Dataset, P: &[f64]) -> Vec<f64> {
|
||||
// Print the current WHAM iteration state. Dumps the PMF and associated vectors
|
||||
fn dump_state(dataset: &Dataset, F: &[f64], F_prev: &[f64], P: &[f64],
|
||||
P_std: &[f64], A: &[f64], A_std: &[f64]) {
|
||||
// TODO fix output of F/F_prev
|
||||
let out = std::io::stdout();
|
||||
// TODO fix output of F/F_prev
|
||||
let out = std::io::stdout();
|
||||
let mut lock = out.lock();
|
||||
writeln!(lock, "# PMF").unwrap();
|
||||
writeln!(lock, "#bin\t\tFree Energy\t\t+/-\t\tP(x)\t\t+/-").unwrap();
|
||||
for bin in 0..dataset.num_bins {
|
||||
writeln!(lock, "{:9.5}\t{:9.5}\t{:9.5}\t{:9.5}\t{:9.5}",
|
||||
writeln!(lock, "# PMF").unwrap();
|
||||
writeln!(lock, "#bin\t\tFree Energy\t\t+/-\t\tP(x)\t\t+/-").unwrap();
|
||||
for bin in 0..dataset.num_bins {
|
||||
writeln!(lock, "{:9.5}\t{:9.5}\t{:9.5}\t{:9.5}\t{:9.5}",
|
||||
bin, A[bin], A_std[bin], P[bin], P_std[bin]).unwrap();
|
||||
}
|
||||
writeln!(lock, "# Bias offsets").unwrap();
|
||||
writeln!(lock, "#Window\t\tF\t\tF_prev").unwrap();
|
||||
for window in 0..dataset.num_windows {
|
||||
writeln!(lock, "{}\t{:9.5}\t{:8.8}",
|
||||
}
|
||||
writeln!(lock, "# Bias offsets").unwrap();
|
||||
writeln!(lock, "#Window\t\tF\t\tF_prev").unwrap();
|
||||
for window in 0..dataset.num_windows {
|
||||
writeln!(lock, "{}\t{:9.5}\t{:8.8}",
|
||||
window, F[window], (F[window]-F_prev[window]).abs()).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::histogram::{Dataset,Histogram};
|
||||
use std::f64;
|
||||
use super::histogram::{Dataset,Histogram};
|
||||
use std::f64;
|
||||
use super::k_B;
|
||||
|
||||
macro_rules! assert_delta {
|
||||
@@ -269,65 +288,65 @@ mod tests {
|
||||
}
|
||||
|
||||
|
||||
fn create_test_dataset() -> Dataset {
|
||||
let h1 = Histogram::new(10, vec![0.0, 1.0, 1.0, 8.0, 0.0]);
|
||||
let h2 = Histogram::new(10, vec![0.0, 0.0, 8.0, 1.0, 1.0]);
|
||||
Dataset::new(5, vec![5], vec![1.0], vec![0.0], vec![4.0],
|
||||
fn create_test_dataset() -> Dataset {
|
||||
let h1 = Histogram::new(10, vec![0.0, 1.0, 1.0, 8.0, 0.0]);
|
||||
let h2 = Histogram::new(10, vec![0.0, 0.0, 8.0, 1.0, 1.0]);
|
||||
Dataset::new(5, vec![5], vec![1.0], vec![0.0], vec![4.0],
|
||||
vec![1.0, 1.0], vec![10.0, 10.0], 300.0*k_B, vec![h1, h2], false)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn is_converged() {
|
||||
let new = vec![1.0,1.0];
|
||||
let old = vec![0.95, 1.0];
|
||||
let tolerance = 0.1;
|
||||
let converged = super::is_converged(&old, &new, tolerance);
|
||||
assert!(converged);
|
||||
|
||||
let old = vec![0.8, 1.0];
|
||||
let converged = super::is_converged(&old, &new, tolerance);
|
||||
assert!(!converged);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calc_bin_probability() {
|
||||
let dataset = create_test_dataset();
|
||||
let F = vec![1.0; dataset.num_bins] ;
|
||||
fn is_converged() {
|
||||
let new = vec![1.0,1.0];
|
||||
let old = vec![0.95, 1.0];
|
||||
let tolerance = 0.1;
|
||||
let converged = super::is_converged(&old, &new, tolerance);
|
||||
assert!(converged);
|
||||
|
||||
let old = vec![0.8, 1.0];
|
||||
let converged = super::is_converged(&old, &new, tolerance);
|
||||
assert!(!converged);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calc_bin_probability() {
|
||||
let dataset = create_test_dataset();
|
||||
let F = vec![1.0; dataset.num_bins] ;
|
||||
let expected = vec!(0.0, 0.082_529_668_703_131_6, 40.923_558_470_974_93,
|
||||
124_226.700_033_77, 2_308_526_035.528_374_7);
|
||||
expected.iter().enumerate().for_each(|(i, exp)| {
|
||||
let p = super::calc_bin_probability(i, &dataset, &F);
|
||||
assert_delta!(exp, p, 0.000_000_1);
|
||||
let p = super::calc_bin_probability(i, &dataset, &F);
|
||||
assert_delta!(exp, p, 0.000_000_1);
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calc_bias_offset() {
|
||||
let dataset = create_test_dataset();
|
||||
let probability = vec!(0.0, 0.1, 0.2, 0.3, 0.4);
|
||||
fn calc_bias_offset() {
|
||||
let dataset = create_test_dataset();
|
||||
let probability = vec!(0.0, 0.1, 0.2, 0.3, 0.4);
|
||||
let expected = vec!(15.927_477_169_990_633, 15.927_477_169_990_633);
|
||||
expected.iter().enumerate().for_each(|(i, exp)| {
|
||||
let F = super::calc_window_F(i, &dataset, &probability);
|
||||
assert_delta!(exp, F, 0.000_000_1);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn perform_wham_iteration() {
|
||||
let dataset = create_test_dataset();
|
||||
let prev_F = vec![1.0; dataset.num_windows];
|
||||
let mut F = vec![f64::NAN; dataset.num_windows];
|
||||
let mut P = vec![f64::NAN; dataset.num_bins];
|
||||
super::perform_wham_iteration(&dataset, &prev_F, &mut F, &mut P);
|
||||
#[test]
|
||||
fn perform_wham_iteration() {
|
||||
let dataset = create_test_dataset();
|
||||
let prev_F = vec![1.0; dataset.num_windows];
|
||||
let mut F = vec![f64::NAN; dataset.num_windows];
|
||||
let mut P = vec![f64::NAN; dataset.num_bins];
|
||||
super::perform_wham_iteration(&dataset, &prev_F, &mut F, &mut P);
|
||||
let expected_F = vec!(1.0, 1.0);
|
||||
let expected_P = vec!(0.0, 0.082_529_668_703_131_6, 40.923_558_470_974_93,
|
||||
let expected_P = vec!(0.0, 0.082_529_668_703_131_6, 40.923_558_470_974_93,
|
||||
124_226.700_033_77, 2_308_526_035.528_374_7);
|
||||
for bin in 0..dataset.num_bins {
|
||||
assert_delta!(expected_P[bin], P[bin], 0.01)
|
||||
}
|
||||
for window in 0..dataset.num_windows {
|
||||
assert_delta!(expected_F[window], F[window], 0.01)
|
||||
}
|
||||
|
||||
}
|
||||
for bin in 0..dataset.num_bins {
|
||||
assert_delta!(expected_P[bin], P[bin], 0.01)
|
||||
}
|
||||
for window in 0..dataset.num_windows {
|
||||
assert_delta!(expected_F[window], F[window], 0.01)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
67
src/main.rs
67
src/main.rs
@@ -2,7 +2,10 @@ extern crate wham;
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
extern crate rand;
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
|
||||
use rand::prelude::*;
|
||||
use clap::App;
|
||||
use wham::Config;
|
||||
use wham::errors::*;
|
||||
@@ -10,20 +13,20 @@ use std::process;
|
||||
|
||||
// Parse command line arguments into a Config struct
|
||||
fn cli() -> Result<Config> {
|
||||
let yaml = load_yaml!("cli.yml");
|
||||
let matches = App::from_yaml(yaml).get_matches();
|
||||
let metadata_file = matches.value_of("metadata").unwrap().to_string();
|
||||
let verbose: bool = matches.is_present("verbose");
|
||||
let temperature: f64 = matches.value_of("temperature").unwrap().parse()
|
||||
.chain_err(|| "Cannot read temperature.")?;
|
||||
let tolerance: f64 = matches.value_of("tolerance").unwrap_or("0.000001").parse()
|
||||
.chain_err(|| "Cannot read tolerance.")?;
|
||||
let max_iterations: usize = matches.value_of("iterations").unwrap_or("100000").parse()
|
||||
.chain_err(|| "Cannot parse iterations.")?;
|
||||
let output = matches.value_of("output").unwrap_or("wham.out").to_string();
|
||||
let yaml = load_yaml!("cli.yml");
|
||||
let matches = App::from_yaml(yaml).get_matches();
|
||||
let metadata_file = matches.value_of("metadata").unwrap().to_string();
|
||||
let verbose: bool = matches.is_present("verbose");
|
||||
let temperature: f64 = matches.value_of("temperature").unwrap().parse()
|
||||
.chain_err(|| "Cannot read temperature.")?;
|
||||
let tolerance: f64 = matches.value_of("tolerance").unwrap_or("0.000001").parse()
|
||||
.chain_err(|| "Cannot read tolerance.")?;
|
||||
let max_iterations: usize = matches.value_of("iterations").unwrap_or("100000").parse()
|
||||
.chain_err(|| "Cannot parse iterations.")?;
|
||||
let output = matches.value_of("output").unwrap_or("wham.out").to_string();
|
||||
let cyclic: bool = matches.is_present("cyclic");
|
||||
|
||||
let hist_min: Vec<f64> = matches.value_of("min_hist").unwrap()
|
||||
let hist_min: Vec<f64> = matches.value_of("min_hist").unwrap()
|
||||
.split(',').map(|x| {
|
||||
if x.to_ascii_lowercase() == "pi" {
|
||||
std::f64::consts::PI
|
||||
@@ -33,7 +36,7 @@ fn cli() -> Result<Config> {
|
||||
x.parse().unwrap()
|
||||
}
|
||||
}).collect();
|
||||
let hist_max: Vec<f64> = matches.value_of("max_hist").unwrap()
|
||||
let hist_max: Vec<f64> = matches.value_of("max_hist").unwrap()
|
||||
.split(',').map(|x| {
|
||||
if x.to_ascii_lowercase() == "pi" {
|
||||
std::f64::consts::PI
|
||||
@@ -43,13 +46,12 @@ fn cli() -> Result<Config> {
|
||||
x.parse().unwrap()
|
||||
}
|
||||
}).collect();
|
||||
let num_bins: Vec<usize> = matches.value_of("bins").unwrap()
|
||||
let num_bins: Vec<usize> = matches.value_of("bins").unwrap()
|
||||
.split(',').map(|x| { x.parse().unwrap() }).collect();
|
||||
let bootstrap: usize = matches.value_of("bootstrap").unwrap_or("0").parse()
|
||||
.chain_err(|| "Cannot parse bootstrap iteration.")?;
|
||||
let bootstrap: usize = matches.value_of("bootstrap").unwrap_or("0").parse()
|
||||
.chain_err(|| "Cannot parse bootstrap iteration.")?;
|
||||
let bootstrap_seed: u64 = matches.value_of("bootstrap_seed")
|
||||
.unwrap_or({
|
||||
use rand::Rng;
|
||||
let mut rng = rand::thread_rng();
|
||||
&rng.gen::<u32>().to_string()
|
||||
}).parse()
|
||||
@@ -58,6 +60,8 @@ fn cli() -> Result<Config> {
|
||||
.chain_err(|| "Cannot parse start time.")?;
|
||||
let end: f64 = matches.value_of("end").unwrap_or("1e+20").parse()
|
||||
.chain_err(|| "Cannot parse end time.")?;
|
||||
|
||||
let uncorr: bool = matches.is_present("uncorr");
|
||||
|
||||
if num_bins.len() != hist_max.len() || num_bins.len() != hist_max.len() {
|
||||
eprintln!("Input dimensions do not match (min: {}, max: {}, bins: {})",
|
||||
@@ -66,21 +70,28 @@ fn cli() -> Result<Config> {
|
||||
}
|
||||
|
||||
let dimens = num_bins.len();
|
||||
if matches.is_present("convdt") && (!matches.is_present("start") || !matches.is_present("end")) {
|
||||
bail!("--convdt requires --start and --end to be set.")
|
||||
}
|
||||
let convdt: f64 = matches.value_of("convdt").unwrap_or("0").parse()
|
||||
.chain_err(|| "Cannot parse convdt.")?;
|
||||
|
||||
Ok(wham::Config{metadata_file, hist_min, hist_max, num_bins, dimens,
|
||||
verbose, tolerance, max_iterations, temperature, cyclic, output,
|
||||
bootstrap, bootstrap_seed, start, end})
|
||||
let ignore_empty: bool = matches.is_present("ignore_empty");
|
||||
|
||||
Ok(wham::Config{metadata_file, hist_min, hist_max, num_bins, dimens,
|
||||
verbose, tolerance, max_iterations, temperature, cyclic, output,
|
||||
bootstrap, bootstrap_seed, start, end, uncorr, convdt, ignore_empty})
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
let cfg = cli().expect("Failed to parse CLI.");
|
||||
if let Err(error) = wham::run(&cfg) {
|
||||
eprintln!("Error: {}", error);
|
||||
let cfg = cli().expect("Failed to parse CLI.");
|
||||
if let Err(error) = wham::run(&cfg) {
|
||||
eprintln!("Error: {}", error);
|
||||
|
||||
for e in error.iter().skip(1) {
|
||||
eprintln!("Reason: {}", e)
|
||||
}
|
||||
process::exit(1);
|
||||
}
|
||||
for e in error.iter().skip(1) {
|
||||
eprintln!("Reason: {}", e)
|
||||
}
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
59
src/statistics.rs
Normal file
59
src/statistics.rs
Normal file
@@ -0,0 +1,59 @@
|
||||
pub fn mean(x: &[f64]) -> f64 {
|
||||
x.iter().sum::<f64>() / x.len() as f64
|
||||
}
|
||||
|
||||
pub fn autocov(x: &[f64]) -> f64 {
|
||||
let x_mean = mean(x);
|
||||
|
||||
x.iter().map(|xi| {
|
||||
(xi-x_mean).powi(2)
|
||||
}).sum::<f64>() / x.len() as f64
|
||||
}
|
||||
|
||||
pub fn sd(x: &[f64]) -> f64 {
|
||||
let x_mean = mean(x);
|
||||
let n = x.len() as f64;
|
||||
|
||||
let sum = x.iter().map(|xi| {
|
||||
(xi-x_mean).powi(2)
|
||||
}).sum::<f64>();
|
||||
(1.0/(n-1.0) * sum).sqrt()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use assert_approx_eq::assert_approx_eq;
|
||||
|
||||
// a sine wave
|
||||
fn dataset() -> Vec<f64> {
|
||||
(0..100).map(|i| (i as f64 / 100.0 * std::f64::consts::PI).sin())
|
||||
.collect::<Vec<f64>>()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mean() {
|
||||
let ds = dataset();
|
||||
let expected =0.6366;
|
||||
|
||||
let m = super::mean(&ds);
|
||||
assert_approx_eq!(m, expected, 0.0001);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn autocorr() {
|
||||
let ds = dataset();
|
||||
let expected = 0.094_782;
|
||||
|
||||
let m = super::autocov(&ds);
|
||||
assert_approx_eq!(m, expected, 0.000_001);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sd() {
|
||||
let ds = dataset();
|
||||
let expected = 0.309_418;
|
||||
|
||||
let m = super::sd(&ds);
|
||||
assert_approx_eq!(m, expected, 0.000_001);
|
||||
}
|
||||
}
|
||||
16
tests/cli.rs
16
tests/cli.rs
@@ -108,4 +108,20 @@ mod integration {
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn convdt_needs_start_end() {
|
||||
let output = get_command()
|
||||
.args(&["--bins", "100", "--min", "-3.0", "--max", "3.0", "-T", "300"])
|
||||
.args(&["-f", "tests/data/metadata_unparseable1.dat"])
|
||||
.args(&["-o", "/dev/null"])
|
||||
.args(&["--convdt", "100"])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
let output = String::from_utf8_lossy(&output.stderr);
|
||||
println!("{}", output);
|
||||
assert!(output.to_string().contains(
|
||||
"--convdt requires --start and --end to be set"
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
2501
tests/data/2d_cyclic_reduced.out
Normal file
2501
tests/data/2d_cyclic_reduced.out
Normal file
File diff suppressed because it is too large
Load Diff
500
tests/data/COLVAR_0-10.xvg
Normal file
500
tests/data/COLVAR_0-10.xvg
Normal file
@@ -0,0 +1,500 @@
|
||||
0.020000 -0.377860
|
||||
0.040000 0.010992
|
||||
0.060000 0.123074
|
||||
0.080000 0.108291
|
||||
0.100000 0.261607
|
||||
0.120000 0.185592
|
||||
0.140000 0.398266
|
||||
0.160000 0.461779
|
||||
0.180000 0.105976
|
||||
0.200000 0.214612
|
||||
0.220000 0.239492
|
||||
0.240000 0.320299
|
||||
0.260000 0.344827
|
||||
0.280000 0.223717
|
||||
0.300000 0.445152
|
||||
0.320000 0.487640
|
||||
0.340000 0.568231
|
||||
0.360000 0.264504
|
||||
0.380000 0.156700
|
||||
0.400000 0.339014
|
||||
0.420000 0.007749
|
||||
0.440000 -0.024582
|
||||
0.460000 -0.103746
|
||||
0.480000 -0.238796
|
||||
0.500000 0.267790
|
||||
0.520000 -0.172984
|
||||
0.540000 -0.162007
|
||||
0.560000 -0.022318
|
||||
0.580000 -0.274371
|
||||
0.600000 -0.170447
|
||||
0.620000 -0.464711
|
||||
0.640000 -0.770842
|
||||
0.660000 -0.160143
|
||||
0.680000 -0.475005
|
||||
0.700000 -0.445097
|
||||
0.720000 -0.251824
|
||||
0.740000 -0.399393
|
||||
0.760000 -0.009600
|
||||
0.780000 0.036937
|
||||
0.800000 -0.288376
|
||||
0.820000 0.088705
|
||||
0.840000 0.035215
|
||||
0.860000 0.026541
|
||||
0.880000 0.041992
|
||||
0.900000 -0.221743
|
||||
0.920000 0.340514
|
||||
0.940000 0.290576
|
||||
0.960000 0.425674
|
||||
0.980000 0.417250
|
||||
1.000000 0.511139
|
||||
1.020000 0.754747
|
||||
1.040000 0.559245
|
||||
1.060000 0.278543
|
||||
1.080000 0.290714
|
||||
1.100000 0.350660
|
||||
1.120000 0.265198
|
||||
1.140000 0.136869
|
||||
1.160000 0.122245
|
||||
1.180000 0.298347
|
||||
1.200000 0.442561
|
||||
1.220000 0.318732
|
||||
1.240000 -0.009101
|
||||
1.260000 0.210199
|
||||
1.280000 0.092197
|
||||
1.300000 -0.218855
|
||||
1.320000 -0.258758
|
||||
1.340000 -0.547873
|
||||
1.360000 -0.310370
|
||||
1.380000 -0.162075
|
||||
1.400000 -0.425929
|
||||
1.420000 -0.138428
|
||||
1.440000 -0.157315
|
||||
1.460000 -0.141138
|
||||
1.480000 -0.127917
|
||||
1.500000 -0.245431
|
||||
1.520000 -0.346983
|
||||
1.540000 -0.165304
|
||||
1.560000 -0.503931
|
||||
1.580000 -0.515063
|
||||
1.600000 -0.155765
|
||||
1.620000 -0.054631
|
||||
1.640000 0.208200
|
||||
1.660000 0.237158
|
||||
1.680000 0.227077
|
||||
1.700000 0.358599
|
||||
1.720000 0.361749
|
||||
1.740000 0.170592
|
||||
1.760000 0.248700
|
||||
1.780000 0.256466
|
||||
1.800000 0.342915
|
||||
1.820000 0.169221
|
||||
1.840000 0.339560
|
||||
1.860000 0.205654
|
||||
1.880000 0.537767
|
||||
1.900000 0.402014
|
||||
1.920000 0.391279
|
||||
1.940000 0.315378
|
||||
1.960000 0.149920
|
||||
1.980000 0.280272
|
||||
2.000000 0.127339
|
||||
2.020000 -0.111932
|
||||
2.040000 0.259792
|
||||
2.060000 -0.041852
|
||||
2.080000 0.153340
|
||||
2.100000 0.166558
|
||||
2.120000 -0.227151
|
||||
2.140000 0.170747
|
||||
2.160000 -0.168786
|
||||
2.180000 -0.309401
|
||||
2.200000 -0.207106
|
||||
2.220000 -0.595975
|
||||
2.240000 -0.380839
|
||||
2.260000 -0.384326
|
||||
2.280000 -0.595164
|
||||
2.300000 -0.115474
|
||||
2.320000 -0.194623
|
||||
2.340000 -0.165108
|
||||
2.360000 -0.079131
|
||||
2.380000 -0.248973
|
||||
2.400000 -0.141384
|
||||
2.420000 0.067492
|
||||
2.440000 -0.167260
|
||||
2.460000 0.069070
|
||||
2.480000 0.109517
|
||||
2.500000 0.275638
|
||||
2.520000 0.409559
|
||||
2.540000 0.407971
|
||||
2.560000 0.480279
|
||||
2.580000 0.612092
|
||||
2.600000 0.678006
|
||||
2.620000 0.390398
|
||||
2.640000 0.480483
|
||||
2.660000 0.382538
|
||||
2.680000 0.351606
|
||||
2.700000 0.242267
|
||||
2.720000 0.124043
|
||||
2.740000 0.006109
|
||||
2.760000 0.224920
|
||||
2.780000 0.103645
|
||||
2.800000 0.136471
|
||||
2.820000 0.047265
|
||||
2.840000 0.072428
|
||||
2.860000 0.083309
|
||||
2.880000 -0.272198
|
||||
2.900000 -0.255573
|
||||
2.920000 -0.152599
|
||||
2.940000 -0.291048
|
||||
2.960000 -0.198565
|
||||
2.980000 -0.269126
|
||||
3.000000 -0.476225
|
||||
3.020000 -0.155645
|
||||
3.040000 -0.280627
|
||||
3.060000 -0.127538
|
||||
3.080000 0.012533
|
||||
3.100000 -0.179725
|
||||
3.120000 -0.216130
|
||||
3.140000 -0.207261
|
||||
3.160000 -0.551407
|
||||
3.180000 0.039334
|
||||
3.200000 -0.009344
|
||||
3.220000 0.013060
|
||||
3.240000 0.273527
|
||||
3.260000 0.109360
|
||||
3.280000 0.421753
|
||||
3.300000 0.241420
|
||||
3.320000 0.201920
|
||||
3.340000 0.357590
|
||||
3.360000 0.289825
|
||||
3.380000 0.040550
|
||||
3.400000 0.345033
|
||||
3.420000 0.109547
|
||||
3.440000 0.557827
|
||||
3.460000 0.495151
|
||||
3.480000 0.382503
|
||||
3.500000 0.311630
|
||||
3.520000 0.402886
|
||||
3.540000 0.145753
|
||||
3.560000 0.053371
|
||||
3.580000 -0.099518
|
||||
3.600000 -0.217586
|
||||
3.620000 -0.078479
|
||||
3.640000 -0.215597
|
||||
3.660000 -0.102704
|
||||
3.680000 -0.318363
|
||||
3.700000 -0.113242
|
||||
3.720000 -0.076240
|
||||
3.740000 -0.188385
|
||||
3.760000 -0.237573
|
||||
3.780000 -0.225944
|
||||
3.800000 -0.366487
|
||||
3.820000 -0.335452
|
||||
3.840000 -0.318478
|
||||
3.860000 -0.352154
|
||||
3.880000 -0.235007
|
||||
3.900000 0.120242
|
||||
3.920000 -0.198549
|
||||
3.940000 0.079292
|
||||
3.960000 0.211743
|
||||
3.980000 0.180080
|
||||
4.000000 0.214707
|
||||
4.020000 0.021381
|
||||
4.040000 0.081417
|
||||
4.060000 0.114621
|
||||
4.080000 0.011734
|
||||
4.100000 -0.003705
|
||||
4.120000 0.051130
|
||||
4.140000 0.121488
|
||||
4.160000 0.340722
|
||||
4.180000 0.252438
|
||||
4.200000 0.439041
|
||||
4.220000 0.405294
|
||||
4.240000 0.475172
|
||||
4.260000 0.211356
|
||||
4.280000 0.320336
|
||||
4.300000 0.245725
|
||||
4.320000 0.200433
|
||||
4.340000 0.127897
|
||||
4.360000 0.164240
|
||||
4.380000 0.030642
|
||||
4.400000 0.204649
|
||||
4.420000 -0.031684
|
||||
4.440000 -0.136474
|
||||
4.460000 0.166935
|
||||
4.480000 -0.205537
|
||||
4.500000 0.020623
|
||||
4.520000 -0.141182
|
||||
4.540000 -0.006324
|
||||
4.560000 -0.120097
|
||||
4.580000 -0.141139
|
||||
4.600000 -0.023482
|
||||
4.620000 -0.263421
|
||||
4.640000 -0.309596
|
||||
4.660000 -0.053286
|
||||
4.680000 -0.311061
|
||||
4.700000 -0.197194
|
||||
4.720000 -0.004616
|
||||
4.740000 -0.197131
|
||||
4.760000 0.040260
|
||||
4.780000 -0.147501
|
||||
4.800000 -0.232280
|
||||
4.820000 -0.080091
|
||||
4.840000 -0.025872
|
||||
4.860000 0.069618
|
||||
4.880000 0.132024
|
||||
4.900000 0.109382
|
||||
4.920000 0.317044
|
||||
4.940000 0.238353
|
||||
4.960000 0.391818
|
||||
4.980000 0.352735
|
||||
5.000000 0.346928
|
||||
5.020000 0.559155
|
||||
5.040000 0.324917
|
||||
5.060000 0.384628
|
||||
5.080000 0.437213
|
||||
5.100000 0.500261
|
||||
5.120000 0.524957
|
||||
5.140000 0.318692
|
||||
5.160000 0.407006
|
||||
5.180000 0.386429
|
||||
5.200000 0.121732
|
||||
5.220000 0.103876
|
||||
5.240000 -0.007759
|
||||
5.260000 -0.228426
|
||||
5.280000 0.091557
|
||||
5.300000 -0.141686
|
||||
5.320000 -0.175769
|
||||
5.340000 0.056234
|
||||
5.360000 -0.139847
|
||||
5.380000 -0.248525
|
||||
5.400000 -0.405083
|
||||
5.420000 -0.543086
|
||||
5.440000 -0.605228
|
||||
5.460000 -0.453772
|
||||
5.480000 -0.632332
|
||||
5.500000 -0.278857
|
||||
5.520000 -0.125809
|
||||
5.540000 -0.307619
|
||||
5.560000 -0.156702
|
||||
5.580000 -0.225417
|
||||
5.600000 -0.103164
|
||||
5.620000 -0.179194
|
||||
5.640000 -0.127734
|
||||
5.660000 -0.188341
|
||||
5.680000 0.143537
|
||||
5.700000 0.047410
|
||||
5.720000 0.233912
|
||||
5.740000 0.342515
|
||||
5.760000 0.480074
|
||||
5.780000 0.526478
|
||||
5.800000 0.599988
|
||||
5.820000 0.428251
|
||||
5.840000 0.408720
|
||||
5.860000 0.501119
|
||||
5.880000 0.229850
|
||||
5.900000 0.255165
|
||||
5.920000 0.084974
|
||||
5.940000 0.230521
|
||||
5.960000 0.289550
|
||||
5.980000 0.387046
|
||||
6.000000 0.244289
|
||||
6.020000 0.402885
|
||||
6.040000 0.273234
|
||||
6.060000 0.239922
|
||||
6.080000 -0.061710
|
||||
6.100000 -0.188653
|
||||
6.120000 -0.176610
|
||||
6.140000 -0.539426
|
||||
6.160000 -0.292322
|
||||
6.180000 -0.368200
|
||||
6.200000 -0.442046
|
||||
6.220000 -0.086956
|
||||
6.240000 -0.237524
|
||||
6.260000 -0.109149
|
||||
6.280000 0.114621
|
||||
6.300000 -0.321428
|
||||
6.320000 -0.323525
|
||||
6.340000 -0.451779
|
||||
6.360000 -0.619271
|
||||
6.380000 -0.210074
|
||||
6.400000 -0.308296
|
||||
6.420000 -0.096123
|
||||
6.440000 0.200226
|
||||
6.460000 0.195091
|
||||
6.480000 0.438811
|
||||
6.500000 0.317047
|
||||
6.520000 0.432486
|
||||
6.540000 0.375387
|
||||
6.560000 0.302796
|
||||
6.580000 0.173397
|
||||
6.600000 0.314706
|
||||
6.620000 0.329726
|
||||
6.640000 0.499638
|
||||
6.660000 0.390596
|
||||
6.680000 0.531012
|
||||
6.700000 0.648674
|
||||
6.720000 0.504828
|
||||
6.740000 0.506630
|
||||
6.760000 0.264208
|
||||
6.780000 0.171029
|
||||
6.800000 -0.042753
|
||||
6.820000 -0.232043
|
||||
6.840000 -0.121052
|
||||
6.860000 -0.080382
|
||||
6.880000 -0.214688
|
||||
6.900000 -0.029242
|
||||
6.920000 -0.100849
|
||||
6.940000 -0.254431
|
||||
6.960000 -0.294761
|
||||
6.980000 -0.387433
|
||||
7.000000 -0.435287
|
||||
7.020000 -0.392397
|
||||
7.040000 -0.361231
|
||||
7.060000 -0.314569
|
||||
7.080000 -0.418825
|
||||
7.100000 -0.446802
|
||||
7.120000 -0.107055
|
||||
7.140000 -0.062352
|
||||
7.160000 0.048612
|
||||
7.180000 0.090056
|
||||
7.200000 0.026421
|
||||
7.220000 0.133539
|
||||
7.240000 0.015399
|
||||
7.260000 0.169799
|
||||
7.280000 0.188015
|
||||
7.300000 0.186057
|
||||
7.320000 0.267611
|
||||
7.340000 0.346012
|
||||
7.360000 0.462420
|
||||
7.380000 0.600556
|
||||
7.400000 0.557739
|
||||
7.420000 0.432258
|
||||
7.440000 0.377746
|
||||
7.460000 0.193769
|
||||
7.480000 0.222955
|
||||
7.500000 0.090057
|
||||
7.520000 0.147336
|
||||
7.540000 0.166292
|
||||
7.560000 0.100436
|
||||
7.580000 -0.021099
|
||||
7.600000 -0.068353
|
||||
7.620000 0.019654
|
||||
7.640000 -0.089638
|
||||
7.660000 -0.043250
|
||||
7.680000 -0.303386
|
||||
7.700000 -0.370787
|
||||
7.720000 -0.534350
|
||||
7.740000 -0.506331
|
||||
7.760000 -0.465337
|
||||
7.780000 -0.299286
|
||||
7.800000 -0.128983
|
||||
7.820000 -0.155927
|
||||
7.840000 -0.185521
|
||||
7.860000 -0.254707
|
||||
7.880000 -0.052327
|
||||
7.900000 -0.195514
|
||||
7.920000 -0.097241
|
||||
7.940000 -0.173111
|
||||
7.960000 -0.146022
|
||||
7.980000 -0.002634
|
||||
8.000000 0.090475
|
||||
8.020000 0.224838
|
||||
8.040000 0.338389
|
||||
8.060000 0.324804
|
||||
8.080000 0.315508
|
||||
8.100000 0.285864
|
||||
8.120000 0.089370
|
||||
8.140000 0.378119
|
||||
8.160000 0.093042
|
||||
8.180000 0.326371
|
||||
8.200000 0.214992
|
||||
8.220000 0.272968
|
||||
8.240000 0.466140
|
||||
8.260000 0.441360
|
||||
8.280000 0.463138
|
||||
8.300000 0.476466
|
||||
8.320000 0.264170
|
||||
8.340000 0.169713
|
||||
8.360000 -0.065215
|
||||
8.380000 -0.075488
|
||||
8.400000 0.042980
|
||||
8.420000 -0.149045
|
||||
8.440000 0.047137
|
||||
8.460000 -0.214226
|
||||
8.480000 -0.051177
|
||||
8.500000 -0.084061
|
||||
8.520000 -0.126147
|
||||
8.540000 -0.199647
|
||||
8.560000 -0.200450
|
||||
8.580000 -0.342299
|
||||
8.600000 -0.478008
|
||||
8.620000 -0.394154
|
||||
8.640000 -0.339514
|
||||
8.660000 -0.084231
|
||||
8.680000 -0.047599
|
||||
8.700000 -0.043127
|
||||
8.720000 -0.050035
|
||||
8.740000 -0.000872
|
||||
8.760000 0.042464
|
||||
8.780000 0.050395
|
||||
8.800000 0.046709
|
||||
8.820000 0.210556
|
||||
8.840000 0.194481
|
||||
8.860000 0.211542
|
||||
8.880000 0.241095
|
||||
8.900000 0.318334
|
||||
8.920000 0.492715
|
||||
8.940000 0.420409
|
||||
8.960000 0.422387
|
||||
8.980000 0.259892
|
||||
9.000000 0.266956
|
||||
9.020000 0.244336
|
||||
9.040000 0.175098
|
||||
9.060000 0.211758
|
||||
9.080000 0.213090
|
||||
9.100000 0.118259
|
||||
9.120000 0.131022
|
||||
9.140000 0.061728
|
||||
9.160000 0.036211
|
||||
9.180000 -0.023149
|
||||
9.200000 -0.126204
|
||||
9.220000 -0.317746
|
||||
9.240000 -0.504112
|
||||
9.260000 -0.432455
|
||||
9.280000 -0.499697
|
||||
9.300000 -0.249082
|
||||
9.320000 -0.307040
|
||||
9.340000 -0.226435
|
||||
9.360000 -0.417869
|
||||
9.380000 -0.249587
|
||||
9.400000 -0.240881
|
||||
9.420000 -0.210606
|
||||
9.440000 -0.167904
|
||||
9.460000 -0.191761
|
||||
9.480000 -0.153305
|
||||
9.500000 -0.129567
|
||||
9.520000 -0.129675
|
||||
9.540000 0.212965
|
||||
9.560000 0.403723
|
||||
9.580000 0.391514
|
||||
9.600000 0.367988
|
||||
9.620000 0.335965
|
||||
9.640000 0.511338
|
||||
9.660000 0.267671
|
||||
9.680000 0.260535
|
||||
9.700000 0.240616
|
||||
9.720000 0.292980
|
||||
9.740000 0.365138
|
||||
9.760000 0.289925
|
||||
9.780000 0.329946
|
||||
9.800000 0.448412
|
||||
9.820000 0.470235
|
||||
9.840000 0.311949
|
||||
9.860000 0.052864
|
||||
9.880000 0.122768
|
||||
9.900000 0.012715
|
||||
9.920000 -0.122779
|
||||
9.940000 -0.172054
|
||||
9.960000 -0.322282
|
||||
9.980000 -0.102970
|
||||
10.000000 -0.056880
|
||||
100
tests/data/COLVAR_0-2.xvg
Normal file
100
tests/data/COLVAR_0-2.xvg
Normal file
@@ -0,0 +1,100 @@
|
||||
0.020000 -0.377860
|
||||
0.040000 0.010992
|
||||
0.060000 0.123074
|
||||
0.080000 0.108291
|
||||
0.100000 0.261607
|
||||
0.120000 0.185592
|
||||
0.140000 0.398266
|
||||
0.160000 0.461779
|
||||
0.180000 0.105976
|
||||
0.200000 0.214612
|
||||
0.220000 0.239492
|
||||
0.240000 0.320299
|
||||
0.260000 0.344827
|
||||
0.280000 0.223717
|
||||
0.300000 0.445152
|
||||
0.320000 0.487640
|
||||
0.340000 0.568231
|
||||
0.360000 0.264504
|
||||
0.380000 0.156700
|
||||
0.400000 0.339014
|
||||
0.420000 0.007749
|
||||
0.440000 -0.024582
|
||||
0.460000 -0.103746
|
||||
0.480000 -0.238796
|
||||
0.500000 0.267790
|
||||
0.520000 -0.172984
|
||||
0.540000 -0.162007
|
||||
0.560000 -0.022318
|
||||
0.580000 -0.274371
|
||||
0.600000 -0.170447
|
||||
0.620000 -0.464711
|
||||
0.640000 -0.770842
|
||||
0.660000 -0.160143
|
||||
0.680000 -0.475005
|
||||
0.700000 -0.445097
|
||||
0.720000 -0.251824
|
||||
0.740000 -0.399393
|
||||
0.760000 -0.009600
|
||||
0.780000 0.036937
|
||||
0.800000 -0.288376
|
||||
0.820000 0.088705
|
||||
0.840000 0.035215
|
||||
0.860000 0.026541
|
||||
0.880000 0.041992
|
||||
0.900000 -0.221743
|
||||
0.920000 0.340514
|
||||
0.940000 0.290576
|
||||
0.960000 0.425674
|
||||
0.980000 0.417250
|
||||
1.000000 0.511139
|
||||
1.020000 0.754747
|
||||
1.040000 0.559245
|
||||
1.060000 0.278543
|
||||
1.080000 0.290714
|
||||
1.100000 0.350660
|
||||
1.120000 0.265198
|
||||
1.140000 0.136869
|
||||
1.160000 0.122245
|
||||
1.180000 0.298347
|
||||
1.200000 0.442561
|
||||
1.220000 0.318732
|
||||
1.240000 -0.009101
|
||||
1.260000 0.210199
|
||||
1.280000 0.092197
|
||||
1.300000 -0.218855
|
||||
1.320000 -0.258758
|
||||
1.340000 -0.547873
|
||||
1.360000 -0.310370
|
||||
1.380000 -0.162075
|
||||
1.400000 -0.425929
|
||||
1.420000 -0.138428
|
||||
1.440000 -0.157315
|
||||
1.460000 -0.141138
|
||||
1.480000 -0.127917
|
||||
1.500000 -0.245431
|
||||
1.520000 -0.346983
|
||||
1.540000 -0.165304
|
||||
1.560000 -0.503931
|
||||
1.580000 -0.515063
|
||||
1.600000 -0.155765
|
||||
1.620000 -0.054631
|
||||
1.640000 0.208200
|
||||
1.660000 0.237158
|
||||
1.680000 0.227077
|
||||
1.700000 0.358599
|
||||
1.720000 0.361749
|
||||
1.740000 0.170592
|
||||
1.760000 0.248700
|
||||
1.780000 0.256466
|
||||
1.800000 0.342915
|
||||
1.820000 0.169221
|
||||
1.840000 0.339560
|
||||
1.860000 0.205654
|
||||
1.880000 0.537767
|
||||
1.900000 0.402014
|
||||
1.920000 0.391279
|
||||
1.940000 0.315378
|
||||
1.960000 0.149920
|
||||
1.980000 0.280272
|
||||
2.000000 0.127339
|
||||
250
tests/data/COLVAR_0-5.xvg
Normal file
250
tests/data/COLVAR_0-5.xvg
Normal file
@@ -0,0 +1,250 @@
|
||||
0.020000 -0.377860
|
||||
0.040000 0.010992
|
||||
0.060000 0.123074
|
||||
0.080000 0.108291
|
||||
0.100000 0.261607
|
||||
0.120000 0.185592
|
||||
0.140000 0.398266
|
||||
0.160000 0.461779
|
||||
0.180000 0.105976
|
||||
0.200000 0.214612
|
||||
0.220000 0.239492
|
||||
0.240000 0.320299
|
||||
0.260000 0.344827
|
||||
0.280000 0.223717
|
||||
0.300000 0.445152
|
||||
0.320000 0.487640
|
||||
0.340000 0.568231
|
||||
0.360000 0.264504
|
||||
0.380000 0.156700
|
||||
0.400000 0.339014
|
||||
0.420000 0.007749
|
||||
0.440000 -0.024582
|
||||
0.460000 -0.103746
|
||||
0.480000 -0.238796
|
||||
0.500000 0.267790
|
||||
0.520000 -0.172984
|
||||
0.540000 -0.162007
|
||||
0.560000 -0.022318
|
||||
0.580000 -0.274371
|
||||
0.600000 -0.170447
|
||||
0.620000 -0.464711
|
||||
0.640000 -0.770842
|
||||
0.660000 -0.160143
|
||||
0.680000 -0.475005
|
||||
0.700000 -0.445097
|
||||
0.720000 -0.251824
|
||||
0.740000 -0.399393
|
||||
0.760000 -0.009600
|
||||
0.780000 0.036937
|
||||
0.800000 -0.288376
|
||||
0.820000 0.088705
|
||||
0.840000 0.035215
|
||||
0.860000 0.026541
|
||||
0.880000 0.041992
|
||||
0.900000 -0.221743
|
||||
0.920000 0.340514
|
||||
0.940000 0.290576
|
||||
0.960000 0.425674
|
||||
0.980000 0.417250
|
||||
1.000000 0.511139
|
||||
1.020000 0.754747
|
||||
1.040000 0.559245
|
||||
1.060000 0.278543
|
||||
1.080000 0.290714
|
||||
1.100000 0.350660
|
||||
1.120000 0.265198
|
||||
1.140000 0.136869
|
||||
1.160000 0.122245
|
||||
1.180000 0.298347
|
||||
1.200000 0.442561
|
||||
1.220000 0.318732
|
||||
1.240000 -0.009101
|
||||
1.260000 0.210199
|
||||
1.280000 0.092197
|
||||
1.300000 -0.218855
|
||||
1.320000 -0.258758
|
||||
1.340000 -0.547873
|
||||
1.360000 -0.310370
|
||||
1.380000 -0.162075
|
||||
1.400000 -0.425929
|
||||
1.420000 -0.138428
|
||||
1.440000 -0.157315
|
||||
1.460000 -0.141138
|
||||
1.480000 -0.127917
|
||||
1.500000 -0.245431
|
||||
1.520000 -0.346983
|
||||
1.540000 -0.165304
|
||||
1.560000 -0.503931
|
||||
1.580000 -0.515063
|
||||
1.600000 -0.155765
|
||||
1.620000 -0.054631
|
||||
1.640000 0.208200
|
||||
1.660000 0.237158
|
||||
1.680000 0.227077
|
||||
1.700000 0.358599
|
||||
1.720000 0.361749
|
||||
1.740000 0.170592
|
||||
1.760000 0.248700
|
||||
1.780000 0.256466
|
||||
1.800000 0.342915
|
||||
1.820000 0.169221
|
||||
1.840000 0.339560
|
||||
1.860000 0.205654
|
||||
1.880000 0.537767
|
||||
1.900000 0.402014
|
||||
1.920000 0.391279
|
||||
1.940000 0.315378
|
||||
1.960000 0.149920
|
||||
1.980000 0.280272
|
||||
2.000000 0.127339
|
||||
2.020000 -0.111932
|
||||
2.040000 0.259792
|
||||
2.060000 -0.041852
|
||||
2.080000 0.153340
|
||||
2.100000 0.166558
|
||||
2.120000 -0.227151
|
||||
2.140000 0.170747
|
||||
2.160000 -0.168786
|
||||
2.180000 -0.309401
|
||||
2.200000 -0.207106
|
||||
2.220000 -0.595975
|
||||
2.240000 -0.380839
|
||||
2.260000 -0.384326
|
||||
2.280000 -0.595164
|
||||
2.300000 -0.115474
|
||||
2.320000 -0.194623
|
||||
2.340000 -0.165108
|
||||
2.360000 -0.079131
|
||||
2.380000 -0.248973
|
||||
2.400000 -0.141384
|
||||
2.420000 0.067492
|
||||
2.440000 -0.167260
|
||||
2.460000 0.069070
|
||||
2.480000 0.109517
|
||||
2.500000 0.275638
|
||||
2.520000 0.409559
|
||||
2.540000 0.407971
|
||||
2.560000 0.480279
|
||||
2.580000 0.612092
|
||||
2.600000 0.678006
|
||||
2.620000 0.390398
|
||||
2.640000 0.480483
|
||||
2.660000 0.382538
|
||||
2.680000 0.351606
|
||||
2.700000 0.242267
|
||||
2.720000 0.124043
|
||||
2.740000 0.006109
|
||||
2.760000 0.224920
|
||||
2.780000 0.103645
|
||||
2.800000 0.136471
|
||||
2.820000 0.047265
|
||||
2.840000 0.072428
|
||||
2.860000 0.083309
|
||||
2.880000 -0.272198
|
||||
2.900000 -0.255573
|
||||
2.920000 -0.152599
|
||||
2.940000 -0.291048
|
||||
2.960000 -0.198565
|
||||
2.980000 -0.269126
|
||||
3.000000 -0.476225
|
||||
3.020000 -0.155645
|
||||
3.040000 -0.280627
|
||||
3.060000 -0.127538
|
||||
3.080000 0.012533
|
||||
3.100000 -0.179725
|
||||
3.120000 -0.216130
|
||||
3.140000 -0.207261
|
||||
3.160000 -0.551407
|
||||
3.180000 0.039334
|
||||
3.200000 -0.009344
|
||||
3.220000 0.013060
|
||||
3.240000 0.273527
|
||||
3.260000 0.109360
|
||||
3.280000 0.421753
|
||||
3.300000 0.241420
|
||||
3.320000 0.201920
|
||||
3.340000 0.357590
|
||||
3.360000 0.289825
|
||||
3.380000 0.040550
|
||||
3.400000 0.345033
|
||||
3.420000 0.109547
|
||||
3.440000 0.557827
|
||||
3.460000 0.495151
|
||||
3.480000 0.382503
|
||||
3.500000 0.311630
|
||||
3.520000 0.402886
|
||||
3.540000 0.145753
|
||||
3.560000 0.053371
|
||||
3.580000 -0.099518
|
||||
3.600000 -0.217586
|
||||
3.620000 -0.078479
|
||||
3.640000 -0.215597
|
||||
3.660000 -0.102704
|
||||
3.680000 -0.318363
|
||||
3.700000 -0.113242
|
||||
3.720000 -0.076240
|
||||
3.740000 -0.188385
|
||||
3.760000 -0.237573
|
||||
3.780000 -0.225944
|
||||
3.800000 -0.366487
|
||||
3.820000 -0.335452
|
||||
3.840000 -0.318478
|
||||
3.860000 -0.352154
|
||||
3.880000 -0.235007
|
||||
3.900000 0.120242
|
||||
3.920000 -0.198549
|
||||
3.940000 0.079292
|
||||
3.960000 0.211743
|
||||
3.980000 0.180080
|
||||
4.000000 0.214707
|
||||
4.020000 0.021381
|
||||
4.040000 0.081417
|
||||
4.060000 0.114621
|
||||
4.080000 0.011734
|
||||
4.100000 -0.003705
|
||||
4.120000 0.051130
|
||||
4.140000 0.121488
|
||||
4.160000 0.340722
|
||||
4.180000 0.252438
|
||||
4.200000 0.439041
|
||||
4.220000 0.405294
|
||||
4.240000 0.475172
|
||||
4.260000 0.211356
|
||||
4.280000 0.320336
|
||||
4.300000 0.245725
|
||||
4.320000 0.200433
|
||||
4.340000 0.127897
|
||||
4.360000 0.164240
|
||||
4.380000 0.030642
|
||||
4.400000 0.204649
|
||||
4.420000 -0.031684
|
||||
4.440000 -0.136474
|
||||
4.460000 0.166935
|
||||
4.480000 -0.205537
|
||||
4.500000 0.020623
|
||||
4.520000 -0.141182
|
||||
4.540000 -0.006324
|
||||
4.560000 -0.120097
|
||||
4.580000 -0.141139
|
||||
4.600000 -0.023482
|
||||
4.620000 -0.263421
|
||||
4.640000 -0.309596
|
||||
4.660000 -0.053286
|
||||
4.680000 -0.311061
|
||||
4.700000 -0.197194
|
||||
4.720000 -0.004616
|
||||
4.740000 -0.197131
|
||||
4.760000 0.040260
|
||||
4.780000 -0.147501
|
||||
4.800000 -0.232280
|
||||
4.820000 -0.080091
|
||||
4.840000 -0.025872
|
||||
4.860000 0.069618
|
||||
4.880000 0.132024
|
||||
4.900000 0.109382
|
||||
4.920000 0.317044
|
||||
4.940000 0.238353
|
||||
4.960000 0.391818
|
||||
4.980000 0.352735
|
||||
5.000000 0.346928
|
||||
250
tests/data/COLVAR_2-7.xvg
Normal file
250
tests/data/COLVAR_2-7.xvg
Normal file
@@ -0,0 +1,250 @@
|
||||
2.020000 -0.111932
|
||||
2.040000 0.259792
|
||||
2.060000 -0.041852
|
||||
2.080000 0.153340
|
||||
2.100000 0.166558
|
||||
2.120000 -0.227151
|
||||
2.140000 0.170747
|
||||
2.160000 -0.168786
|
||||
2.180000 -0.309401
|
||||
2.200000 -0.207106
|
||||
2.220000 -0.595975
|
||||
2.240000 -0.380839
|
||||
2.260000 -0.384326
|
||||
2.280000 -0.595164
|
||||
2.300000 -0.115474
|
||||
2.320000 -0.194623
|
||||
2.340000 -0.165108
|
||||
2.360000 -0.079131
|
||||
2.380000 -0.248973
|
||||
2.400000 -0.141384
|
||||
2.420000 0.067492
|
||||
2.440000 -0.167260
|
||||
2.460000 0.069070
|
||||
2.480000 0.109517
|
||||
2.500000 0.275638
|
||||
2.520000 0.409559
|
||||
2.540000 0.407971
|
||||
2.560000 0.480279
|
||||
2.580000 0.612092
|
||||
2.600000 0.678006
|
||||
2.620000 0.390398
|
||||
2.640000 0.480483
|
||||
2.660000 0.382538
|
||||
2.680000 0.351606
|
||||
2.700000 0.242267
|
||||
2.720000 0.124043
|
||||
2.740000 0.006109
|
||||
2.760000 0.224920
|
||||
2.780000 0.103645
|
||||
2.800000 0.136471
|
||||
2.820000 0.047265
|
||||
2.840000 0.072428
|
||||
2.860000 0.083309
|
||||
2.880000 -0.272198
|
||||
2.900000 -0.255573
|
||||
2.920000 -0.152599
|
||||
2.940000 -0.291048
|
||||
2.960000 -0.198565
|
||||
2.980000 -0.269126
|
||||
3.000000 -0.476225
|
||||
3.020000 -0.155645
|
||||
3.040000 -0.280627
|
||||
3.060000 -0.127538
|
||||
3.080000 0.012533
|
||||
3.100000 -0.179725
|
||||
3.120000 -0.216130
|
||||
3.140000 -0.207261
|
||||
3.160000 -0.551407
|
||||
3.180000 0.039334
|
||||
3.200000 -0.009344
|
||||
3.220000 0.013060
|
||||
3.240000 0.273527
|
||||
3.260000 0.109360
|
||||
3.280000 0.421753
|
||||
3.300000 0.241420
|
||||
3.320000 0.201920
|
||||
3.340000 0.357590
|
||||
3.360000 0.289825
|
||||
3.380000 0.040550
|
||||
3.400000 0.345033
|
||||
3.420000 0.109547
|
||||
3.440000 0.557827
|
||||
3.460000 0.495151
|
||||
3.480000 0.382503
|
||||
3.500000 0.311630
|
||||
3.520000 0.402886
|
||||
3.540000 0.145753
|
||||
3.560000 0.053371
|
||||
3.580000 -0.099518
|
||||
3.600000 -0.217586
|
||||
3.620000 -0.078479
|
||||
3.640000 -0.215597
|
||||
3.660000 -0.102704
|
||||
3.680000 -0.318363
|
||||
3.700000 -0.113242
|
||||
3.720000 -0.076240
|
||||
3.740000 -0.188385
|
||||
3.760000 -0.237573
|
||||
3.780000 -0.225944
|
||||
3.800000 -0.366487
|
||||
3.820000 -0.335452
|
||||
3.840000 -0.318478
|
||||
3.860000 -0.352154
|
||||
3.880000 -0.235007
|
||||
3.900000 0.120242
|
||||
3.920000 -0.198549
|
||||
3.940000 0.079292
|
||||
3.960000 0.211743
|
||||
3.980000 0.180080
|
||||
4.000000 0.214707
|
||||
4.020000 0.021381
|
||||
4.040000 0.081417
|
||||
4.060000 0.114621
|
||||
4.080000 0.011734
|
||||
4.100000 -0.003705
|
||||
4.120000 0.051130
|
||||
4.140000 0.121488
|
||||
4.160000 0.340722
|
||||
4.180000 0.252438
|
||||
4.200000 0.439041
|
||||
4.220000 0.405294
|
||||
4.240000 0.475172
|
||||
4.260000 0.211356
|
||||
4.280000 0.320336
|
||||
4.300000 0.245725
|
||||
4.320000 0.200433
|
||||
4.340000 0.127897
|
||||
4.360000 0.164240
|
||||
4.380000 0.030642
|
||||
4.400000 0.204649
|
||||
4.420000 -0.031684
|
||||
4.440000 -0.136474
|
||||
4.460000 0.166935
|
||||
4.480000 -0.205537
|
||||
4.500000 0.020623
|
||||
4.520000 -0.141182
|
||||
4.540000 -0.006324
|
||||
4.560000 -0.120097
|
||||
4.580000 -0.141139
|
||||
4.600000 -0.023482
|
||||
4.620000 -0.263421
|
||||
4.640000 -0.309596
|
||||
4.660000 -0.053286
|
||||
4.680000 -0.311061
|
||||
4.700000 -0.197194
|
||||
4.720000 -0.004616
|
||||
4.740000 -0.197131
|
||||
4.760000 0.040260
|
||||
4.780000 -0.147501
|
||||
4.800000 -0.232280
|
||||
4.820000 -0.080091
|
||||
4.840000 -0.025872
|
||||
4.860000 0.069618
|
||||
4.880000 0.132024
|
||||
4.900000 0.109382
|
||||
4.920000 0.317044
|
||||
4.940000 0.238353
|
||||
4.960000 0.391818
|
||||
4.980000 0.352735
|
||||
5.000000 0.346928
|
||||
5.020000 0.559155
|
||||
5.040000 0.324917
|
||||
5.060000 0.384628
|
||||
5.080000 0.437213
|
||||
5.100000 0.500261
|
||||
5.120000 0.524957
|
||||
5.140000 0.318692
|
||||
5.160000 0.407006
|
||||
5.180000 0.386429
|
||||
5.200000 0.121732
|
||||
5.220000 0.103876
|
||||
5.240000 -0.007759
|
||||
5.260000 -0.228426
|
||||
5.280000 0.091557
|
||||
5.300000 -0.141686
|
||||
5.320000 -0.175769
|
||||
5.340000 0.056234
|
||||
5.360000 -0.139847
|
||||
5.380000 -0.248525
|
||||
5.400000 -0.405083
|
||||
5.420000 -0.543086
|
||||
5.440000 -0.605228
|
||||
5.460000 -0.453772
|
||||
5.480000 -0.632332
|
||||
5.500000 -0.278857
|
||||
5.520000 -0.125809
|
||||
5.540000 -0.307619
|
||||
5.560000 -0.156702
|
||||
5.580000 -0.225417
|
||||
5.600000 -0.103164
|
||||
5.620000 -0.179194
|
||||
5.640000 -0.127734
|
||||
5.660000 -0.188341
|
||||
5.680000 0.143537
|
||||
5.700000 0.047410
|
||||
5.720000 0.233912
|
||||
5.740000 0.342515
|
||||
5.760000 0.480074
|
||||
5.780000 0.526478
|
||||
5.800000 0.599988
|
||||
5.820000 0.428251
|
||||
5.840000 0.408720
|
||||
5.860000 0.501119
|
||||
5.880000 0.229850
|
||||
5.900000 0.255165
|
||||
5.920000 0.084974
|
||||
5.940000 0.230521
|
||||
5.960000 0.289550
|
||||
5.980000 0.387046
|
||||
6.000000 0.244289
|
||||
6.020000 0.402885
|
||||
6.040000 0.273234
|
||||
6.060000 0.239922
|
||||
6.080000 -0.061710
|
||||
6.100000 -0.188653
|
||||
6.120000 -0.176610
|
||||
6.140000 -0.539426
|
||||
6.160000 -0.292322
|
||||
6.180000 -0.368200
|
||||
6.200000 -0.442046
|
||||
6.220000 -0.086956
|
||||
6.240000 -0.237524
|
||||
6.260000 -0.109149
|
||||
6.280000 0.114621
|
||||
6.300000 -0.321428
|
||||
6.320000 -0.323525
|
||||
6.340000 -0.451779
|
||||
6.360000 -0.619271
|
||||
6.380000 -0.210074
|
||||
6.400000 -0.308296
|
||||
6.420000 -0.096123
|
||||
6.440000 0.200226
|
||||
6.460000 0.195091
|
||||
6.480000 0.438811
|
||||
6.500000 0.317047
|
||||
6.520000 0.432486
|
||||
6.540000 0.375387
|
||||
6.560000 0.302796
|
||||
6.580000 0.173397
|
||||
6.600000 0.314706
|
||||
6.620000 0.329726
|
||||
6.640000 0.499638
|
||||
6.660000 0.390596
|
||||
6.680000 0.531012
|
||||
6.700000 0.648674
|
||||
6.720000 0.504828
|
||||
6.740000 0.506630
|
||||
6.760000 0.264208
|
||||
6.780000 0.171029
|
||||
6.800000 -0.042753
|
||||
6.820000 -0.232043
|
||||
6.840000 -0.121052
|
||||
6.860000 -0.080382
|
||||
6.880000 -0.214688
|
||||
6.900000 -0.029242
|
||||
6.920000 -0.100849
|
||||
6.940000 -0.254431
|
||||
6.960000 -0.294761
|
||||
6.980000 -0.387433
|
||||
7.000000 -0.435287
|
||||
250
tests/data/COLVAR_5-10.xvg
Normal file
250
tests/data/COLVAR_5-10.xvg
Normal file
@@ -0,0 +1,250 @@
|
||||
5.020000 0.559155
|
||||
5.040000 0.324917
|
||||
5.060000 0.384628
|
||||
5.080000 0.437213
|
||||
5.100000 0.500261
|
||||
5.120000 0.524957
|
||||
5.140000 0.318692
|
||||
5.160000 0.407006
|
||||
5.180000 0.386429
|
||||
5.200000 0.121732
|
||||
5.220000 0.103876
|
||||
5.240000 -0.007759
|
||||
5.260000 -0.228426
|
||||
5.280000 0.091557
|
||||
5.300000 -0.141686
|
||||
5.320000 -0.175769
|
||||
5.340000 0.056234
|
||||
5.360000 -0.139847
|
||||
5.380000 -0.248525
|
||||
5.400000 -0.405083
|
||||
5.420000 -0.543086
|
||||
5.440000 -0.605228
|
||||
5.460000 -0.453772
|
||||
5.480000 -0.632332
|
||||
5.500000 -0.278857
|
||||
5.520000 -0.125809
|
||||
5.540000 -0.307619
|
||||
5.560000 -0.156702
|
||||
5.580000 -0.225417
|
||||
5.600000 -0.103164
|
||||
5.620000 -0.179194
|
||||
5.640000 -0.127734
|
||||
5.660000 -0.188341
|
||||
5.680000 0.143537
|
||||
5.700000 0.047410
|
||||
5.720000 0.233912
|
||||
5.740000 0.342515
|
||||
5.760000 0.480074
|
||||
5.780000 0.526478
|
||||
5.800000 0.599988
|
||||
5.820000 0.428251
|
||||
5.840000 0.408720
|
||||
5.860000 0.501119
|
||||
5.880000 0.229850
|
||||
5.900000 0.255165
|
||||
5.920000 0.084974
|
||||
5.940000 0.230521
|
||||
5.960000 0.289550
|
||||
5.980000 0.387046
|
||||
6.000000 0.244289
|
||||
6.020000 0.402885
|
||||
6.040000 0.273234
|
||||
6.060000 0.239922
|
||||
6.080000 -0.061710
|
||||
6.100000 -0.188653
|
||||
6.120000 -0.176610
|
||||
6.140000 -0.539426
|
||||
6.160000 -0.292322
|
||||
6.180000 -0.368200
|
||||
6.200000 -0.442046
|
||||
6.220000 -0.086956
|
||||
6.240000 -0.237524
|
||||
6.260000 -0.109149
|
||||
6.280000 0.114621
|
||||
6.300000 -0.321428
|
||||
6.320000 -0.323525
|
||||
6.340000 -0.451779
|
||||
6.360000 -0.619271
|
||||
6.380000 -0.210074
|
||||
6.400000 -0.308296
|
||||
6.420000 -0.096123
|
||||
6.440000 0.200226
|
||||
6.460000 0.195091
|
||||
6.480000 0.438811
|
||||
6.500000 0.317047
|
||||
6.520000 0.432486
|
||||
6.540000 0.375387
|
||||
6.560000 0.302796
|
||||
6.580000 0.173397
|
||||
6.600000 0.314706
|
||||
6.620000 0.329726
|
||||
6.640000 0.499638
|
||||
6.660000 0.390596
|
||||
6.680000 0.531012
|
||||
6.700000 0.648674
|
||||
6.720000 0.504828
|
||||
6.740000 0.506630
|
||||
6.760000 0.264208
|
||||
6.780000 0.171029
|
||||
6.800000 -0.042753
|
||||
6.820000 -0.232043
|
||||
6.840000 -0.121052
|
||||
6.860000 -0.080382
|
||||
6.880000 -0.214688
|
||||
6.900000 -0.029242
|
||||
6.920000 -0.100849
|
||||
6.940000 -0.254431
|
||||
6.960000 -0.294761
|
||||
6.980000 -0.387433
|
||||
7.000000 -0.435287
|
||||
7.020000 -0.392397
|
||||
7.040000 -0.361231
|
||||
7.060000 -0.314569
|
||||
7.080000 -0.418825
|
||||
7.100000 -0.446802
|
||||
7.120000 -0.107055
|
||||
7.140000 -0.062352
|
||||
7.160000 0.048612
|
||||
7.180000 0.090056
|
||||
7.200000 0.026421
|
||||
7.220000 0.133539
|
||||
7.240000 0.015399
|
||||
7.260000 0.169799
|
||||
7.280000 0.188015
|
||||
7.300000 0.186057
|
||||
7.320000 0.267611
|
||||
7.340000 0.346012
|
||||
7.360000 0.462420
|
||||
7.380000 0.600556
|
||||
7.400000 0.557739
|
||||
7.420000 0.432258
|
||||
7.440000 0.377746
|
||||
7.460000 0.193769
|
||||
7.480000 0.222955
|
||||
7.500000 0.090057
|
||||
7.520000 0.147336
|
||||
7.540000 0.166292
|
||||
7.560000 0.100436
|
||||
7.580000 -0.021099
|
||||
7.600000 -0.068353
|
||||
7.620000 0.019654
|
||||
7.640000 -0.089638
|
||||
7.660000 -0.043250
|
||||
7.680000 -0.303386
|
||||
7.700000 -0.370787
|
||||
7.720000 -0.534350
|
||||
7.740000 -0.506331
|
||||
7.760000 -0.465337
|
||||
7.780000 -0.299286
|
||||
7.800000 -0.128983
|
||||
7.820000 -0.155927
|
||||
7.840000 -0.185521
|
||||
7.860000 -0.254707
|
||||
7.880000 -0.052327
|
||||
7.900000 -0.195514
|
||||
7.920000 -0.097241
|
||||
7.940000 -0.173111
|
||||
7.960000 -0.146022
|
||||
7.980000 -0.002634
|
||||
8.000000 0.090475
|
||||
8.020000 0.224838
|
||||
8.040000 0.338389
|
||||
8.060000 0.324804
|
||||
8.080000 0.315508
|
||||
8.100000 0.285864
|
||||
8.120000 0.089370
|
||||
8.140000 0.378119
|
||||
8.160000 0.093042
|
||||
8.180000 0.326371
|
||||
8.200000 0.214992
|
||||
8.220000 0.272968
|
||||
8.240000 0.466140
|
||||
8.260000 0.441360
|
||||
8.280000 0.463138
|
||||
8.300000 0.476466
|
||||
8.320000 0.264170
|
||||
8.340000 0.169713
|
||||
8.360000 -0.065215
|
||||
8.380000 -0.075488
|
||||
8.400000 0.042980
|
||||
8.420000 -0.149045
|
||||
8.440000 0.047137
|
||||
8.460000 -0.214226
|
||||
8.480000 -0.051177
|
||||
8.500000 -0.084061
|
||||
8.520000 -0.126147
|
||||
8.540000 -0.199647
|
||||
8.560000 -0.200450
|
||||
8.580000 -0.342299
|
||||
8.600000 -0.478008
|
||||
8.620000 -0.394154
|
||||
8.640000 -0.339514
|
||||
8.660000 -0.084231
|
||||
8.680000 -0.047599
|
||||
8.700000 -0.043127
|
||||
8.720000 -0.050035
|
||||
8.740000 -0.000872
|
||||
8.760000 0.042464
|
||||
8.780000 0.050395
|
||||
8.800000 0.046709
|
||||
8.820000 0.210556
|
||||
8.840000 0.194481
|
||||
8.860000 0.211542
|
||||
8.880000 0.241095
|
||||
8.900000 0.318334
|
||||
8.920000 0.492715
|
||||
8.940000 0.420409
|
||||
8.960000 0.422387
|
||||
8.980000 0.259892
|
||||
9.000000 0.266956
|
||||
9.020000 0.244336
|
||||
9.040000 0.175098
|
||||
9.060000 0.211758
|
||||
9.080000 0.213090
|
||||
9.100000 0.118259
|
||||
9.120000 0.131022
|
||||
9.140000 0.061728
|
||||
9.160000 0.036211
|
||||
9.180000 -0.023149
|
||||
9.200000 -0.126204
|
||||
9.220000 -0.317746
|
||||
9.240000 -0.504112
|
||||
9.260000 -0.432455
|
||||
9.280000 -0.499697
|
||||
9.300000 -0.249082
|
||||
9.320000 -0.307040
|
||||
9.340000 -0.226435
|
||||
9.360000 -0.417869
|
||||
9.380000 -0.249587
|
||||
9.400000 -0.240881
|
||||
9.420000 -0.210606
|
||||
9.440000 -0.167904
|
||||
9.460000 -0.191761
|
||||
9.480000 -0.153305
|
||||
9.500000 -0.129567
|
||||
9.520000 -0.129675
|
||||
9.540000 0.212965
|
||||
9.560000 0.403723
|
||||
9.580000 0.391514
|
||||
9.600000 0.367988
|
||||
9.620000 0.335965
|
||||
9.640000 0.511338
|
||||
9.660000 0.267671
|
||||
9.680000 0.260535
|
||||
9.700000 0.240616
|
||||
9.720000 0.292980
|
||||
9.740000 0.365138
|
||||
9.760000 0.289925
|
||||
9.780000 0.329946
|
||||
9.800000 0.448412
|
||||
9.820000 0.470235
|
||||
9.840000 0.311949
|
||||
9.860000 0.052864
|
||||
9.880000 0.122768
|
||||
9.900000 0.012715
|
||||
9.920000 -0.122779
|
||||
9.940000 -0.172054
|
||||
9.960000 -0.322282
|
||||
9.980000 -0.102970
|
||||
10.000000 -0.056880
|
||||
150
tests/data/COLVAR_7-10.xvg
Normal file
150
tests/data/COLVAR_7-10.xvg
Normal file
@@ -0,0 +1,150 @@
|
||||
7.020000 -0.392397
|
||||
7.040000 -0.361231
|
||||
7.060000 -0.314569
|
||||
7.080000 -0.418825
|
||||
7.100000 -0.446802
|
||||
7.120000 -0.107055
|
||||
7.140000 -0.062352
|
||||
7.160000 0.048612
|
||||
7.180000 0.090056
|
||||
7.200000 0.026421
|
||||
7.220000 0.133539
|
||||
7.240000 0.015399
|
||||
7.260000 0.169799
|
||||
7.280000 0.188015
|
||||
7.300000 0.186057
|
||||
7.320000 0.267611
|
||||
7.340000 0.346012
|
||||
7.360000 0.462420
|
||||
7.380000 0.600556
|
||||
7.400000 0.557739
|
||||
7.420000 0.432258
|
||||
7.440000 0.377746
|
||||
7.460000 0.193769
|
||||
7.480000 0.222955
|
||||
7.500000 0.090057
|
||||
7.520000 0.147336
|
||||
7.540000 0.166292
|
||||
7.560000 0.100436
|
||||
7.580000 -0.021099
|
||||
7.600000 -0.068353
|
||||
7.620000 0.019654
|
||||
7.640000 -0.089638
|
||||
7.660000 -0.043250
|
||||
7.680000 -0.303386
|
||||
7.700000 -0.370787
|
||||
7.720000 -0.534350
|
||||
7.740000 -0.506331
|
||||
7.760000 -0.465337
|
||||
7.780000 -0.299286
|
||||
7.800000 -0.128983
|
||||
7.820000 -0.155927
|
||||
7.840000 -0.185521
|
||||
7.860000 -0.254707
|
||||
7.880000 -0.052327
|
||||
7.900000 -0.195514
|
||||
7.920000 -0.097241
|
||||
7.940000 -0.173111
|
||||
7.960000 -0.146022
|
||||
7.980000 -0.002634
|
||||
8.000000 0.090475
|
||||
8.020000 0.224838
|
||||
8.040000 0.338389
|
||||
8.060000 0.324804
|
||||
8.080000 0.315508
|
||||
8.100000 0.285864
|
||||
8.120000 0.089370
|
||||
8.140000 0.378119
|
||||
8.160000 0.093042
|
||||
8.180000 0.326371
|
||||
8.200000 0.214992
|
||||
8.220000 0.272968
|
||||
8.240000 0.466140
|
||||
8.260000 0.441360
|
||||
8.280000 0.463138
|
||||
8.300000 0.476466
|
||||
8.320000 0.264170
|
||||
8.340000 0.169713
|
||||
8.360000 -0.065215
|
||||
8.380000 -0.075488
|
||||
8.400000 0.042980
|
||||
8.420000 -0.149045
|
||||
8.440000 0.047137
|
||||
8.460000 -0.214226
|
||||
8.480000 -0.051177
|
||||
8.500000 -0.084061
|
||||
8.520000 -0.126147
|
||||
8.540000 -0.199647
|
||||
8.560000 -0.200450
|
||||
8.580000 -0.342299
|
||||
8.600000 -0.478008
|
||||
8.620000 -0.394154
|
||||
8.640000 -0.339514
|
||||
8.660000 -0.084231
|
||||
8.680000 -0.047599
|
||||
8.700000 -0.043127
|
||||
8.720000 -0.050035
|
||||
8.740000 -0.000872
|
||||
8.760000 0.042464
|
||||
8.780000 0.050395
|
||||
8.800000 0.046709
|
||||
8.820000 0.210556
|
||||
8.840000 0.194481
|
||||
8.860000 0.211542
|
||||
8.880000 0.241095
|
||||
8.900000 0.318334
|
||||
8.920000 0.492715
|
||||
8.940000 0.420409
|
||||
8.960000 0.422387
|
||||
8.980000 0.259892
|
||||
9.000000 0.266956
|
||||
9.020000 0.244336
|
||||
9.040000 0.175098
|
||||
9.060000 0.211758
|
||||
9.080000 0.213090
|
||||
9.100000 0.118259
|
||||
9.120000 0.131022
|
||||
9.140000 0.061728
|
||||
9.160000 0.036211
|
||||
9.180000 -0.023149
|
||||
9.200000 -0.126204
|
||||
9.220000 -0.317746
|
||||
9.240000 -0.504112
|
||||
9.260000 -0.432455
|
||||
9.280000 -0.499697
|
||||
9.300000 -0.249082
|
||||
9.320000 -0.307040
|
||||
9.340000 -0.226435
|
||||
9.360000 -0.417869
|
||||
9.380000 -0.249587
|
||||
9.400000 -0.240881
|
||||
9.420000 -0.210606
|
||||
9.440000 -0.167904
|
||||
9.460000 -0.191761
|
||||
9.480000 -0.153305
|
||||
9.500000 -0.129567
|
||||
9.520000 -0.129675
|
||||
9.540000 0.212965
|
||||
9.560000 0.403723
|
||||
9.580000 0.391514
|
||||
9.600000 0.367988
|
||||
9.620000 0.335965
|
||||
9.640000 0.511338
|
||||
9.660000 0.267671
|
||||
9.680000 0.260535
|
||||
9.700000 0.240616
|
||||
9.720000 0.292980
|
||||
9.740000 0.365138
|
||||
9.760000 0.289925
|
||||
9.780000 0.329946
|
||||
9.800000 0.448412
|
||||
9.820000 0.470235
|
||||
9.840000 0.311949
|
||||
9.860000 0.052864
|
||||
9.880000 0.122768
|
||||
9.900000 0.012715
|
||||
9.920000 -0.122779
|
||||
9.940000 -0.172054
|
||||
9.960000 -0.322282
|
||||
9.980000 -0.102970
|
||||
10.000000 -0.056880
|
||||
418
tests/data/metadata_2d_cyclic_reduced.dat
Normal file
418
tests/data/metadata_2d_cyclic_reduced.dat
Normal file
@@ -0,0 +1,418 @@
|
||||
#file phi psi fc1 fc2
|
||||
../../example/2d_cyclic/COLVAR-3.0-3.0.xvg -3.0 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-2.5.xvg -2.5 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-2.25.xvg -2.25 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-1.75.xvg -1.75 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-1.5.xvg -1.5 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-1.0.xvg -1.0 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-0.75.xvg -0.75 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0-0.25.xvg -0.25 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+0.0.xvg +0.0 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+0.5.xvg +0.5 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+0.75.xvg +0.75 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+1.25.xvg +1.25 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+1.5.xvg +1.5 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+2.0.xvg +2.0 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+2.25.xvg +2.25 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+2.75.xvg +2.75 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-3.0+3.0.xvg +3.0 -3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-2.75.xvg -2.75 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-2.5.xvg -2.5 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-2.0.xvg -2.0 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-1.75.xvg -1.75 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-1.25.xvg -1.25 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-1.0.xvg -1.0 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-0.5.xvg -0.5 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75-0.25.xvg -0.25 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+0.25.xvg +0.25 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+0.5.xvg +0.5 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+1.0.xvg +1.0 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+1.25.xvg +1.25 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+1.75.xvg +1.75 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+2.0.xvg +2.0 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+2.5.xvg +2.5 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.75+2.75.xvg +2.75 -2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-3.0.xvg -3.0 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-2.75.xvg -2.75 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-2.25.xvg -2.25 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-2.0.xvg -2.0 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-1.5.xvg -1.5 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-1.25.xvg -1.25 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-0.75.xvg -0.75 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5-0.5.xvg -0.5 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+0.0.xvg +0.0 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+0.25.xvg +0.25 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+0.75.xvg +0.75 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+1.0.xvg +1.0 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+1.5.xvg +1.5 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+1.75.xvg +1.75 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+2.25.xvg +2.25 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+2.5.xvg +2.5 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.5+3.0.xvg +3.0 -2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-3.0.xvg -3.0 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-2.5.xvg -2.5 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-2.25.xvg -2.25 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-1.75.xvg -1.75 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-1.5.xvg -1.5 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-1.0.xvg -1.0 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-0.75.xvg -0.75 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25-0.25.xvg -0.25 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+0.0.xvg +0.0 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+0.5.xvg +0.5 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+0.75.xvg +0.75 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+1.25.xvg +1.25 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+1.5.xvg +1.5 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+2.0.xvg +2.0 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+2.25.xvg +2.25 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+2.75.xvg +2.75 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.25+3.0.xvg +3.0 -2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-2.75.xvg -2.75 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-2.5.xvg -2.5 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-2.0.xvg -2.0 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-1.75.xvg -1.75 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-1.25.xvg -1.25 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-1.0.xvg -1.0 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-0.5.xvg -0.5 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0-0.25.xvg -0.25 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+0.25.xvg +0.25 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+0.5.xvg +0.5 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+1.0.xvg +1.0 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+1.25.xvg +1.25 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+1.75.xvg +1.75 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+2.0.xvg +2.0 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+2.5.xvg +2.5 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-2.0+2.75.xvg +2.75 -2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-3.0.xvg -3.0 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-2.75.xvg -2.75 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-2.25.xvg -2.25 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-2.0.xvg -2.0 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-1.5.xvg -1.5 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-1.25.xvg -1.25 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-0.75.xvg -0.75 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75-0.5.xvg -0.5 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+0.0.xvg +0.0 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+0.25.xvg +0.25 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+0.75.xvg +0.75 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+1.0.xvg +1.0 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+1.5.xvg +1.5 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+1.75.xvg +1.75 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+2.25.xvg +2.25 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+2.5.xvg +2.5 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.75+3.0.xvg +3.0 -1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-3.0.xvg -3.0 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-2.5.xvg -2.5 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-2.25.xvg -2.25 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-1.75.xvg -1.75 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-1.5.xvg -1.5 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-1.0.xvg -1.0 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-0.75.xvg -0.75 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5-0.25.xvg -0.25 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+0.0.xvg +0.0 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+0.5.xvg +0.5 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+0.75.xvg +0.75 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+1.25.xvg +1.25 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+1.5.xvg +1.5 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+2.0.xvg +2.0 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+2.25.xvg +2.25 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+2.75.xvg +2.75 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.5+3.0.xvg +3.0 -1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-2.75.xvg -2.75 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-2.5.xvg -2.5 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-2.0.xvg -2.0 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-1.75.xvg -1.75 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-1.25.xvg -1.25 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-1.0.xvg -1.0 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-0.5.xvg -0.5 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25-0.25.xvg -0.25 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+0.25.xvg +0.25 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+0.5.xvg +0.5 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+1.0.xvg +1.0 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+1.25.xvg +1.25 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+1.75.xvg +1.75 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+2.0.xvg +2.0 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+2.5.xvg +2.5 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.25+2.75.xvg +2.75 -1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-3.0.xvg -3.0 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-2.75.xvg -2.75 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-2.25.xvg -2.25 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-2.0.xvg -2.0 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-1.5.xvg -1.5 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-1.25.xvg -1.25 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-0.75.xvg -0.75 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0-0.5.xvg -0.5 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+0.0.xvg +0.0 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+0.25.xvg +0.25 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+0.75.xvg +0.75 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+1.0.xvg +1.0 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+1.5.xvg +1.5 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+1.75.xvg +1.75 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+2.25.xvg +2.25 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+2.5.xvg +2.5 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-1.0+3.0.xvg +3.0 -1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-3.0.xvg -3.0 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-2.5.xvg -2.5 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-2.25.xvg -2.25 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-1.75.xvg -1.75 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-1.5.xvg -1.5 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-1.0.xvg -1.0 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-0.75.xvg -0.75 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75-0.25.xvg -0.25 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+0.0.xvg +0.0 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+0.5.xvg +0.5 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+0.75.xvg +0.75 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+1.25.xvg +1.25 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+1.5.xvg +1.5 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+2.0.xvg +2.0 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+2.25.xvg +2.25 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+2.75.xvg +2.75 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.75+3.0.xvg +3.0 -0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-2.75.xvg -2.75 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-2.5.xvg -2.5 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-2.0.xvg -2.0 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-1.75.xvg -1.75 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-1.25.xvg -1.25 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-1.0.xvg -1.0 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-0.5.xvg -0.5 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5-0.25.xvg -0.25 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+0.25.xvg +0.25 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+0.5.xvg +0.5 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+1.0.xvg +1.0 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+1.25.xvg +1.25 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+1.75.xvg +1.75 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+2.0.xvg +2.0 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+2.5.xvg +2.5 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.5+2.75.xvg +2.75 -0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-3.0.xvg -3.0 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-2.75.xvg -2.75 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-2.25.xvg -2.25 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-2.0.xvg -2.0 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-1.5.xvg -1.5 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-1.25.xvg -1.25 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-0.75.xvg -0.75 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25-0.5.xvg -0.5 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+0.0.xvg +0.0 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+0.25.xvg +0.25 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+0.75.xvg +0.75 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+1.0.xvg +1.0 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+1.5.xvg +1.5 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+1.75.xvg +1.75 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+2.25.xvg +2.25 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+2.5.xvg +2.5 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR-0.25+3.0.xvg +3.0 -0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-3.0.xvg -3.0 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-2.5.xvg -2.5 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-2.25.xvg -2.25 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-1.75.xvg -1.75 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-1.5.xvg -1.5 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-1.0.xvg -1.0 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-0.75.xvg -0.75 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0-0.25.xvg -0.25 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+0.0.xvg +0.0 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+0.5.xvg +0.5 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+0.75.xvg +0.75 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+1.25.xvg +1.25 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+1.5.xvg +1.5 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+2.0.xvg +2.0 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+2.25.xvg +2.25 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+2.75.xvg +2.75 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.0+3.0.xvg +3.0 +0.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-2.75.xvg -2.75 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-2.5.xvg -2.5 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-2.0.xvg -2.0 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-1.75.xvg -1.75 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-1.25.xvg -1.25 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-1.0.xvg -1.0 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-0.5.xvg -0.5 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25-0.25.xvg -0.25 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+0.25.xvg +0.25 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+0.5.xvg +0.5 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+1.0.xvg +1.0 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+1.25.xvg +1.25 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+1.75.xvg +1.75 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+2.0.xvg +2.0 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+2.5.xvg +2.5 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.25+2.75.xvg +2.75 +0.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-3.0.xvg -3.0 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-2.75.xvg -2.75 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-2.25.xvg -2.25 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-2.0.xvg -2.0 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-1.5.xvg -1.5 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-1.25.xvg -1.25 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-0.75.xvg -0.75 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5-0.5.xvg -0.5 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+0.0.xvg +0.0 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+0.25.xvg +0.25 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+0.75.xvg +0.75 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+1.0.xvg +1.0 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+1.5.xvg +1.5 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+1.75.xvg +1.75 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+2.25.xvg +2.25 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+2.5.xvg +2.5 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.5+3.0.xvg +3.0 +0.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-3.0.xvg -3.0 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-2.5.xvg -2.5 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-2.25.xvg -2.25 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-1.75.xvg -1.75 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-1.5.xvg -1.5 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-1.0.xvg -1.0 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-0.75.xvg -0.75 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75-0.25.xvg -0.25 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+0.0.xvg +0.0 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+0.5.xvg +0.5 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+0.75.xvg +0.75 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+1.25.xvg +1.25 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+1.5.xvg +1.5 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+2.0.xvg +2.0 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+2.25.xvg +2.25 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+2.75.xvg +2.75 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+0.75+3.0.xvg +3.0 +0.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-2.75.xvg -2.75 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-2.5.xvg -2.5 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-2.0.xvg -2.0 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-1.75.xvg -1.75 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-1.25.xvg -1.25 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-1.0.xvg -1.0 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-0.5.xvg -0.5 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0-0.25.xvg -0.25 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+0.25.xvg +0.25 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+0.5.xvg +0.5 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+1.0.xvg +1.0 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+1.25.xvg +1.25 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+1.75.xvg +1.75 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+2.0.xvg +2.0 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+2.5.xvg +2.5 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.0+2.75.xvg +2.75 +1.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-3.0.xvg -3.0 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-2.75.xvg -2.75 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-2.25.xvg -2.25 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-2.0.xvg -2.0 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-1.5.xvg -1.5 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-1.25.xvg -1.25 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-0.75.xvg -0.75 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25-0.5.xvg -0.5 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+0.0.xvg +0.0 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+0.25.xvg +0.25 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+0.75.xvg +0.75 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+1.0.xvg +1.0 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+1.5.xvg +1.5 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+1.75.xvg +1.75 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+2.25.xvg +2.25 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+2.5.xvg +2.5 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.25+3.0.xvg +3.0 +1.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-3.0.xvg -3.0 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-2.5.xvg -2.5 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-2.25.xvg -2.25 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-1.75.xvg -1.75 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-1.5.xvg -1.5 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-1.0.xvg -1.0 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-0.75.xvg -0.75 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5-0.25.xvg -0.25 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+0.0.xvg +0.0 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+0.5.xvg +0.5 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+0.75.xvg +0.75 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+1.25.xvg +1.25 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+1.5.xvg +1.5 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+2.0.xvg +2.0 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+2.25.xvg +2.25 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+2.75.xvg +2.75 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.5+3.0.xvg +3.0 +1.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-2.75.xvg -2.75 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-2.5.xvg -2.5 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-2.0.xvg -2.0 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-1.75.xvg -1.75 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-1.25.xvg -1.25 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-1.0.xvg -1.0 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-0.5.xvg -0.5 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75-0.25.xvg -0.25 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+0.25.xvg +0.25 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+0.5.xvg +0.5 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+1.0.xvg +1.0 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+1.25.xvg +1.25 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+1.75.xvg +1.75 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+2.0.xvg +2.0 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+2.5.xvg +2.5 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+1.75+2.75.xvg +2.75 +1.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-3.0.xvg -3.0 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-2.75.xvg -2.75 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-2.25.xvg -2.25 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-2.0.xvg -2.0 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-1.5.xvg -1.5 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-1.25.xvg -1.25 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-0.75.xvg -0.75 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0-0.5.xvg -0.5 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+0.0.xvg +0.0 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+0.25.xvg +0.25 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+0.75.xvg +0.75 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+1.0.xvg +1.0 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+1.5.xvg +1.5 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+1.75.xvg +1.75 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+2.25.xvg +2.25 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+2.5.xvg +2.5 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.0+3.0.xvg +3.0 +2.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-3.0.xvg -3.0 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-2.5.xvg -2.5 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-2.25.xvg -2.25 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-1.75.xvg -1.75 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-1.5.xvg -1.5 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-1.0.xvg -1.0 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-0.75.xvg -0.75 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25-0.25.xvg -0.25 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+0.0.xvg +0.0 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+0.5.xvg +0.5 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+0.75.xvg +0.75 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+1.25.xvg +1.25 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+1.5.xvg +1.5 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+2.0.xvg +2.0 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+2.25.xvg +2.25 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+2.75.xvg +2.75 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.25+3.0.xvg +3.0 +2.25 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-2.75.xvg -2.75 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-2.5.xvg -2.5 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-2.0.xvg -2.0 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-1.75.xvg -1.75 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-1.25.xvg -1.25 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-1.0.xvg -1.0 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-0.5.xvg -0.5 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5-0.25.xvg -0.25 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+0.25.xvg +0.25 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+0.5.xvg +0.5 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+1.0.xvg +1.0 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+1.25.xvg +1.25 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+1.75.xvg +1.75 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+2.0.xvg +2.0 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+2.5.xvg +2.5 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.5+2.75.xvg +2.75 +2.5 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-3.0.xvg -3.0 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-2.75.xvg -2.75 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-2.25.xvg -2.25 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-2.0.xvg -2.0 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-1.5.xvg -1.5 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-1.25.xvg -1.25 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-0.75.xvg -0.75 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75-0.5.xvg -0.5 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+0.0.xvg +0.0 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+0.25.xvg +0.25 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+0.75.xvg +0.75 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+1.0.xvg +1.0 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+1.5.xvg +1.5 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+1.75.xvg +1.75 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+2.25.xvg +2.25 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+2.5.xvg +2.5 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+2.75+3.0.xvg +3.0 +2.75 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-3.0.xvg -3.0 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-2.5.xvg -2.5 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-2.25.xvg -2.25 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-1.75.xvg -1.75 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-1.5.xvg -1.5 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-1.0.xvg -1.0 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-0.75.xvg -0.75 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0-0.25.xvg -0.25 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+0.0.xvg +0.0 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+0.5.xvg +0.5 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+0.75.xvg +0.75 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+1.25.xvg +1.25 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+1.5.xvg +1.5 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+2.0.xvg +2.0 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+2.25.xvg +2.25 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+2.75.xvg +2.75 +3.0 100.0 100.0
|
||||
../../example/2d_cyclic/COLVAR+3.0+3.0.xvg +3.0 +3.0 100.0 100.0
|
||||
12
tests/data/metadata_convdt.dat
Normal file
12
tests/data/metadata_convdt.dat
Normal file
@@ -0,0 +1,12 @@
|
||||
# 500 pts
|
||||
COLVAR_0-10.xvg 0.0 100
|
||||
# 100 pts
|
||||
COLVAR_0-2.xvg 0.0 100
|
||||
# 250 pts
|
||||
COLVAR_0-5.xvg 0.0 100
|
||||
# 250 pts
|
||||
COLVAR_5-10.xvg 0.0 100
|
||||
# 150 pts
|
||||
COLVAR_7-10.xvg 0.0 100
|
||||
# 250 pts
|
||||
COLVAR_2-7.xvg 0.0 100
|
||||
1
tests/data/metadata_convdt_single.dat
Normal file
1
tests/data/metadata_convdt_single.dat
Normal file
@@ -0,0 +1 @@
|
||||
COLVAR_2-7.xvg 0.0 100
|
||||
@@ -6,44 +6,153 @@ mod integration {
|
||||
use std::process::Command;
|
||||
use std::fs;
|
||||
use super::command::get_command;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::prelude::*;
|
||||
|
||||
#[test]
|
||||
fn wham_1d_cyclic() {
|
||||
let output_file = "/tmp/wham_test_1d_cyclic.out";
|
||||
get_command()
|
||||
.args(&["--bins", "100", "--max", "pi", "--min", "-pi", "-T", "300", "--cyclic"])
|
||||
.args(&["--bt", "100", "--seed", "1234"])
|
||||
.args(&["--seed", "1234"])
|
||||
.args(&["-f", "example/1d_cyclic/metadata.dat"])
|
||||
.args(&["-o", "/tmp/wham_test_1d_cyclic.out"])
|
||||
.args(&["-o", output_file])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
|
||||
assert!(fs::metadata("/tmp/wham_test_1d_cyclic.out").is_ok());
|
||||
assert!(fs::metadata(output_file).is_ok());
|
||||
let output = Command::new("diff")
|
||||
.arg("/tmp/wham_test_1d_cyclic.out")
|
||||
.arg(output_file)
|
||||
.arg("example/1d_cyclic/wham.out")
|
||||
.output()
|
||||
.expect("failed to run diff");
|
||||
let output_len = String::from_utf8_lossy(&output.stdout).len();
|
||||
assert_eq!(output_len, 0);
|
||||
std::fs::remove_file(output_file).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore] // expensive
|
||||
fn wham_2d_cyclic() {
|
||||
fn wham_1d_cyclic_uncorrelated() {
|
||||
let output_file = "/tmp/wham_test_1d_cyclic.out";
|
||||
get_command()
|
||||
.args(&["--bins", "100,100", "--max", "pi,pi", "--min", "-pi,-pi", "-T", "300", "--cyclic"])
|
||||
.args(&["-f", "example/2d_cyclic/metadata.dat"])
|
||||
.args(&["-o", "/tmp/wham_test_2d_cyclic.out"])
|
||||
.args(&["--bins", "100", "--max", "pi", "--min", "-pi", "-T", "300", "--cyclic", "--uncorr"])
|
||||
.args(&["--seed", "1234"])
|
||||
.args(&["-f", "example/1d_cyclic/metadata.dat"])
|
||||
.args(&["-o", output_file])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
|
||||
assert!(fs::metadata("/tmp/wham_test_2d_cyclic.out").is_ok());
|
||||
assert!(fs::metadata("/tmp/wham_test_1d_cyclic.out").is_ok());
|
||||
let output = Command::new("diff")
|
||||
.arg("/tmp/wham_test_2d_cyclic.out")
|
||||
.arg("example/2d_cyclic/wham.out")
|
||||
.arg(output_file)
|
||||
.arg("example/1d_cyclic/wham_uncorrelated.out")
|
||||
.output()
|
||||
.expect("failed to run diff");
|
||||
let output_len = String::from_utf8_lossy(&output.stdout).len();
|
||||
assert_eq!(output_len, 0);
|
||||
std::fs::remove_file(output_file).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wham_convdt() {
|
||||
// run wham with convdt
|
||||
let output_file = "/tmp/wham_test_convdt.out";
|
||||
get_command()
|
||||
.args(&["--bins", "10", "--max", "pi", "--min", "-pi", "-T", "300", "--cyclic"])
|
||||
.args(&["--seed", "1234", "--tolerance", "0.001"])
|
||||
.args(&["--start", "0", "--end", "10"])
|
||||
.args(&["--convdt", "1"])
|
||||
.args(&["-f", "example/1d_cyclic/metadata.dat"])
|
||||
.args(&["-o", output_file])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
assert!(fs::metadata(output_file).is_ok());
|
||||
|
||||
// run wham for individual sets
|
||||
for i in 1..11 {
|
||||
let output_file_single = format!("/tmp/wham_test_convdt_{}.out", i);
|
||||
get_command()
|
||||
.args(&["--bins", "10", "--max", "pi", "--min", "-pi", "-T", "300", "--cyclic"])
|
||||
.args(&["--seed", "1234", "--tolerance", "0.001"])
|
||||
.args(&["--start", "0", "--end", &i.to_string()])
|
||||
.args(&["-f", "example/1d_cyclic/metadata.dat"])
|
||||
.args(&["-o", &output_file_single])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
assert!(fs::metadata(output_file_single).is_ok());
|
||||
}
|
||||
|
||||
// combine individual runs
|
||||
let output_combined = "/tmp/wham_test_convdt_combined.out";
|
||||
let mut file = OpenOptions::new()
|
||||
.create(true)
|
||||
.write(true)
|
||||
.open(output_combined)
|
||||
.unwrap();
|
||||
for i in 1..11 {
|
||||
let output_file_single = format!("/tmp/wham_test_convdt_{}.out", i);
|
||||
println!("{}", output_file_single);
|
||||
file.write_all(format!("#Dataset {}\n", i-1).as_bytes()).unwrap();
|
||||
file.write_all(fs::read_to_string(output_file_single.clone()).unwrap().as_bytes()).unwrap();
|
||||
std::fs::remove_file(output_file_single).unwrap();
|
||||
}
|
||||
|
||||
// compare combined runs with single run
|
||||
let output = Command::new("diff")
|
||||
.arg(output_file)
|
||||
.arg(output_combined)
|
||||
.output()
|
||||
.expect("failed to run diff");
|
||||
let output_len = String::from_utf8_lossy(&output.stdout).len();
|
||||
assert_eq!(output_len, 0);
|
||||
|
||||
std::fs::remove_file(output_combined).unwrap();
|
||||
std::fs::remove_file(output_file).unwrap();
|
||||
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wham_1d_cyclic_bootstrap() {
|
||||
let output_file = "/tmp/wham_test_1d_cyclic_bt.out";
|
||||
get_command()
|
||||
.args(&["--bins", "100", "--max", "pi", "--min", "-pi", "-T", "300", "--cyclic"])
|
||||
.args(&["--seed", "1234", "--bt", "100"])
|
||||
.args(&["-f", "example/1d_cyclic/metadata.dat"])
|
||||
.args(&["-o", output_file])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
|
||||
assert!(fs::metadata(output_file).is_ok());
|
||||
let output = Command::new("diff")
|
||||
.arg(output_file)
|
||||
.arg("example/1d_cyclic/wham_bt.out")
|
||||
.output()
|
||||
.expect("failed to run diff");
|
||||
let output_len = String::from_utf8_lossy(&output.stdout).len();
|
||||
assert_eq!(output_len, 0);
|
||||
std::fs::remove_file(output_file).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wham_2d_cyclic() {
|
||||
let output_file = "/tmp/wham_test_2d_cyclic.out";
|
||||
let out=
|
||||
get_command()
|
||||
.args(&["--bins", "50,50", "--max", "pi,pi", "--min", "-pi,-pi", "-T", "300", "--cyclic"])
|
||||
.args(&["--tolerance", "0.001"])
|
||||
.args(&["-f", "tests/data/metadata_2d_cyclic_reduced.dat"])
|
||||
.args(&["-o", output_file])
|
||||
.output()
|
||||
.expect("failed to execute process");
|
||||
println!("{:?}", out);
|
||||
assert!(fs::metadata(output_file).is_ok());
|
||||
let output = Command::new("diff")
|
||||
.arg(output_file)
|
||||
.arg("tests/data/2d_cyclic_reduced.out")
|
||||
.output()
|
||||
.expect("failed to run diff");
|
||||
let output_len = String::from_utf8_lossy(&output.stdout).len();
|
||||
assert_eq!(output_len, 0);
|
||||
std::fs::remove_file(output_file).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user