Provided by: gromacs-data_4.6.5-1build1_all

**NAME**

g_msd - calculates mean square displacementsVERSION4.6.5

**SYNOPSIS**

g_msd-ftraj.xtc-stopol.tpr-nindex.ndx-omsd.xvg-moldiff_mol.xvg-pdbdiff_mol.pdb-[no]h-[no]version-niceint-btime-etime-tuenum-[no]w-xvgenum-typeenum-lateralenum-[no]ten-ngroupint-[no]mw-[no]rmcomm-tpdbtime-trestarttime-beginfittime-endfittime

**DESCRIPTION**

g_msdcomputes the mean square displacement (MSD) of atoms from a set of initial positions. This provides an easy way to compute the diffusion constant using the Einstein relation. The time between the reference points for the MSD calculation is set with-trestart. The diffusion constant is calculated by least squares fitting a straight line (D*t + c) through the MSD(t) from-beginfitto-endfit(note that t is time from the reference positions, not simulation time). An error estimate given, which is the difference of the diffusion coefficients obtained from fits over the two halves of the fit interval. There are three, mutually exclusive, options to determine different types of mean square displacement:-type,-lateraland-ten. Option-tenwrites the full MSD tensor for each group, the order in the output is: trace xx yy zz yx zx zy. If-molis set,g_msdplots the MSD for individual molecules (including making molecules whole across periodic boundaries): for each individual molecule a diffusion constant is computed for its center of mass. The chosen index group will be split into molecules. The default way to calculate a MSD is by using mass-weighted averages. This can be turned off with-nomw. With the option-rmcomm, the center of mass motion of a specific group can be removed. For trajectories produced with GROMACS this is usually not necessary, asmdrunusually already removes the center of mass motion. When you use this option be sure that the whole system is stored in the trajectory file. The diffusion coefficient is determined by linear regression of the MSD, where, unlike for the normal output of D, the times are weighted according to the number of reference points, i.e. short times have a higher weight. Also when-beginfit=-1,fitting starts at 10% and when-endfit=-1, fitting goes to 90%. Using this option one also gets an accurate error estimate based on the statistics between individual molecules. Note that this diffusion coefficient and error estimate are only accurate when the MSD is completely linear between-beginfitand-endfit. Option-pdbwrites a.pdbfile with the coordinates of the frame at time-tpdbwith in the B-factor field the square root of the diffusion coefficient of the molecule. This option implies option-mol.

**FILES**

-ftraj.xtcInputTrajectory: xtc trr trj gro g96 pdb cpt-stopol.tprInputStructure+mass(db): tpr tpb tpa gro g96 pdb-nindex.ndxInput,Opt.Index file-omsd.xvgOutputxvgr/xmgr file-moldiff_mol.xvgOutput,Opt.xvgr/xmgr file-pdbdiff_mol.pdbOutput,Opt.Protein data bank file

**OTHER** **OPTIONS**

-[no]hnoPrint help info and quit-[no]versionnoPrint version info and quit-niceint19Set the nicelevel-btime0First frame (ps) to read from trajectory-etime0Last frame (ps) to read from trajectory-tuenumpsTime unit:fs,ps,ns,us,msors-[no]wnoView output.xvg,.xpm,.epsand.pdbfiles-xvgenumxmgracexvg plot formatting:xmgrace,xmgrornone-typeenumnoCompute diffusion coefficient in one direction:no,x,yorz-lateralenumnoCalculate the lateral diffusion in a plane perpendicular to:no,x,yorz-[no]tennoCalculate the full tensor-ngroupint1Number of groups to calculate MSD for-[no]mwyesMass weighted MSD-[no]rmcommnoRemove center of mass motion-tpdbtime0The frame to use for option-pdb(ps)-trestarttime10Time between restarting points in trajectory (ps)-beginfittime-1Start time for fitting the MSD (ps), -1 is 10%-endfittime-1End time for fitting the MSD (ps), -1 is 90%

**SEE** **ALSO**

gromacs(7)More information aboutGROMACSis available at <http://www.gromacs.org/>. Mon 2 Dec 2013 g_msd(1)