GMX-MSD(1) | GROMACS | GMX-MSD(1) |
gmx-msd - Compute mean squared displacements
gmx msd [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]] [-o [<.xvg>]] [-mol [<.xvg>]] [-b <time>] [-e <time>] [-dt <time>] [-tu <enum>] [-fgroup <selection>] [-xvg <enum>] [-[no]rmpbc] [-[no]pbc] [-sf <file>] [-selrpos <enum>] [-seltype <enum>] [-sel <selection>] [-type <enum>] [-lateral <enum>] [-trestart <real>] [-maxtau <real>] [-beginfit <real>] [-endfit <real>]
gmx msd computes 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 -beginfit to -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, -lateral and -ten. Option -ten writes the full MSD tensor for each group, the order in the output is: trace xx yy zz yx zx zy.
If -mol is set, gmx msd plots 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. With -mol, only one index group can be selected.
The diffusion coefficient is determined by linear regression of the MSD. When -beginfit is -1, fitting starts at 10% and when -endfit is -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 -beginfit and -endfit.
By default, gmx msd compares all trajectory frames against every frame stored at -trestart intervals, so the number of frames stored scales linearly with the number of frames processed. This can lead to long analysis times and out-of-memory errors for long/large trajectories, and often the data at higher time deltas lacks sufficient sampling, often manifesting as a wobbly line on the MSD plot after a straighter region at lower time deltas. The -maxtau option can be used to cap the maximum time delta for frame comparison, which may improve performance and can be used to avoid out-of-memory issues.
Options to specify input files:
Options to specify output files:
Other options:
gmx(1)
More information about GROMACS is available at <http://www.gromacs.org/>.
2023, GROMACS development team
October 19, 2023 | 2023.3 |