Properly finalize MPI on mdrun -version. Fixes #1313
[gromacs.git] / share / html / online / g_msd.html
blob93dc62febfb2c241e238408b21b0c05d2037ce6a
1 <HTML>
2 <HEAD>
3 <TITLE>g_msd</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_msd</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_msd</tt> computes the mean square displacement (MSD) of atoms from
18 a set of initial positions. This provides an easy way to compute
19 the diffusion constant using the Einstein relation.
20 The time between the reference points for the MSD calculation
21 is set with <tt>-trestart</tt>.
22 The diffusion constant is calculated by least squares fitting a
23 straight line (D*t + c) through the MSD(t) from <tt>-beginfit</tt> to
24 <tt>-endfit</tt> (note that t is time from the reference positions,
25 not simulation time). An error estimate given, which is the difference
26 of the diffusion coefficients obtained from fits over the two halves
27 of the fit interval.<p>
28 There are three, mutually exclusive, options to determine different
29 types of mean square displacement: <tt>-type</tt>, <tt>-lateral</tt>
30 and <tt>-ten</tt>. Option <tt>-ten</tt> writes the full MSD tensor for
31 each group, the order in the output is: trace xx yy zz yx zx zy.<p>
32 If <tt>-mol</tt> is set, <tt>g_msd</tt> plots the MSD for individual molecules
33 (including making molecules whole across periodic boundaries):
34 for each individual molecule a diffusion constant is computed for
35 its center of mass. The chosen index group will be split into
36 molecules.<p>
37 The default way to calculate a MSD is by using mass-weighted averages.
38 This can be turned off with <tt>-nomw</tt>.<p>
39 With the option <tt>-rmcomm</tt>, the center of mass motion of a
40 specific group can be removed. For trajectories produced with
41 GROMACS this is usually not necessary,
42 as <tt><a href="mdrun.html">mdrun</a></tt> usually already removes the center of mass motion.
43 When you use this option be sure that the whole system is stored
44 in the trajectory file.<p>
45 The diffusion coefficient is determined by linear regression of the MSD,
46 where, unlike for the normal output of D, the times are weighted
47 according to the number of reference points, i.e. short times have
48 a higher weight. Also when <tt>-beginfit</tt>=-1,fitting starts at 10%
49 and when <tt>-endfit</tt>=-1, fitting goes to 90%.
50 Using this option one also gets an accurate error estimate
51 based on the statistics between individual molecules.
52 Note that this diffusion coefficient and error estimate are only
53 accurate when the MSD is completely linear between
54 <tt>-beginfit</tt> and <tt>-endfit</tt>.<p>
55 Option <tt>-<a href="pdb.html">pdb</a></tt> writes a <tt>.<a href="pdb.html">pdb</a></tt> file with the coordinates of the frame
56 at time <tt>-tpdb</tt> with in the B-factor field the square root of
57 the diffusion coefficient of the molecule.
58 This option implies option <tt>-mol</tt>.
59 <P>
60 <H3>Files</H3>
61 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
62 <TR><TH>option</TH><TH>filename</TH><TH>type</TH><TH>description</TH></TR>
63 <TR><TD ALIGN=RIGHT> <b><tt>-f</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html"> traj.xtc</a></tt> </TD><TD> Input </TD><TD> Trajectory: <a href="xtc.html">xtc</a> <a href="trr.html">trr</a> <a href="trj.html">trj</a> <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> cpt </TD></TR>
64 <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 </TD><TD> Structure+mass(db): <a href="tpr.html">tpr</a> <a href="tpb.html">tpb</a> <a href="tpa.html">tpa</a> <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> </TD></TR>
65 <TR><TD ALIGN=RIGHT> <b><tt>-n</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="ndx.html"> index.ndx</a></tt> </TD><TD> Input, Opt. </TD><TD> Index file </TD></TR>
66 <TR><TD ALIGN=RIGHT> <b><tt>-o</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html"> msd.xvg</a></tt> </TD><TD> Output </TD><TD> xvgr/xmgr file </TD></TR>
67 <TR><TD ALIGN=RIGHT> <b><tt>-mol</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="xvg.html">diff_mol.xvg</a></tt> </TD><TD> Output, Opt. </TD><TD> xvgr/xmgr file </TD></TR>
68 <TR><TD ALIGN=RIGHT> <b><tt>-pdb</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="pdb.html">diff_mol.pdb</a></tt> </TD><TD> Output, Opt. </TD><TD> Protein data bank file </TD></TR>
69 </TABLE>
70 <P>
71 <H3>Other options</H3>
72 <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
73 <TR><TH>option</TH><TH>type</TH><TH>default</TH><TH>description</TH></TR>
74 <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>
75 <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>
76 <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>
77 <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>
78 <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>
79 <TR><TD ALIGN=RIGHT> <b><tt>-tu</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>ps</tt> </TD><TD> Time unit: <tt>fs</tt>, <tt>ps</tt>, <tt>ns</tt>, <tt>us</tt>, <tt>ms</tt> or <tt>s</tt> </TD></TD>
80 <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>
81 <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>
82 <TR><TD ALIGN=RIGHT> <b><tt>-type</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>no</tt> </TD><TD> Compute diffusion coefficient in one direction: <tt>no</tt>, <tt>x</tt>, <tt>y</tt> or <tt>z</tt> </TD></TD>
83 <TR><TD ALIGN=RIGHT> <b><tt>-lateral</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>no</tt> </TD><TD> Calculate the lateral diffusion in a plane perpendicular to: <tt>no</tt>, <tt>x</tt>, <tt>y</tt> or <tt>z</tt> </TD></TD>
84 <TR><TD ALIGN=RIGHT> <b><tt>-[no]ten</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Calculate the full tensor </TD></TD>
85 <TR><TD ALIGN=RIGHT> <b><tt>-ngroup</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>1</tt> </TD><TD> Number of groups to calculate MSD for </TD></TD>
86 <TR><TD ALIGN=RIGHT> <b><tt>-[no]mw</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>yes </tt> </TD><TD> Mass weighted MSD </TD></TD>
87 <TR><TD ALIGN=RIGHT> <b><tt>-[no]rmcomm</tt></b> </TD><TD ALIGN=RIGHT> bool </TD><TD ALIGN=RIGHT> <tt>no </tt> </TD><TD> Remove center of mass motion </TD></TD>
88 <TR><TD ALIGN=RIGHT> <b><tt>-tpdb</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>0 </tt> </TD><TD> The frame to use for option <tt>-<a href="pdb.html">pdb</a></tt> (ps) </TD></TD>
89 <TR><TD ALIGN=RIGHT> <b><tt>-trestart</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>10 </tt> </TD><TD> Time between restarting points in trajectory (ps) </TD></TD>
90 <TR><TD ALIGN=RIGHT> <b><tt>-beginfit</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> Start time for fitting the MSD (ps), -1 is 10% </TD></TD>
91 <TR><TD ALIGN=RIGHT> <b><tt>-endfit</tt></b> </TD><TD ALIGN=RIGHT> time </TD><TD ALIGN=RIGHT> <tt>-1 </tt> </TD><TD> End time for fitting the MSD (ps), -1 is 90% </TD></TD>
92 </TABLE>
93 <P>
94 <hr>
95 <div ALIGN=RIGHT>
96 <font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
97 <font size="-1"><a href="mailto:gromacs@gromacs.org">gromacs@gromacs.org</a></font><br>
98 </div>
99 </BODY>