GMX-DENSMAP(1)

πŸ’– gmx-densmap β€” GROMACS's cutest density-map maker πŸ’–

okay bestie, sit down, hydrate, and let me tell you about gmx-densmap from GROMACS 🧚


✨ NAME ✨

gmx-densmap β€” literally calculates 2D planar or axial-radial density maps. that's it, that's the job πŸ’…


🌸 SYNOPSIS 🌸

gmx densmap [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
            [-od [<.dat>]] [-o [<.xpm>]] [-b <time>] [-e <time>]
            [-dt <time>] [-[no]w] [-bin <real>] [-aver <enum>]
            [-xmin <real>] [-xmax <real>] [-n1 <int>] [-n2 <int>]
            [-amax <real>] [-rmax <real>] [-[no]mirror] [-[no]sums]
            [-unit <enum>] [-dmin <real>] [-dmax <real>]

🫢 DESCRIPTION 🫢

so gmx densmap computes 2D number-density maps. it can make planar maps and axial-radial ones, iconic versatility honestly πŸ‘‘

the output .xpm file can be visualized with, for instance, xv, and can be converted to postscript with xpm2ps. and if .xpm isn't your vibe? you can get text output in a .dat file with -od instead of the usual .xpm file with -o. options, we love to see it πŸ’–

the default analysis is a 2-D number-density map for a selected group of atoms in the x-y plane. you can change the averaging direction with the -aver option. when -xmin and/or -xmax are set, only atoms that are within the limit(s) in the averaging direction are taken into account. the grid spacing is set with the -bin option. when -n1 or -n2 is non-zero, the grid size is set by this option. box size fluctuations are properly taken into account β€” no cap, it handles that fr fr πŸ“βœ¨

now for the glow-up: when options -amax and -rmax are set, an axial-radial number-density map is made. you should supply three groups β€” the centers of mass of the first two groups define the axis, and the third defines the analysis group. the axial direction goes from -amax to +amax, where the center is defined as the midpoint between the centers of mass, and the positive direction goes from the first to the second center of mass. the radial direction goes from 0 to rmax, or from -rmax to +rmax when the -mirror option has been set πŸͺž

the normalization of the output is set with the -unit option. the default produces a true number density. unit nm-2 leaves out the normalization for the averaging or the angular direction. option count produces the count for each grid cell. and when you do not want the scale in the output to go from zero to the maximum density, you can set the maximum with the option -dmax πŸ’…


πŸ’… 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 [<.dat>] (densmap.dat) (Optional) β€” Generic data file
  • -o [<.xpm>] (densmap.xpm) β€” X PixMap compatible matrix 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
  • -bin <real> (0.02) β€” Grid size (nm)
  • -aver <enum> (z) β€” The direction to average over: z, y, x
  • -xmin <real> (-1) β€” Minimum coordinate for averaging
  • -xmax <real> (-1) β€” Maximum coordinate for averaging
  • -n1 <int> (0) β€” Number of grid cells in the first direction
  • -n2 <int> (0) β€” Number of grid cells in the second direction
  • -amax <real> (0) β€” Maximum axial distance from the center
  • -rmax <real> (0) β€” Maximum radial distance
  • -[no]mirror (no) β€” Add the mirror image below the axial axis
  • -[no]sums (no) β€” Print density sums (1D map) to stdout
  • -unit <enum> (nm-3) β€” Unit for the output: nm-3, nm-2, count
  • -dmin <real> (0) β€” Minimum density in output
  • -dmax <real> (0) β€” Maximum density in output (0 means calculate it)

🌈 SEE ALSO 🌈

More information about GROMACS is available at http://www.gromacs.org/ 🧚


2026, GROMACS development team


okay so that's the whole thing, you're fully caught up bestie, go make some gorgeous density maps πŸ“πŸ’œ

sign-off time: this was 2026.4, dated Oct 02, 2026, and yes, it's the GMX-DENSMAP(1) page β€” periodt ✨

πŸ“¦ where this page comes from