Release 4.5.6
[alexxy/gromacs.git] / man / man1 / g_analyze.1
1 .TH g_analyze 1 "Fri 18 Jan 2013" "" "GROMACS suite, VERSION 4.5.6"
2 .SH NAME
3 g_analyze - analyzes data sets
4
5 .B VERSION 4.5.6
6 .SH SYNOPSIS
7 \f3g_analyze\fP
8 .BI "\-f" " graph.xvg "
9 .BI "\-ac" " autocorr.xvg "
10 .BI "\-msd" " msd.xvg "
11 .BI "\-cc" " coscont.xvg "
12 .BI "\-dist" " distr.xvg "
13 .BI "\-av" " average.xvg "
14 .BI "\-ee" " errest.xvg "
15 .BI "\-bal" " ballisitc.xvg "
16 .BI "\-g" " fitlog.log "
17 .BI "\-[no]h" ""
18 .BI "\-[no]version" ""
19 .BI "\-nice" " int "
20 .BI "\-[no]w" ""
21 .BI "\-xvg" " enum "
22 .BI "\-[no]time" ""
23 .BI "\-b" " real "
24 .BI "\-e" " real "
25 .BI "\-n" " int "
26 .BI "\-[no]d" ""
27 .BI "\-bw" " real "
28 .BI "\-errbar" " enum "
29 .BI "\-[no]integrate" ""
30 .BI "\-aver_start" " real "
31 .BI "\-[no]xydy" ""
32 .BI "\-[no]regression" ""
33 .BI "\-[no]luzar" ""
34 .BI "\-temp" " real "
35 .BI "\-fitstart" " real "
36 .BI "\-fitend" " real "
37 .BI "\-smooth" " real "
38 .BI "\-filter" " real "
39 .BI "\-[no]power" ""
40 .BI "\-[no]subav" ""
41 .BI "\-[no]oneacf" ""
42 .BI "\-acflen" " int "
43 .BI "\-[no]normalize" ""
44 .BI "\-P" " enum "
45 .BI "\-fitfn" " enum "
46 .BI "\-ncskip" " int "
47 .BI "\-beginfit" " real "
48 .BI "\-endfit" " real "
49 .SH DESCRIPTION
50 \&\fB g_analyze\fR reads an ASCII file and analyzes data sets.
51 \&A line in the input file may start with a time
52 \&(see option \fB \-time\fR) and any number of \fI y\fR\-values may follow.
53 \&Multiple sets can also be
54 \&read when they are separated by & (option \fB \-n\fR);
55 \&in this case only one \fI y\fR\-value is read from each line.
56 \&All lines starting with  and @ are skipped.
57 \&All analyses can also be done for the derivative of a set
58 \&(option \fB \-d\fR).
59
60
61 \&All options, except for \fB \-av\fR and \fB \-power\fR, assume that the
62 \&points are equidistant in time.
63
64
65 \&\fB g_analyze\fR always shows the average and standard deviation of each
66 \&set, as well as the relative deviation of the third
67 \&and fourth cumulant from those of a Gaussian distribution with the same
68 \&standard deviation.
69
70
71 \&Option \fB \-ac\fR produces the autocorrelation function(s).
72 \&Be sure that the time interval between data points is
73 \&much shorter than the time scale of the autocorrelation.
74
75
76 \&Option \fB \-cc\fR plots the resemblance of set i with a cosine of
77 \&i/2 periods. The formula is:
78 2 (integral from 0 to T of y(t) cos(i pi t) dt)2 / integral from 0 to T of y2(t) dt
79
80 \&This is useful for principal components obtained from covariance
81 \&analysis, since the principal components of random diffusion are
82 \&pure cosines.
83
84
85 \&Option \fB \-msd\fR produces the mean square displacement(s).
86
87
88 \&Option \fB \-dist\fR produces distribution plot(s).
89
90
91 \&Option \fB \-av\fR produces the average over the sets.
92 \&Error bars can be added with the option \fB \-errbar\fR.
93 \&The errorbars can represent the standard deviation, the error
94 \&(assuming the points are independent) or the interval containing
95 \&90% of the points, by discarding 5% of the points at the top and
96 \&the bottom.
97
98
99 \&Option \fB \-ee\fR produces error estimates using block averaging.
100 \&A set is divided in a number of blocks and averages are calculated for
101 \&each block. The error for the total average is calculated from
102 \&the variance between averages of the m blocks B_i as follows:
103 \&error2 = sum (B_i \- B)2 / (m*(m\-1)).
104 \&These errors are plotted as a function of the block size.
105 \&Also an analytical block average curve is plotted, assuming
106 \&that the autocorrelation is a sum of two exponentials.
107 \&The analytical curve for the block average is:
108
109 \&f(t) = sigma\fB *\fRsqrt(2/T (  alpha   (tau_1 ((exp(\-t/tau_1) \- 1) tau_1/t + 1)) +
110
111 \&                       (1\-alpha) (tau_2 ((exp(\-t/tau_2) \- 1) tau_2/t + 1)))),
112 where T is the total time.
113 \&alpha, tau_1 and tau_2 are obtained by fitting f2(t) to error2.
114 \&When the actual block average is very close to the analytical curve,
115 \&the error is sigma\fB *\fRsqrt(2/T (a tau_1 + (1\-a) tau_2)).
116 \&The complete derivation is given in
117 \&B. Hess, J. Chem. Phys. 116:209\-217, 2002.
118
119
120 \&Option \fB \-bal\fR finds and subtracts the ultrafast "ballistic"
121 \&component from a hydrogen bond autocorrelation function by the fitting
122 \&of a sum of exponentials, as described in e.g.
123 \&O. Markovitch, J. Chem. Phys. 129:084505, 2008. The fastest term
124 \&is the one with the most negative coefficient in the exponential,
125 \&or with \fB \-d\fR, the one with most negative time derivative at time 0.
126 \&\fB \-nbalexp\fR sets the number of exponentials to fit.
127
128
129 \&Option \fB \-gem\fR fits bimolecular rate constants ka and kb
130 \&(and optionally kD) to the hydrogen bond autocorrelation function
131 \&according to the reversible geminate recombination model. Removal of
132 \&the ballistic component first is strongly advised. The model is presented in
133 \&O. Markovitch, J. Chem. Phys. 129:084505, 2008.
134
135
136 \&Option \fB \-filter\fR prints the RMS high\-frequency fluctuation
137 \&of each set and over all sets with respect to a filtered average.
138 \&The filter is proportional to cos(pi t/len) where t goes from \-len/2
139 \&to len/2. len is supplied with the option \fB \-filter\fR.
140 \&This filter reduces oscillations with period len/2 and len by a factor
141 \&of 0.79 and 0.33 respectively.
142
143
144 \&Option \fB \-g\fR fits the data to the function given with option
145 \&\fB \-fitfn\fR.
146
147
148 \&Option \fB \-power\fR fits the data to b ta, which is accomplished
149 \&by fitting to a t + b on log\-log scale. All points after the first
150 \&zero or with a negative value are ignored.
151
152 Option \fB \-luzar\fR performs a Luzar & Chandler kinetics analysis
153 \&on output from \fB g_hbond\fR. The input file can be taken directly
154 \&from \fB g_hbond \-ac\fR, and then the same result should be produced.
155 .SH FILES
156 .BI "\-f" " graph.xvg" 
157 .B Input
158  xvgr/xmgr file 
159
160 .BI "\-ac" " autocorr.xvg" 
161 .B Output, Opt.
162  xvgr/xmgr file 
163
164 .BI "\-msd" " msd.xvg" 
165 .B Output, Opt.
166  xvgr/xmgr file 
167
168 .BI "\-cc" " coscont.xvg" 
169 .B Output, Opt.
170  xvgr/xmgr file 
171
172 .BI "\-dist" " distr.xvg" 
173 .B Output, Opt.
174  xvgr/xmgr file 
175
176 .BI "\-av" " average.xvg" 
177 .B Output, Opt.
178  xvgr/xmgr file 
179
180 .BI "\-ee" " errest.xvg" 
181 .B Output, Opt.
182  xvgr/xmgr file 
183
184 .BI "\-bal" " ballisitc.xvg" 
185 .B Output, Opt.
186  xvgr/xmgr file 
187
188 .BI "\-g" " fitlog.log" 
189 .B Output, Opt.
190  Log file 
191
192 .SH OTHER OPTIONS
193 .BI "\-[no]h"  "no    "
194  Print help info and quit
195
196 .BI "\-[no]version"  "no    "
197  Print version info and quit
198
199 .BI "\-nice"  " int" " 0" 
200  Set the nicelevel
201
202 .BI "\-[no]w"  "no    "
203  View output \fB .xvg\fR, \fB .xpm\fR, \fB .eps\fR and \fB .pdb\fR files
204
205 .BI "\-xvg"  " enum" " xmgrace" 
206  xvg plot formatting: \fB xmgrace\fR, \fB xmgr\fR or \fB none\fR
207
208 .BI "\-[no]time"  "yes   "
209  Expect a time in the input
210
211 .BI "\-b"  " real" " \-1    " 
212  First time to read from set
213
214 .BI "\-e"  " real" " \-1    " 
215  Last time to read from set
216
217 .BI "\-n"  " int" " 1" 
218  Read this number of sets separated by &
219
220 .BI "\-[no]d"  "no    "
221  Use the derivative
222
223 .BI "\-bw"  " real" " 0.1   " 
224  Binwidth for the distribution
225
226 .BI "\-errbar"  " enum" " none" 
227  Error bars for \fB \-av\fR: \fB none\fR, \fB stddev\fR, \fB error\fR or \fB 90\fR
228
229 .BI "\-[no]integrate"  "no    "
230  Integrate data function(s) numerically using trapezium rule
231
232 .BI "\-aver_start"  " real" " 0     " 
233  Start averaging the integral from here
234
235 .BI "\-[no]xydy"  "no    "
236  Interpret second data set as error in the y values for integrating
237
238 .BI "\-[no]regression"  "no    "
239  Perform a linear regression analysis on the data. If \fB \-xydy\fR is set a second set will be interpreted as the error bar in the Y value. Otherwise, if multiple data sets are present a multilinear regression will be performed yielding the constant A that minimize chi2 = (y \- A_0 x_0 \- A_1 x_1 \- ... \- A_N x_N)2 where now Y is the first data set in the input file and x_i the others. Do read the information at the option \fB \-time\fR.
240
241 .BI "\-[no]luzar"  "no    "
242  Do a Luzar and Chandler analysis on a correlation function and related as produced by \fB g_hbond\fR. When in addition the \fB \-xydy\fR flag is given the second and fourth column will be interpreted as errors in c(t) and n(t).
243
244 .BI "\-temp"  " real" " 298.15" 
245  Temperature for the Luzar hydrogen bonding kinetics analysis (K)
246
247 .BI "\-fitstart"  " real" " 1     " 
248  Time (ps) from which to start fitting the correlation functions in order to obtain the forward and backward rate constants for HB breaking and formation
249
250 .BI "\-fitend"  " real" " 60    " 
251  Time (ps) where to stop fitting the correlation functions in order to obtain the forward and backward rate constants for HB breaking and formation. Only with \fB \-gem\fR
252
253 .BI "\-smooth"  " real" " \-1    " 
254  If this value is = 0, the tail of the ACF will be smoothed by fitting it to an exponential function: y = A exp(\-x/tau)
255
256 .BI "\-filter"  " real" " 0     " 
257  Print the high\-frequency fluctuation after filtering with a cosine filter of this length
258
259 .BI "\-[no]power"  "no    "
260  Fit data to: b ta
261
262 .BI "\-[no]subav"  "yes   "
263  Subtract the average before autocorrelating
264
265 .BI "\-[no]oneacf"  "no    "
266  Calculate one ACF over all sets
267
268 .BI "\-acflen"  " int" " \-1" 
269  Length of the ACF, default is half the number of frames
270
271 .BI "\-[no]normalize"  "yes   "
272  Normalize ACF
273
274 .BI "\-P"  " enum" " 0" 
275  Order of Legendre polynomial for ACF (0 indicates none): \fB 0\fR, \fB 1\fR, \fB 2\fR or \fB 3\fR
276
277 .BI "\-fitfn"  " enum" " none" 
278  Fit function: \fB none\fR, \fB exp\fR, \fB aexp\fR, \fB exp_exp\fR, \fB vac\fR, \fB exp5\fR, \fB exp7\fR, \fB exp9\fR or \fB erffit\fR
279
280 .BI "\-ncskip"  " int" " 0" 
281  Skip this many points in the output file of correlation functions
282
283 .BI "\-beginfit"  " real" " 0     " 
284  Time where to begin the exponential fit of the correlation function
285
286 .BI "\-endfit"  " real" " \-1    " 
287  Time where to end the exponential fit of the correlation function, \-1 is until the end
288
289 .SH SEE ALSO
290 .BR gromacs(7)
291
292 More information about \fBGROMACS\fR is available at <\fIhttp://www.gromacs.org/\fR>.