g_analyze

Main Table of Contents

VERSION 3.1
Thu 28 Feb 2002


Description

g_analyze reads an ascii file and analyzes data sets. A line in the input file may start with a time (see option -time) and any number of y values may follow. Multiple sets can also be read when they are seperated by & (option -n), in this case only one y value is read from each line. All lines starting with # and @ are skipped. All analyses can also be done for the derivative of a set (option -d).

All options, except for -av and -power assume that the points are equidistant in time.

g_analyze always shows the average and standard deviation of each set. For each set it also shows the relative deviation of the third and forth cumulant from those of a Gaussian distribution with the same standard deviation.

Option -ac produces the autocorrelation function(s).

Option -cc plots the resemblance of set i with a cosine of i/2 periods. The formula is:
2 (int0-T y(t) cos(pi t/i) dt)^2 / int0-T y(t) y(t) dt
This is useful for principal components obtained from covariance analysis, since the principal components of random diffusion are pure cosines.

Option -msd produces the mean square displacement(s).

Option -dist produces distribution plot(s).

Option -av produces the average over the sets. Error bars can be added with the option -errbar. The errorbars can represent the standard deviation, the error (assuming the points are independent) or the interval containing 90% of the points, by discarding 5% of the points at the top and the bottom.

Option -ee produces error estimates using block averaging. A set is divided in a number of blocks and averages are calculated for each block. The error for the total average is calculated from the variance between averages of the m blocks B_i as follows: error^2 = Sum (B_i - <B>)^2 / (m*(m-1)). These errors are plotted as a function of the block size. Also an analytical block average curve is plotted, assuming that the autocorrelation is a sum of two exponentials. The analytical curve for the block average BA is:
BA(t) = sigma sqrt(2/T ( a (tau1 ((exp(-t/tau1) - 1) tau1/t + 1)) +
(1-a) (tau2 ((exp(-t/tau2) - 1) tau2/t + 1)))),
where T is the total time. a, tau1 and tau2 are obtained by fitting BA(t) to the calculated block average. When the actual block average is very close to the analytical curve, the error is sigma*sqrt(2/T (a tau1 + (1-a) tau2)).

Option -power fits the data to b t^a, which is accomplished by fitting to a t + b on log-log scale. All points after the first zero or negative value are ignored.

Files

optionfilenametypedescription
-f graph.xvg Input xvgr/xmgr file
-ac autocorr.xvg Output, Opt. xvgr/xmgr file
-msd msd.xvg Output, Opt. xvgr/xmgr file