header for final state dump lists bins

This commit is contained in:
Daniel Bauer
2018-10-25 11:24:14 +02:00
parent b40ad9b516
commit 8e9e06a644
2 changed files with 2 additions and 5 deletions

View File

@@ -22,7 +22,6 @@ The example folder contains input and output files for two simple test systems:
TODO
---
- calculate bin count only once
- Multithreading (?)
- Error analysis / bootstrapping
- Better error messages during file I/O

View File

@@ -181,15 +181,13 @@ fn calc_free_energy(ds: &Dataset, P: &[f64]) -> Vec<f64> {
free_energy
}
// TODO print nice headers for N dimensions
fn dump_state(ds: &Dataset, F: &[f64], F_prev: &[f64], P: &[f64], A: &[f64]) {
let out = std::io::stdout();
let mut lock = out.lock();
writeln!(lock, "# PMF");
writeln!(lock, "#x\t\tFree Energy\t\tP(x)");
writeln!(lock, "#bin\t\tFree Energy\t\tP(x)");
for bin in 0..ds.num_bins {
let x = ds.get_coords_for_bin(bin)[0];
writeln!(lock, "{:9.5}\t{:9.5}\t{:9.5}", x, A[bin], P[bin]);
writeln!(lock, "{:9.5}\t{:9.5}\t{:9.5}", bin, A[bin], P[bin]);
}
writeln!(lock, "# Bias offsets");
writeln!(lock, "#Window\t\tF\t\tdF");