Properly finalize MPI on mdrun -version. Fixes #1313
[gromacs.git] / share / html / online / g_energy.html
blobf040cfac6f4e593fbadbb9808afc77aa8b682008
1 <HTML>
2 <HEAD>
3 <TITLE>g_energy</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_energy</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.6<br>
13 Sat 19 Jan 2013</B></td></tr></TABLE>
14 <HR>
15 <H3>Description</H3>
16 <p>
17 <tt>g_energy</tt> extracts energy components or distance restraint
18 data from an energy file. The user is prompted to interactively
19 select the desired energy terms.<p>
20 Average, RMSD, and drift are calculated with full precision from the
21 simulation (see printed manual). Drift is calculated by performing
22 a least-squares fit of the data to a straight line. The reported total drift
23 is the difference of the fit at the first and last point.
24 An error estimate of the average is given based on a block averages
25 over 5 blocks using the full-precision averages. The error estimate
26 can be performed over multiple block lengths with the options
27 <tt>-nbmin</tt> and <tt>-nbmax</tt>.
28 <b>Note</b> that in most cases the energy files contains averages over all
29 MD steps, or over many more points than the number of frames in
30 energy file. This makes the <tt>g_energy</tt> statistics output more accurate
31 than the <tt>.<a href="xvg.html">xvg</a></tt> output. When exact averages are not present in the energy
32 file, the statistics mentioned above are simply over the single, per-frame
33 energy values.<p>
34 The term fluctuation gives the RMSD around the least-squares fit.<p>
35 Some fluctuation-dependent properties can be calculated provided
36 the correct energy terms are selected, and that the command line option
37 <tt>-fluct_props</tt> is given. The following properties
38 will be computed:<br>
39 Property Energy terms needed<br>
40 ---------------------------------------------------<br>
41 Heat capacity C_p (NPT sims): Enthalpy, Temp <br>
42 Heat capacity C_v (NVT sims): Etot, Temp <br>
43 Thermal expansion coeff. (NPT): Enthalpy, Vol, Temp<br>
44 Isothermal compressibility: Vol, Temp <br>
45 Adiabatic bulk modulus: Vol, Temp <br>
46 ---------------------------------------------------<br>
47 You always need to set the number of molecules <tt>-nmol</tt>.
48 The C_p/C_v computations do <b>not</b> include any corrections
49 for quantum effects. Use the <tt>g_dos</tt> program if you need that (and you do).<p>When the <tt>-viol</tt> option is set, the time averaged
50 violations are plotted and the running time-averaged and
51 instantaneous sum of violations are recalculated. Additionally
52 running time-averaged and instantaneous distances between
53 selected pairs can be plotted with the <tt>-pairs</tt> option.<p>
54 Options <tt>-ora</tt>, <tt>-ort</tt>, <tt>-oda</tt>, <tt>-odr</tt> and
55 <tt>-odt</tt> are used for analyzing orientation restraint data.
56 The first two options plot the orientation, the last three the
57 deviations of the orientations from the experimental values.
58 The options that end on an 'a' plot the average over time
59 as a function of restraint. The options that end on a 't'
60 prompt the user for restraint label numbers and plot the data
61 as a function of time. Option <tt>-odr</tt> plots the RMS
62 deviation as a function of restraint.
63 When the run used time or ensemble averaged orientation restraints,
64 option <tt>-orinst</tt> can be used to analyse the instantaneous,
65 not ensemble-averaged orientations and deviations instead of
66 the time and ensemble averages.<p>
67 Option <tt>-oten</tt> plots the eigenvalues of the molecular order
68 tensor for each orientation restraint experiment. With option
69 <tt>-ovec</tt> also the eigenvectors are plotted.<p>
70 Option <tt>-odh</tt> extracts and plots the free energy data
71 (Hamiltoian differences and/or the Hamiltonian derivative dhdl)
72 from the <tt>ener.<a href="edr.html">edr</a></tt> file.<p>
73 With <tt>-fee</tt> an estimate is calculated for the free-energy
74 difference with an ideal gas state: <br>
75 &Delta; A = A(N,V,T) - A_idealgas(N,V,T) = kT ln(<exp(U_pot/kT)>)<br>
76 &Delta; G = G(N,p,T) - G_idealgas(N,p,T) = kT ln(<exp(U_pot/kT)>)<br>
77 where k is Boltzmann's constant, T is set by <tt>-fetemp</tt> and
78 the average is over the ensemble (or time in a trajectory).
79 Note that this is in principle
80 only correct when averaging over the whole (Boltzmann) ensemble
81 and using the potential energy. This also allows for an entropy
82 estimate using:<br>
83 &Delta; S(N,V,T) = S(N,V,T) - S_idealgas(N,V,T) = (<U_pot> - &Delta; A)/T<br>
84 &Delta; S(N,p,T) = S(N,p,T) - S_idealgas(N,p,T) = (<U_pot> + pV - &Delta; G)/T
85 <p>
86 When a second energy file is specified (<tt>-f2</tt>), a free energy
87 difference is calculated <br> dF = -kT ln(<exp(-(E_B-E_A)/kT)>_A) ,
88 where E_A and E_B are the energies from the first and second energy
89 files, and the average is over the ensemble A. The running average
90 of the free energy difference is printed to a file specified by <tt>-ravg</tt>.
91 <b>Note</b> that the energies must both be calculated from the same trajectory.
92 <P>
93 <H3>Files</H3>
94 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
95 <TR><TH>option</TH><TH>filename</TH><TH>type</TH><TH>description</TH></TR>
96 <TR><TD ALIGN=RIGHT> <b><tt>-f</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="edr.html"> ener.edr</a></tt> </TD><TD> Input </TD><TD> Energy file </TD></TR>
97 <TR><TD ALIGN=RIGHT> <b><tt>-f2</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="edr.html"> ener.edr</a></tt> </TD><TD> Input, Opt. </TD><TD> Energy file </TD></TR>
98 <TR><TD ALIGN=RIGHT> <b><tt>-s</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html"> topol.tpr</a></tt> </TD><TD> Input, Opt. </TD><TD> Run input file: <a href="tpr.html">tpr</a> <a href="tpb.html">tpb</a> <a href="tpa.html">tpa</a> </TD></TR>
99 <TR><TD ALIGN=RIGHT> <b><tt>-o</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> energy.xvg</a></tt> </TD><TD> Output </TD><TD> xvgr/xmgr file </TD></TR>
100 <TR><TD ALIGN=RIGHT> <b><tt>-viol</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html">violaver.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
101 <TR><TD ALIGN=RIGHT> <b><tt>-pairs</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> pairs.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
102 <TR><TD ALIGN=RIGHT> <b><tt>-ora</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> orienta.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
103 <TR><TD ALIGN=RIGHT> <b><tt>-ort</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> orientt.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
104 <TR><TD ALIGN=RIGHT> <b><tt>-oda</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> orideva.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
105 <TR><TD ALIGN=RIGHT> <b><tt>-odr</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> oridevr.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
106 <TR><TD ALIGN=RIGHT> <b><tt>-odt</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> oridevt.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
107 <TR><TD ALIGN=RIGHT> <b><tt>-oten</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> oriten.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
108 <TR><TD ALIGN=RIGHT> <b><tt>-corr</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> enecorr.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
109 <TR><TD ALIGN=RIGHT> <b><tt>-vis</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> visco.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
110 <TR><TD ALIGN=RIGHT> <b><tt>-ravg</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html">runavgdf.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
111 <TR><TD ALIGN=RIGHT> <b><tt>-odh</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> dhdl.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
112 </TABLE>
114 <H3>Other options</H3>
115 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
116 <TR><TH>option</TH><TH>type</TH><TH>default</TH><TH>description</TH></TR>
117 <TR><TD ALIGN=RIGHT> <b><tt>-[no]h</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print help info and quit </TD></TD>
118 <TR><TD ALIGN=RIGHT> <b><tt>-[no]version</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print version info and quit </TD></TD>
119 <TR><TD ALIGN=RIGHT> <b><tt>-nice</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>19</tt> </TD><TD> Set the nicelevel </TD></TD>
120 <TR><TD ALIGN=RIGHT> <b><tt>-b</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> First frame (ps) to read from trajectory </TD></TD>
121 <TR><TD ALIGN=RIGHT> <b><tt>-e</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Last frame (ps) to read from trajectory </TD></TD>
122 <TR><TD ALIGN=RIGHT> <b><tt>-[no]w</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> View output <tt>.<a href="xvg.html">xvg</a></tt>, <tt>.<a href="xpm.html">xpm</a></tt>, <tt>.<a href="eps.html">eps</a></tt> and <tt>.<a href="pdb.html">pdb</a></tt> files </TD></TD>
123 <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>
124 <TR><TD ALIGN=RIGHT> <b><tt>-[no]fee</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Do a free energy estimate </TD></TD>
125 <TR><TD ALIGN=RIGHT> <b><tt>-fetemp</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>300 </tt> </TD><TD> Reference temperature for free energy calculation </TD></TD>
126 <TR><TD ALIGN=RIGHT> <b><tt>-zero</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> Subtract a zero-point energy </TD></TD>
127 <TR><TD ALIGN=RIGHT> <b><tt>-[no]sum</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Sum the energy terms selected rather than display them all </TD></TD>
128 <TR><TD ALIGN=RIGHT> <b><tt>-[no]dp</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Print energies in high precision </TD></TD>
129 <TR><TD ALIGN=RIGHT> <b><tt>-nbmin</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>5</tt> </TD><TD> Minimum number of blocks for error estimate </TD></TD>
130 <TR><TD ALIGN=RIGHT> <b><tt>-nbmax</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>5</tt> </TD><TD> Maximum number of blocks for error estimate </TD></TD>
131 <TR><TD ALIGN=RIGHT> <b><tt>-[no]mutot</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Compute the total dipole moment from the components </TD></TD>
132 <TR><TD ALIGN=RIGHT> <b><tt>-skip</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Skip number of frames between data points </TD></TD>
133 <TR><TD ALIGN=RIGHT> <b><tt>-[no]aver</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Also print the exact average and rmsd stored in the energy frames (only when 1 term is requested) </TD></TD>
134 <TR><TD ALIGN=RIGHT> <b><tt>-nmol</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>1</tt> </TD><TD> Number of molecules in your sample: the energies are divided by this number </TD></TD>
135 <TR><TD ALIGN=RIGHT> <b><tt>-[no]fluct_props</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Compute properties based on energy fluctuations, like heat capacity </TD></TD>
136 <TR><TD ALIGN=RIGHT> <b><tt>-[no]driftcorr</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Useful only for calculations of fluctuation properties. The drift in the observables will be subtracted before computing the fluctuation properties. </TD></TD>
137 <TR><TD ALIGN=RIGHT> <b><tt>-[no]fluc</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Calculate autocorrelation of energy fluctuations rather than energy itself </TD></TD>
138 <TR><TD ALIGN=RIGHT> <b><tt>-[no]orinst</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Analyse instantaneous orientation data </TD></TD>
139 <TR><TD ALIGN=RIGHT> <b><tt>-[no]ovec</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Also plot the eigenvectors with <tt>-oten</tt> </TD></TD>
140 <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>
141 <TR><TD ALIGN=RIGHT> <b><tt>-[no]normalize</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>yes </tt> </TD><TD> Normalize ACF </TD></TD>
142 <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>
143 <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>, <tt>exp9</tt> or <tt>erffit</tt> </TD></TD>
144 <TR><TD ALIGN=RIGHT> <b><tt>-ncskip</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Skip this many points in the output file of correlation functions </TD></TD>
145 <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>
146 <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>
147 </TABLE>
149 <hr>
150 <div ALIGN=RIGHT>
151 <font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
152 <font size="-1"><a href="mailto:gromacs@gromacs.org">gromacs@gromacs.org</a></font><br>
153 </div>
154 </BODY>