1g_bar(1) GROMACS suite, VERSION 4.5 g_bar(1)
2
3
4
6 g_bar - calculates free energy difference estimates through Bennett's
7 acceptance ratio
8
9 VERSION 4.5
10
12 g_bar -f dhdl.xvg -o bar.xvg -oi barint.xvg -oh histogram.xvg -g
13 energy.edr -[no]h -[no]version -nice int -[no]w -xvg enum -b real -e
14 real -temp real -prec int -nbmin int -nbmax int -nbin int
15
17 g_bar calculates free energy difference estimates through Bennett's
18 acceptance ratio method. Input option -f expects multiple dhdl files.
19 Two types of input files are supported:
20
21 * Files with only one y-value, for such files it is assumed that the
22 y-value is dH/dlambda and that the Hamiltonian depends linearly on
23 lambda. The lambda value of the simulation is inferred from the subti‐
24 tle if present, otherwise from a number in the subdirectory in the file
25 name.
26
27 * Files with more than one y-value. The files should have columns with
28 dH/dlambda and Delta lambda. The lambda values are inferred from the
29 legends: lambda of the simulation from the legend of dH/dlambda and the
30 foreign lambda's from the legends of Delta H.
31
32
33 The lambda of the simulation is parsed from dhdl.xvg file's legend con‐
34 taining the string 'dH', the foreign lambda's from the legend contain‐
35 ing the capitalized letters 'D' and 'H'. The temperature is parsed from
36 the legend line containing 'T ='.
37
38
39 The free energy estimates are determined using BAR with bisection, the
40 precision of the output is set with -prec. An error estimate taking
41 into account time correlations is made by splitting the data into
42 blocks and determining the free energy differences over those blocks
43 and assuming the blocks are independent. The final error estimate is
44 determined from the average variance over 5 blocks. A range of blocks
45 numbers for error estimation can be provided with the options -nbmin
46 and -nbmax.
47
48
49 The results are split in two parts: the last part contains the final
50 results in kJ/mol, together with the error estimate for each part and
51 the total. The first part contains detailed free energy difference
52 estimates and phase space overlap measures in units of kT (together
53 with their computed error estimate). The printed values are:
54
55 * lam_A: the lambda values for point A.
56
57 * lam_B: the lambda values for point B.
58
59 * DG: the free energy estimate.
60
61 * s_A: an estimate of the relative entropy of B in A.
62
63 * s_A: an estimate of the relative entropy of A in B.
64
65 * stdev: an estimate expected per-sample standard deviation.
66
67
68 The relative entropy of both states in each other's ensemble can be
69 interpreted as a measure of phase space overlap: the relative entropy
70 s_A of the work samples of lambda_B in the ensemble of lambda_A (and
71 vice versa for s_B), is a measure of the 'distance' between Boltzmann
72 distributions of the two states, that goes to zero for identical dis‐
73 tributions. See Wu & Kofke, J. Chem. Phys. 123 084109 (2009) for more
74 information.
75
76
77 The estimate of the expected per-sample standard deviation, as given in
78 Bennett's original BAR paper: Bennett, J. Comp. Phys. 22, p 245 (1976),
79 Eq. 10 gives an estimate of the quality of sampling (not directly of
80 the actual statistical error, because it assumes independent samples).
81
82
83
85 -f dhdl.xvg Input, Opt., Mult.
86 xvgr/xmgr file
87
88 -o bar.xvg Output, Opt.
89 xvgr/xmgr file
90
91 -oi barint.xvg Output, Opt.
92 xvgr/xmgr file
93
94 -oh histogram.xvg Output, Opt.
95 xvgr/xmgr file
96
97 -g energy.edr Input, Opt., Mult.
98 Energy file
99
100
102 -[no]hno
103 Print help info and quit
104
105 -[no]versionno
106 Print version info and quit
107
108 -nice int 0
109 Set the nicelevel
110
111 -[no]wno
112 View output xvg, xpm, eps and pdb files
113
114 -xvg enum xmgrace
115 xvg plot formatting: xmgrace, xmgr or none
116
117 -b real 0
118 Begin time for BAR
119
120 -e real -1
121 End time for BAR
122
123 -temp real -1
124 Temperature (K)
125
126 -prec int 2
127 The number of digits after the decimal point
128
129 -nbmin int 5
130 Minimum number of blocks for error estimation
131
132 -nbmax int 5
133 Maximum number of blocks for error estimation
134
135 -nbin int 100
136 Number of bins for histogram output
137
138
140 gromacs(7)
141
142 More information about GROMACS is available at <http://www.gro‐
143 macs.org/>.
144
145
146
147 Thu 26 Aug 2010 g_bar(1)