GMX-POTENTIAL(1)

✨ GMX-POTENTIAL(1) ✨

okay bestie, welcome to the gmx-potential page from the GROMACS manual πŸ’– this one is lowkey iconic and I'm about to walk you through literally every single thing on it, no skipping, no cap.


🌸 NAME 🌸

gmx-potential β€” Calculate the electrostatic potential across the box

like. the whole vibe. that's it. electrostatic potential, across the box. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

gmx potential [-f [<.xtc/.trr/...>]] [-n [<.ndx>]] [-s [<.tpr>]]
             [-o [<.xvg>]] [-oc [<.xvg>]] [-of [<.xvg>]] [-b <time>]
             [-e <time>] [-dt <time>] [-[no]w] [-xvg <enum>]
             [-d <string>] [-sl <int>] [-cb <int>] [-ce <int>]
             [-tz <real>] [-[no]spherical] [-ng <int>] [-[no]center]
             [-[no]symm] [-[no]correct]

she's got a LOT of flags and every one of them is doing something, so let's go πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so gmx potential computes the electrostatical potential across the box. the way it does this: first it sums up the charges per slice, then it integrates twice over that charge distribution. that's the whole trick, and honestly? kind of stunning.

Real talk though: periodic boundaries are not taken into account. and the reference of potential is taken to be the left side of the box. got it? the left side. that's the zero. that's the anchor. 🫢

you can also calculate the potential in spherical coordinates</> as function of r, by calculating a charge distribution in spherical slices and twice integrating them. same double-integration energy, just rounder.

and heads up: epsilon_r is taken as 1, but 2 is more appropriate in many cases. so like, she'll default to 1, but you might wanna know that 2 fits a lot of situations better. not me telling you, the manpage is telling you πŸ‘€


πŸ’« the -center and -symm situation πŸ’«

-center performs the histogram binning and potential calculation relative to the center of an arbitrary group, in absolute box coordinates. if you're calculating profiles along the Z axis box dimension bZ, output would be from -bZ/2 to bZ/2 if you center based on the entire system. cute, symmetric, balanced πŸŽ€

-symm symmetrizes the output around the center. and plot twist β€” this will automatically turn on -center too. she comes as a package deal, bestie.


πŸ’– OPTIONS πŸ’–

🌈 Options to specify input files:

  • -f [<.xtc/.trr/...>] (traj.xtc) β€” Trajectory: xtc trr cpt gro g96 pdb tng h5md
  • -n [<.ndx>] (index.ndx) β€” Index file
  • -s [<.tpr>] (topol.tpr) β€” Portable xdr run input file

πŸ“ Options to specify output files:

  • -o [<.xvg>] (potential.xvg) β€” xvgr/xmgr file
  • -oc [<.xvg>] (charge.xvg) β€” xvgr/xmgr file
  • -of [<.xvg>] (field.xvg) β€” 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)
  • -[no]w (no) β€” View output .xvg, .xpm, .eps and .pdb files
  • -xvg <enum> (xmgrace) β€” xvg plot formatting: xmgrace, xmgr, none
  • -d <string> (Z) β€” Take the normal on the membrane in direction X, Y or Z.
  • -sl <int> (10) β€” Calculate potential as function of boxlength, dividing the box in this number of slices.
  • -cb <int> (0) β€” Discard this number of first slices of box for integration
  • -ce <int> (0) β€” Discard this number of last slices of box for integration
  • -tz <real> (0) β€” Translate all coordinates by this distance in the direction of the box
  • -[no]spherical (no) β€” Calculate in spherical coordinates
  • -ng <int> (1) β€” Number of groups to consider
  • -[no]center (no) β€” Perform the binning relative to the center of the (changing) box. Useful for bilayers.
  • -[no]symm (no) β€” Symmetrize the density along the axis, with respect to the center. Useful for bilayers.
  • -[no]correct (no) β€” Assume net zero charge of groups to improve accuracy

😭 KNOWN ISSUES 😭

  • Discarding slices for integration should not be necessary.

(yeah. she said what she said. the discard options exist but like... you shouldn't need them, fr fr πŸ™ˆ)


πŸ”₯ SEE ALSO πŸ”₯

gmx(1)

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


2026, GROMACS development team


and that's the whole page bestie, every last flag accounted for, nothing skipped, nothing invented πŸ’…βœ¨

signing off from GROMACS 2026.4, dated Oct 02, 2026 β€” go integrate something twice, you've got this πŸ«ΆπŸŽ€πŸ’–

πŸ“¦ where this page comes from