GMX-MINDIST(1)

✨ gmx-mindist ✨

okay bestie, welcome to gmx-mindist from the GROMACS fam (section 1, if you're keeping track) πŸ’– she's the one you call when you need to know how close two groups of atoms are getting. respectfully. πŸ‘€


πŸŽ€ NAME πŸŽ€

gmx-mindist β€” calculate the minimum distance between two groups

Like literally. That's her whole job. And she ate. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

gmx mindist [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
            [-od [<.xvg>]] [-on [<.xvg>]] [-o [<.out>]]
            [-ox [<.xtc/.trr/...>]] [-or [<.xvg>]] [-b <time>]
            [-e <time>] [-dt <time>] [-tu <enum>] [-[no]w]
            [-xvg <enum>] [-[no]matrix] [-[no]max] [-d <real>]
            [-[no]group] [-[no]pi] [-[no]split] [-ng <int>]
            [-[no]pbc] [-[no]respertime] [-[no]printresname]

🌸 DESCRIPTION 🌸

so gmx mindist computes the distance between one group and a number of other groups. she's social like that. 🫢

and she gives you two things (into two separate output files, because she's organized):

  • the minimum distance between any pair of atoms from the respective groups
  • the number of contacts within a given distance

lowkey iconic. two for one. πŸ’…

With the -group option, a contact of an atom in another group with multiple atoms in the first group gets counted as one contact instead of as multiple contacts. so no double-dipping, we count it once, periodt. βœ‹

With -or, minimum distances to each residue in the first group are determined and plotted as a function of residue number. per-residue breakdown, we love to see it. πŸ’–

With option -pi the minimum distance of a group to its periodic image is plotted. this is useful for checking if a protein has seen its periodic image during a simulation (yes bestie, proteins get glances too). Only one shift in each direction is considered, giving a total of 26 shifts. ⭐

note that periodicity information is required from the file supplied with -s, either as a .tpr file or a .pdb file with CRYST1 fields. no periodicity info = no vibe. 🚫

it also plots the maximum distance within the group and the lengths of the three box vectors. she's thorough. she's giving main character energy. πŸ‘‘

Also gmx distance and gmx pairdist calculate distances. just so you know your options, iykyk. 🌈


πŸ’œ OPTIONS πŸ’œ

πŸ“ Options to specify input files:

  • -f [<.xtc/.trr/...>] (traj.xtc) β€” Trajectory: xtc trr cpt gro g96 pdb tng h5md
  • -s [<.tpr/.gro/...>] (topol.tpr) (Optional) β€” Structure+mass(db): tpr gro g96 pdb brk ent
  • -n [<.ndx>] (index.ndx) (Optional) β€” Index file

🧚 Options to specify output files:

  • -od [<.xvg>] (mindist.xvg) β€” xvgr/xmgr file
  • -on [<.xvg>] (numcont.xvg) (Optional) β€” xvgr/xmgr file
  • -o [<.out>] (atm-pair.out) (Optional) β€” Generic output file
  • -ox [<.xtc/.trr/...>] (mindist.xtc) (Optional) β€” Trajectory: xtc trr gro g96 pdb tng h5md
  • -or [<.xvg>] (mindistres.xvg) (Optional) β€” xvgr/xmgr 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)
  • -tu <enum> (ps) β€” Unit for time values: fs, ps, ns, us, ms, s
  • -[no]w (no) β€” View output .xvg, .xpm, .eps and .pdb files
  • -xvg <enum> (xmgrace) β€” xvg plot formatting: xmgrace, xmgr, none
  • -[no]matrix (no) β€” Calculate half a matrix of group-group distances
  • -[no]max (no) β€” Calculate maximum distance instead of minimum
  • -d <real> (0.6) β€” Distance for contacts
  • -[no]group (no) β€” Count contacts with multiple atoms in the first group as one
  • -[no]pi (no) β€” Calculate minimum distance with periodic images
  • -[no]split (no) β€” Split graph where time is zero
  • -ng <int> (1) β€” Number of secondary groups to compute distance to a central group
  • -[no]pbc (yes) β€” Take periodic boundary conditions into account
  • -[no]respertime (no) β€” When writing per-residue distances, write distance for each time point
  • -[no]printresname (no) β€” Write residue names

πŸ”₯ SEE ALSO πŸ”₯

More information about GROMACS is available at <http://www.gromacs.org/>. πŸ¦‹


2026, GROMACS development team


okay that's the whole thing bestie, no cap, you're now officially fluent in gmx-mindist πŸ’– this was version 2026.4, dated Oct 02, 2026 β€” go forth and measure some distances, you absolute icon πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from