Merge branch 'master' of git://git.gromacs.org/gromacs
[gromacs/adressmacs.git] / share / html / online / g_analyze.html
bloba82f66699b02df294b4ab3d51c36d0caaff7007c
1 <HTML>
2 <HEAD>
3 <TITLE>g_analyze</TITLE>
4 <LINK rel=stylesheet href="style.css" type="text/css">
5 <BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990000" alink="#FF0000">
6 <TABLE WIDTH="98%" NOBORDER >
7 <TR><TD WIDTH=400>
8 <TABLE WIDTH=400 NOBORDER>
9 <TD WIDTH=116>
10 <a href="http://www.gromacs.org/"><img SRC="../images/gmxlogo_small.png"BORDER=0 </a></td>
11 <td ALIGN=LEFT VALIGN=TOP WIDTH=280><br><h2>g_analyze</h2><font size=-1><A HREF="../online.html">Main Table of Contents</A></font><br><br></td>
12 </TABLE></TD><TD WIDTH="*" ALIGN=RIGHT VALIGN=BOTTOM><p><B>VERSION 4.5<br>
13 Thu 26 Aug 2010</B></td></tr></TABLE>
14 <HR>
15 <H3>Description</H3>
16 <p>
17 g_analyze reads an ascii file and analyzes data sets.
18 A line in the input file may start with a time
19 (see option <tt>-time</tt>) and any number of y values may follow.
20 Multiple sets can also be
21 read when they are separated by & (option <tt>-n</tt>),
22 in this case only one y value is read from each line.
23 All lines starting with # and @ are skipped.
24 All analyses can also be done for the derivative of a set
25 (option <tt>-d</tt>).<p>
26 All options, except for <tt>-av</tt> and <tt>-power</tt> assume that the
27 points are equidistant in time.<p>
28 g_analyze always shows the average and standard deviation of each
29 set. For each set it also shows the relative deviation of the third
30 and fourth cumulant from those of a Gaussian distribution with the same
31 standard deviation.<p>
32 Option <tt>-ac</tt> produces the autocorrelation function(s).<p>
33 Option <tt>-cc</tt> plots the resemblance of set i with a cosine of
34 i/2 periods. The formula is:<br>2 (int0-T y(t) cos(i pi t) dt)^2 / int0-T y(t) y(t) dt<br>
35 This is useful for principal components obtained from covariance
36 analysis, since the principal components of random diffusion are
37 pure cosines.<p>
38 Option <tt>-msd</tt> produces the mean square displacement(s).<p>
39 Option <tt>-dist</tt> produces distribution plot(s).<p>
40 Option <tt>-av</tt> produces the average over the sets.
41 Error bars can be added with the option <tt>-errbar</tt>.
42 The errorbars can represent the standard deviation, the error
43 (assuming the points are independent) or the interval containing
44 90% of the points, by discarding 5% of the points at the <a href="top.html">top</a> and
45 the bottom.<p>
46 Option <tt>-ee</tt> produces error estimates using block averaging.
47 A set is divided in a number of blocks and averages are calculated for
48 each block. The error for the total average is calculated from
49 the variance between averages of the m blocks B_i as follows:
50 error^2 = Sum (B_i - &lt;B&gt;)^2 / (m*(m-1)).
51 These errors are plotted as a function of the block size.
52 Also an analytical block average curve is plotted, assuming
53 that the autocorrelation is a sum of two exponentials.
54 The analytical curve for the block average is:<br>
55 f(t) = sigma sqrt(2/T ( a (tau1 ((exp(-t/tau1) - 1) tau1/t + 1)) +<br>
56 (1-a) (tau2 ((exp(-t/tau2) - 1) tau2/t + 1)))),<br>where T is the total time.
57 a, tau1 and tau2 are obtained by fitting f^2(t) to error^2.
58 When the actual block average is very close to the analytical curve,
59 the error is sigma*sqrt(2/T (a tau1 + (1-a) tau2)).
60 The complete derivation is given in
61 B. Hess, J. Chem. Phys. 116:209-217, 2002.<p>
62 Option <tt>-bal</tt> finds and subtracts the ultrafast "ballistic"
63 component from a hydrogen bond autocorrelation function by the fitting
64 of a sum of exponentials, as described in e.g.
65 O. Markovitch, J. Chem. Phys. 129:084505, 2008. The fastest term
66 is the one with the most negative coefficient in the exponential,
67 or with <tt>-d</tt>, the one with most negative time derivative at time 0.
68 <tt>-nbalexp</tt> sets the number of exponentials to fit.<p>
69 Option <tt>-gem</tt> fits bimolecular rate constants ka and kb
70 (and optionally kD) to the hydrogen bond autocorrelation function
71 according to the reversible geminate recombination model. Removal of
72 the ballistic component first is strongly adviced. The model is presented in
73 O. Markovitch, J. Chem. Phys. 129:084505, 2008.<p>
74 Option <tt>-filter</tt> prints the RMS high-frequency fluctuation
75 of each set and over all sets with respect to a filtered average.
76 The filter is proportional to cos(pi t/len) where t goes from -len/2
77 to len/2. len is supplied with the option <tt>-filter</tt>.
78 This filter reduces oscillations with period len/2 and len by a factor
79 of 0.79 and 0.33 respectively.<p>
80 Option <tt>-g</tt> fits the data to the function given with option
81 <tt>-fitfn</tt>.<p>
82 Option <tt>-power</tt> fits the data to b t^a, which is accomplished
83 by fitting to a t + b on <a href="log.html">log</a>-<a href="log.html">log</a> scale. All points after the first
84 zero or negative value are ignored.<p>Option <tt>-luzar</tt> performs a Luzar & Chandler kinetics analysis
85 on output from <tt><a href="g_hbond.html">g_hbond</a></tt>. The input file can be taken directly
86 from <tt><a href="g_hbond.html">g_hbond</a> -ac</tt>, and then the same result should be produced.
87 <P>
88 <H3>Files</H3>
89 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
90 <TR><TH>option</TH><TH>filename</TH><TH>type</TH><TH>description</TH></TR>
91 <TR><TD ALIGN=RIGHT> <b><tt>-f</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> graph.xvg</a></tt> </TD><TD> Input </TD><TD> xvgr/xmgr file </TD></TR>
92 <TR><TD ALIGN=RIGHT> <b><tt>-ac</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html">autocorr.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
93 <TR><TD ALIGN=RIGHT> <b><tt>-msd</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> msd.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
94 <TR><TD ALIGN=RIGHT> <b><tt>-cc</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> coscont.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
95 <TR><TD ALIGN=RIGHT> <b><tt>-dist</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> distr.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
96 <TR><TD ALIGN=RIGHT> <b><tt>-av</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> average.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
97 <TR><TD ALIGN=RIGHT> <b><tt>-ee</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> errest.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
98 <TR><TD ALIGN=RIGHT> <b><tt>-bal</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html">ballisitc.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
99 <TR><TD ALIGN=RIGHT> <b><tt>-g</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="log.html"> fitlog.log</a></tt> </TD><TD> Output, Opt. </TD><TD> Log file </TD></TR>
100 </TABLE>
102 <H3>Other options</H3>
103 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
104 <TR><TH>option</TH><TH>type</TH><TH>default</TH><TH>description</TH></TR>
105 <TR><TD ALIGN=RIGHT> <b><tt>-[no]h</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print help info and quit </TD></TD>
106 <TR><TD ALIGN=RIGHT> <b><tt>-[no]version</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print version info and quit </TD></TD>
107 <TR><TD ALIGN=RIGHT> <b><tt>-nice</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Set the nicelevel </TD></TD>
108 <TR><TD ALIGN=RIGHT> <b><tt>-[no]w</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> View output <a href="xvg.html">xvg</a>, <a href="xpm.html">xpm</a>, <a href="eps.html">eps</a> and <a href="pdb.html">pdb</a> files </TD></TD>
109 <TR><TD ALIGN=RIGHT> <b><tt>-xvg</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>xmgrace</tt> </TD><TD> <a href="xvg.html">xvg</a> plot formatting: <tt>xmgrace</tt>, <tt>xmgr</tt> or <tt>none</tt> </TD></TD>
110 <TR><TD ALIGN=RIGHT> <b><tt>-[no]time</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>yes </tt> </TD><TD> Expect a time in the input </TD></TD>
111 <TR><TD ALIGN=RIGHT> <b><tt>-b</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> First time to read from set </TD></TD>
112 <TR><TD ALIGN=RIGHT> <b><tt>-e</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> Last time to read from set </TD></TD>
113 <TR><TD ALIGN=RIGHT> <b><tt>-n</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>1</tt> </TD><TD> Read # sets separated by & </TD></TD>
114 <TR><TD ALIGN=RIGHT> <b><tt>-[no]d</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Use the derivative </TD></TD>
115 <TR><TD ALIGN=RIGHT> <b><tt>-bw</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0.1 </tt> </TD><TD> Binwidth for the distribution </TD></TD>
116 <TR><TD ALIGN=RIGHT> <b><tt>-errbar</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>none</tt> </TD><TD> Error bars for -av: <tt>none</tt>, <tt>stddev</tt>, <tt>error</tt> or <tt>90</tt> </TD></TD>
117 <TR><TD ALIGN=RIGHT> <b><tt>-[no]integrate</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Integrate data function(s) numerically using trapezium rule </TD></TD>
118 <TR><TD ALIGN=RIGHT> <b><tt>-aver_start</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Start averaging the integral from here </TD></TD>
119 <TR><TD ALIGN=RIGHT> <b><tt>-[no]xydy</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Interpret second data set as error in the y values for integrating </TD></TD>
120 <TR><TD ALIGN=RIGHT> <b><tt>-[no]regression</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Perform a linear regression analysis on the data. If -xydy 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 chi^2 = (y - A0 x0 - A1 x1 - ... - AN xN)^2 where now Y is the first data set in the input file and xi the others. Do read the information at the option <tt>-time</tt>. </TD></TD>
121 <TR><TD ALIGN=RIGHT> <b><tt>-[no]luzar</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Do a Luzar and Chandler analysis on a correlation function and related as produced by <a href="g_hbond.html">g_hbond</a>. When in addition the -xydy flag is given the second and fourth column will be interpreted as errors in c(t) and n(t). </TD></TD>
122 <TR><TD ALIGN=RIGHT> <b><tt>-temp</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>298.15</tt> </TD><TD> Temperature for the Luzar hydrogen bonding kinetics analysis </TD></TD>
123 <TR><TD ALIGN=RIGHT> <b><tt>-fitstart</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>1 </tt> </TD><TD> 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 </TD></TD>
124 <TR><TD ALIGN=RIGHT> <b><tt>-fitend</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>60 </tt> </TD><TD> 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 -gem </TD></TD>
125 <TR><TD ALIGN=RIGHT> <b><tt>-smooth</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> If &gt;= 0, the tail of the ACF will be smoothed by fitting it to an exponential function: y = A exp(-x/tau) </TD></TD>
126 <TR><TD ALIGN=RIGHT> <b><tt>-filter</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Print the high-frequency fluctuation after filtering with a cosine filter of length # </TD></TD>
127 <TR><TD ALIGN=RIGHT> <b><tt>-[no]power</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Fit data to: b t^a </TD></TD>
128 <TR><TD ALIGN=RIGHT> <b><tt>-[no]subav</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>yes </tt> </TD><TD> Subtract the average before autocorrelating </TD></TD>
129 <TR><TD ALIGN=RIGHT> <b><tt>-[no]oneacf</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Calculate one ACF over all sets </TD></TD>
130 <TR><TD ALIGN=RIGHT> <b><tt>-acflen</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>-1</tt> </TD><TD> Length of the ACF, default is half the number of frames </TD></TD>
131 <TR><TD ALIGN=RIGHT> <b><tt>-[no]normalize</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>yes </tt> </TD><TD> Normalize ACF </TD></TD>
132 <TR><TD ALIGN=RIGHT> <b><tt>-P</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Order of Legendre polynomial for ACF (0 indicates none): <tt>0</tt>, <tt>1</tt>, <tt>2</tt> or <tt>3</tt> </TD></TD>
133 <TR><TD ALIGN=RIGHT> <b><tt>-fitfn</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>none</tt> </TD><TD> Fit function: <tt>none</tt>, <tt>exp</tt>, <tt>aexp</tt>, <tt>exp_exp</tt>, <tt>vac</tt>, <tt>exp5</tt>, <tt>exp7</tt> or <tt>exp9</tt> </TD></TD>
134 <TR><TD ALIGN=RIGHT> <b><tt>-ncskip</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Skip N points in the output file of correlation functions </TD></TD>
135 <TR><TD ALIGN=RIGHT> <b><tt>-beginfit</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Time where to begin the exponential fit of the correlation function </TD></TD>
136 <TR><TD ALIGN=RIGHT> <b><tt>-endfit</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> Time where to end the exponential fit of the correlation function, -1 is until the end </TD></TD>
137 </TABLE>
139 <hr>
140 <div ALIGN=RIGHT>
141 <font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
142 <font size="-1"><a href="mailto:gromacs@gromacs.org">gromacs@gromacs.org</a></font><br>
143 </div>
144 </BODY>