---
name: "gmx-rmsdist"
section: "1"
platform: "linux"
package: "gromacs-data"
version: "2025.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gmx-rmsdist"
---

# gmx-rmsdist(1)

Calculate atom pair distances averaged with power -2, -3 or -6

## NAME

gmx-rmsdist - Calculate atom pair distances averaged with power -2, -3 or -6

## SYNOPSIS

```
gmx rmsdist [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
            [-equiv [<.dat>]] [-o [<.xvg>]] [-rms [<.xpm>]]
            [-scl [<.xpm>]] [-mean [<.xpm>]] [-nmr3 [<.xpm>]]
            [-nmr6 [<.xpm>]] [-noe [<.dat>]] [-b <time>] [-e <time>]
            [-dt <time>] [-[no]w] [-xvg <enum>] [-nlevels <int>]
            [-max <real>] [-[no]sumh] [-[no]pbc]
```

## DESCRIPTION

**gmx rmsdist** computes the root mean square deviation of atom distances, which has the advantage that no fit is needed like in standard RMS deviation as computed by *gmx rms*. The reference structure is taken from the structure file. The RMSD at time t is calculated as the RMS of the differences in distance between atom-pairs in the reference structure and the structure at time t.

**gmx rmsdist** can also produce matrices of the rms distances, rms distances scaled with the mean distance and the mean distances and matrices with NMR averaged distances (1/r^3 and 1/r^6 averaging). Finally, lists of atom pairs with 1/r^3 and 1/r^6 averaged distance below the maximum distance (**-max**, which will default to 0.6 in this case) can be generated, by default averaging over equivalent hydrogens (all triplets of hydrogens named \*\[123\]). Additionally a list of equivalent atoms can be supplied (**-equiv**), each line containing a set of equivalent atoms specified as residue number and name and atom name; e.g.:

**HB\* 3 SER  HB1 3 SER  HB2**

Residue and atom names must exactly match those in the structure file, including case. Specifying non-sequential atoms is undefined.

## OPTIONS

Options to specify input files:

- **-f \[\<.xtc/.trr/...\>\] (traj.xtc)**

  Trajectory: *xtc* *trr* *cpt* *gro* *g96* *pdb* *tng*

- **-s \[\<.tpr/.gro/...\>\] (topol.tpr)**

  Structure+mass(db): *tpr* *gro* *g96* *pdb* brk ent

- **-n \[\<.ndx\>\] (index.ndx) (Optional)**

  Index file

- **-equiv \[\<.dat\>\] (equiv.dat) (Optional)**

  Generic data file

Options to specify output files:

- **-o \[\<.xvg\>\] (distrmsd.xvg)**

  xvgr/xmgr file

- **-rms \[\<.xpm\>\] (rmsdist.xpm) (Optional)**

  X PixMap compatible matrix file

- **-scl \[\<.xpm\>\] (rmsscale.xpm) (Optional)**

  X PixMap compatible matrix file

- **-mean \[\<.xpm\>\] (rmsmean.xpm) (Optional)**

  X PixMap compatible matrix file

- **-nmr3 \[\<.xpm\>\] (nmr3.xpm) (Optional)**

  X PixMap compatible matrix file

- **-nmr6 \[\<.xpm\>\] (nmr6.xpm) (Optional)**

  X PixMap compatible matrix file

- **-noe \[\<.dat\>\] (noe.dat) (Optional)**

  Generic data file

Other options:

- **-b \<time\> (0)**

  Time of first frame to read from trajectory (default unit ps)

- **-e \<time\> (0)**

  Time of last frame to read from trajectory (default unit ps)

- **-dt \<time\> (0)**

  Only use frame when t MOD dt = first time (default unit ps)

- **-\[no\]w (no)**

  View output *.xvg*, *.xpm*, *.eps* and *.pdb* files

- **-xvg \<enum\> (xmgrace)**

  xvg plot formatting: xmgrace, xmgr, none

- **-nlevels \<int\> (40)**

  Discretize RMS in this number of levels

- **-max \<real\> (-1)**

  Maximum level in matrices

- **-\[no\]sumh (yes)**

  Average distance over equivalent hydrogens

- **-\[no\]pbc (yes)**

  Use periodic boundary conditions when computing distances

## SEE ALSO

**[gmx(1)](/gmx/1.md)**

More information about GROMACS is available at \<*http://www.gromacs.org/*\>.

## COPYRIGHT

2025, GROMACS development team
