Debian Codegraph @

examples/umbrella-sampling-fes/wham/dowham.pl

raw
1 #!/usr/bin/perl -w
2
3 $name = "PMF";
4 $nbin = 144;
5 $temp = 298;
6 $kB = 0.008314472;
7 $kT = $temp*$kB;
8 $kcal = 4.1868;
9 $kcaltokT = $kT/$kcal;
10 $outfile = "$name"."_"."$nbin";
11 $randn = 12323;
12 $sys = "../../../pymbar/wham-grossfield/wham/wham P360.0 -180 180 $nbin 0.0000000001 $temp 0 metadata.dat $outfile 100 $randn";
13 `$sys`;
14 open(IN,"$outfile");@lines = <IN>;close(IN);
15
16 foreach $l (@lines) {
17 if ($l =~ /\#/) {
18 print $l;
19 next;
20 }
21 ($theta,$pmf,$err,$prob,$perr) = split(/\s+/,$l);
22 $pmf /= $kcaltokT;
23 $err /= $kcaltokT;
24 printf "%8.2f%10.4f%10.4f%15.12g%15.12g\n",$theta,$pmf,$err,$prob,$perr;
25 }