normalize P for final dump/output

This commit is contained in:
Daniel Bauer
2018-10-16 22:52:08 +02:00
parent 0cdf300415
commit 7fd78fc2a5
3 changed files with 10203 additions and 107 deletions

View File

@@ -1,101 +1,101 @@
#x Free Energy Probability
-3.108600 7.118164 1.490643
-3.045800 5.331288 3.051337
-2.983000 3.879239 5.461469
-2.920200 2.968658 7.867789
-2.857400 1.942493 11.871904
-2.794600 1.418407 14.647720
-2.731800 1.169397 16.185486
-2.669000 0.843023 18.448090
-2.606200 0.636020 20.044400
-2.543400 0.720123 19.379823
-2.480600 1.066434 16.867582
-2.417800 1.509855 14.120429
-2.355000 2.015549 11.529236
-2.292200 2.226943 10.592398
-2.229400 2.573176 9.219575
-2.166600 2.591946 9.150458
-2.103800 2.476836 9.582633
-2.041000 2.513953 9.441093
-1.978200 2.470033 9.608804
-1.915400 2.227585 10.589671
-1.852600 2.105310 11.121721
-1.789800 1.778780 12.677245
-1.727000 1.447127 14.480034
-1.664200 0.906384 17.985373
-1.601400 0.304263 22.895809
-1.538600 0.247397 23.423788
-1.475800 0.000000 25.866156
-1.413000 0.536141 20.863309
-1.350200 1.428046 14.591228
-1.287400 2.398149 9.889749
-1.224600 3.784647 5.672562
-1.161800 5.696582 2.635652
-1.099000 7.656157 1.201441
-1.036200 9.954999 0.478020
-0.973400 12.357406 0.182456
-0.910600 14.954253 0.064419
-0.847800 17.745325 0.021041
-0.785000 20.559459 0.006809
-0.722200 22.783557 0.002792
-0.659400 25.175862 0.001070
-0.596600 26.419977 0.000650
-0.533800 27.885996 0.000361
-0.471000 29.029330 0.000228
-0.408200 30.366552 0.000134
-0.345400 31.615248 0.000081
-0.282600 32.781711 0.000051
-0.219800 33.731373 0.000035
-0.157000 34.476008 0.000026
-0.094200 35.387294 0.000018
-0.031400 35.579750 0.000017
0.031400 35.520188 0.000017
0.094200 35.344757 0.000018
0.157000 34.886453 0.000022
0.219800 33.633992 0.000036
0.282600 32.686504 0.000053
0.345400 31.211770 0.000095
0.408200 29.680443 0.000176
0.471000 28.032233 0.000340
0.533800 26.439591 0.000645
0.596600 24.432458 0.001441
0.659400 22.309884 0.003375
0.722200 20.186031 0.007909
0.785000 18.295037 0.016879
0.847800 16.221223 0.038763
0.910600 14.251901 0.085370
0.973400 12.562343 0.168065
1.036200 11.184019 0.292051
1.099000 10.040667 0.461881
1.161800 9.369054 0.604598
1.224600 9.095382 0.674708
1.287400 9.256025 0.632625
1.350200 9.814058 0.505808
1.413000 10.945197 0.321396
1.475800 12.518888 0.171018
1.538600 14.409735 0.080135
1.601400 16.451956 0.035338
1.664200 18.589157 0.015002
1.727000 20.669496 0.006515
1.789800 22.804783 0.002768
1.852600 24.531682 0.001385
1.915400 26.182604 0.000715
1.978200 27.279432 0.000460
2.041000 28.571373 0.000274
2.103800 29.328963 0.000202
2.166600 29.897732 0.000161
2.229400 30.320901 0.000136
2.292200 30.065385 0.000151
2.355000 29.809130 0.000167
2.417800 29.340595 0.000201
2.480600 28.473341 0.000285
2.543400 27.679348 0.000392
2.606200 26.453155 0.000641
2.669000 24.424644 0.001446
2.731800 22.285929 0.003408
2.794600 19.958403 0.008664
2.857400 17.606287 0.022247
2.920200 15.420135 0.053444
2.983000 13.069596 0.137138
3.045800 11.036083 0.309896
3.108600 9.015655 0.696622
-3.108600 7.118164 0.003561
-3.045800 5.331288 0.007290
-2.983000 3.879239 0.013048
-2.920200 2.968658 0.018796
-2.857400 1.942493 0.028362
-2.794600 1.418407 0.034994
-2.731800 1.169397 0.038668
-2.669000 0.843023 0.044073
-2.606200 0.636020 0.047887
-2.543400 0.720123 0.046299
-2.480600 1.066434 0.040297
-2.417800 1.509855 0.033734
-2.355000 2.015549 0.027544
-2.292200 2.226943 0.025306
-2.229400 2.573176 0.022026
-2.166600 2.591946 0.021861
-2.103800 2.476836 0.022893
-2.041000 2.513953 0.022555
-1.978200 2.470033 0.022956
-1.915400 2.227585 0.025299
-1.852600 2.105310 0.026570
-1.789800 1.778780 0.030286
-1.727000 1.447127 0.034593
-1.664200 0.906384 0.042968
-1.601400 0.304263 0.054699
-1.538600 0.247397 0.055960
-1.475800 0.000000 0.061795
-1.413000 0.536141 0.049843
-1.350200 1.428046 0.034859
-1.287400 2.398149 0.023627
-1.224600 3.784647 0.013552
-1.161800 5.696582 0.006297
-1.099000 7.656157 0.002870
-1.036200 9.954999 0.001142
-0.973400 12.357406 0.000436
-0.910600 14.954253 0.000154
-0.847800 17.745325 0.000050
-0.785000 20.559459 0.000016
-0.722200 22.783557 0.000007
-0.659400 25.175862 0.000003
-0.596600 26.419977 0.000002
-0.533800 27.885996 0.000001
-0.471000 29.029330 0.000001
-0.408200 30.366552 0.000000
-0.345400 31.615248 0.000000
-0.282600 32.781711 0.000000
-0.219800 33.731373 0.000000
-0.157000 34.476008 0.000000
-0.094200 35.387294 0.000000
-0.031400 35.579750 0.000000
0.031400 35.520188 0.000000
0.094200 35.344757 0.000000
0.157000 34.886453 0.000000
0.219800 33.633992 0.000000
0.282600 32.686504 0.000000
0.345400 31.211770 0.000000
0.408200 29.680443 0.000000
0.471000 28.032233 0.000001
0.533800 26.439591 0.000002
0.596600 24.432458 0.000003
0.659400 22.309884 0.000008
0.722200 20.186031 0.000019
0.785000 18.295037 0.000040
0.847800 16.221223 0.000093
0.910600 14.251901 0.000204
0.973400 12.562343 0.000402
1.036200 11.184019 0.000698
1.099000 10.040667 0.001103
1.161800 9.369054 0.001444
1.224600 9.095382 0.001612
1.287400 9.256025 0.001511
1.350200 9.814058 0.001208
1.413000 10.945197 0.000768
1.475800 12.518888 0.000409
1.538600 14.409735 0.000191
1.601400 16.451956 0.000084
1.664200 18.589157 0.000036
1.727000 20.669496 0.000016
1.789800 22.804783 0.000007
1.852600 24.531682 0.000003
1.915400 26.182604 0.000002
1.978200 27.279432 0.000001
2.041000 28.571373 0.000001
2.103800 29.328963 0.000000
2.166600 29.897732 0.000000
2.229400 30.320901 0.000000
2.292200 30.065385 0.000000
2.355000 29.809130 0.000000
2.417800 29.340595 0.000000
2.480600 28.473341 0.000001
2.543400 27.679348 0.000001
2.606200 26.453155 0.000002
2.669000 24.424644 0.000003
2.731800 22.285929 0.000008
2.794600 19.958403 0.000021
2.857400 17.606287 0.000053
2.920200 15.420135 0.000128
2.983000 13.069596 0.000328
3.045800 11.036083 0.000740
3.108600 9.015655 0.001664

10101
example/2d/test Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -198,13 +198,8 @@ pub fn run(cfg: &Config) -> Result<(), Box<Error>>{
}
// Normalize P
// let mut P_sum = 0.0;
// for bin in 0..histograms.num_bins {
// P_sum += P[bin];
// }
// for bin in 0..histograms.num_bins {
// P[bin] /= P_sum;
// }
let P_sum: f64 = P.iter().sum();
P.iter_mut().map(|p| *p /= P_sum).count();
// final free energy calculation and state dump
println!("Finished. Dumping final PMF");