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 whent MOD dt = first time(default unit ps)-[no]w(no) β View output.xvg,.xpm,.epsand.pdbfiles-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 (0means calculate it)
π SEE ALSO π
More information about GROMACS is available at http://www.gromacs.org/ π§
π COPYRIGHT π
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
- nixpkgs unstable: gromacs 2026.4
- ubuntu stonking: gromacs-data 2026.4-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms