GMX-H2ORDER(1)

🩡 gmx-h2order β€” bestie edition

okay so this is gmx-h2order, one of the GROMACS command-line tools (GROMACS manual, if we're being official about it), and it's literally the water-orientation calculator. yes, that kind of order. let's get into it πŸ’…


✨ NAME ✨

gmx-h2order β€” compute the orientation of water molecules 🫧


✨ SYNOPSIS ✨

gmx h2order [-f [<.xtc/.trr/...>]] [-n [<.ndx>]] [-nm [<.ndx>]]
            [-s [<.tpr>]] [-o [<.xvg>]] [-b <time>] [-e <time>]
            [-dt <time>] [-[no]w] [-xvg <enum>] [-d <enum>]
            [-sl <int>]

like, that's the whole vibe right there. copy it, paste it, live your truth ✨


✨ DESCRIPTION ✨

okay so here's the tea β˜• gmx h2order computes the orientation of water molecules with respect to the normal of the box. the program figures out the average cosine of the angle between the dipole moment of water and an axis of the box. the box gets divided into slices, and the average orientation per slice gets printed. no cap.

each water molecule is assigned to a slice, per time frame, based on the position of the oxygen. periodt.

and here's the plot twist πŸ‘€ β€” when -nm is used, the angle between the water dipole and the axis from the center of mass to the oxygen is calculated instead of the angle between the dipole and a box axis. so it's giving "different geometry, same energy". iconic behavior fr fr.


✨ OPTIONS ✨


🌸 Options to specify input files 🌸

  • -f [<.xtc/.trr/...>] (traj.xtc) β€” the trajectory file πŸ’– accepted formats: xtc trr cpt gro g96 pdb tng h5md. come one, come all.
  • -n [<.ndx>] (index.ndx) β€” index file πŸŽ€
  • -nm [<.ndx>] (index.ndx) (Optional) β€” another index file, but this one only shows up if you invite it 😌 (it's the one that switches on the COM-to-oxygen angle thing from the description, iykyk)
  • -s [<.tpr>] (topol.tpr) β€” portable xdr run input file 🌈

🧚 Options to specify output files 🧚

  • -o [<.xvg>] (order.xvg) β€” xvgr/xmgr file ⭐ your lil plot lives here

πŸ‘‘ Other options πŸ‘‘

  • -b <time> (0) β€” time of first frame to read from the trajectory. default unit is ps ⏰
  • -e <time> (0) β€” time of last frame to read from the trajectory. default unit is ps ⏰
  • -dt <time> (0) β€” only use a frame when t MOD dt = first time. default unit is ps πŸ¦‹
  • -[no]w (no) β€” view output .xvg, .xpm, .eps and .pdb files πŸ‘€
  • -xvg <enum> (xmgrace) β€” xvg plot formatting. the options are literally: xmgrace, xmgr, none πŸ’…
  • -d <enum> (Z) β€” take the normal on the membrane in direction X, Y or Z. β€” and the allowed values are Z, Y, X 🌈
  • -sl <int> (0) β€” calculate the order parameter as a function of boxlength, dividing the box into this number of slices 🍰

😭 KNOWN ISSUES 😭

ngl, there's one thing you need to know before you trust these slices:

  • the program assigns whole water molecules to a slice, based on the first atom of three in the index file group. it assumes an order of O,H,H. the name is not important, but the order is. if this demand is not met, assigning molecules to slices is different. πŸ’€
so like… check your atom order first, bestie. the atoms are not gonna reorder themselves and the program is NOT going to warn you. it will just vibe differently. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯


2026, GROMACS development team


and that's the whole page, bestie 🫢 this was GMX-H2ORDER(1) from GROMACS 2026.4, dated Oct 02, 2026 β€” go compute some water orientations, you absolute icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from