GMX-HBOND-LEGACY(1)

πŸ’– GMX-HBOND-LEGACY πŸ’–

okay bestie so this is gmx-hbond-legacy from the GROMACS manual, section 1, and it's literally the hydrogen bond girlie of the GROMACS family. she computes AND analyzes hydrogen bonds. that's the whole vibe. let's get into it 🫢


✨ NAME ✨

gmx-hbond-legacy β€” compute and analyze hydrogen bonds. that's it, that's the job πŸ’…


✨ SYNOPSIS ✨

gmx hbond-legacy [-f [<.xtc/.trr/...>]] [-s [<.tpr>]] [-n [<.ndx>]]
             [-num [<.xvg>]] [-g [<.log>]] [-ac [<.xvg>]]
             [-dist [<.xvg>]] [-ang [<.xvg>]] [-hx [<.xvg>]]
             [-hbn [<.ndx>]] [-hbm [<.xpm>]] [-don [<.xvg>]]
             [-dan [<.xvg>]] [-life [<.xvg>]] [-nhbdist [<.xvg>]]
             [-b <time>] [-e <time>] [-dt <time>] [-tu <enum>]
             [-xvg <enum>] [-a <real>] [-r <real>] [-[no]da]
             [-r2 <real>] [-abin <real>] [-rbin <real>] [-[no]nitacc]
             [-[no]contact] [-shell <real>] [-fitstart <real>]
             [-fitend <real>] [-temp <real>] [-dump <int>]
             [-max_hb <real>] [-[no]merge] [-acflen <int>]
             [-[no]normalize] [-P <enum>] [-fitfn <enum>]
             [-beginfit <real>] [-endfit <real>]

✨ DESCRIPTION ✨

okay so gmx hbond-legacy computes and analyzes hydrogen bonds. iconic. and how does she find them? she checks cutoffs on two things:

  • the angle Hydrogen - Donor - Acceptor (zero is extended) 🌸
  • the distance Donor - Acceptor (or Hydrogen - Acceptor if you pass -noda)

now the group chat rules, listen up: OH and NH groups are regarded as donors, O is an acceptor always, and N is an acceptor by default, but you can switch that with -nitacc. and dummy hydrogen atoms? they're assumed to be connected to the first preceding non-hydrogen atom. slay, they just know where to go.

you need to specify two groups for analysis, and those groups must be either identical or non-overlapping. all hydrogen bonds between the two groups get analyzed. no cap.

if you set -shell, you'll be asked for an additional index group which should contain exactly one atom. in that case, only hydrogen bonds between atoms within the shell distance from that one atom are considered. one atom. main character energy, honestly πŸ‘‘

with option -ac, rate constants for hydrogen bonding can be derived with the model of Luzar and Chandler (Nature 379:55, 1996; J. Chem. Phys. 113:23, 2000). if contact kinetics are analyzed by using the -contact option, then n(t) can be defined as either all pairs that are not within contact distance r at time t (corresponding to leaving the -r2 option at the default value 0) or all pairs that are within distance r2 (corresponding to setting a second cut-off value with option -r2). see mentioned literature for more details and definitions πŸ“š

πŸ’« Output πŸ’«

here's what she gives you, and it's giving excellence:

  • -num: number of hydrogen bonds as a function of time. πŸ•
  • -ac: average over all autocorrelations of the existence functions (either 0 or 1) of all hydrogen bonds.
  • -dist: distance distribution of all hydrogen bonds.
  • -ang: angle distribution of all hydrogen bonds.
  • -hx: the number of n-n+i hydrogen bonds as a function of time where n and n+i stand for residue numbers and i ranges from 0 to 6. This includes the n-n+3, n-n+4 and n-n+5 hydrogen bonds associated with helices in proteins. πŸŒ€
  • -hbn: all selected groups, donors, hydrogens and acceptors for selected groups, all hydrogen bonded atoms from all groups and all solvent atoms involved in insertion. Output is limited unless -nomerge is set.
  • -hbm: existence matrix for all hydrogen bonds over all frames, this also contains information on solvent insertion into hydrogen bonds. Ordering is identical to that in -hbn index file.
  • -dan: write out the number of donors and acceptors analyzed for each timeframe. This is especially useful when using -shell. 🐚
  • -nhbdist: compute the number of HBonds per hydrogen in order to compare results to Raman Spectroscopy.
🚨 note bestie: options -ac, -life, -hbn and -hbm require an amount of memory proportional to the total numbers of donors times the total number of acceptors in the selected group(s). so maybe check your RAM before you go feral on a huge system 😭

✨ OPTIONS ✨

πŸŽ€ Options to specify input files

  • -f [<.xtc/.trr/...>] (traj.xtc) β€” Trajectory: xtc trr cpt gro g96 pdb tng h5md. your frames, your journey ✨
  • -s [<.tpr>] (topol.tpr) β€” Portable xdr run input file. the structure/topology bestie 🧬
  • -n [<.ndx>] (index.ndx) (Optional) β€” Index file. where your groups live πŸ’–

πŸŽ€ Options to specify output files

  • -num [<.xvg>] (hbnum.xvg) β€” xvgr/xmgr file.
  • -g [<.log>] (hbond.log) (Optional) β€” Log file.
  • -ac [<.xvg>] (hbac.xvg) (Optional) β€” xvgr/xmgr file.
  • -dist [<.xvg>] (hbdist.xvg) (Optional) β€” xvgr/xmgr file.
  • -ang [<.xvg>] (hbang.xvg) (Optional) β€” xvgr/xmgr file.
  • -hx [<.xvg>] (hbhelix.xvg) (Optional) β€” xvgr/xmgr file.
  • -hbn [<.ndx>] (hbond.ndx) (Optional) β€” Index file.
  • -hbm [<.xpm>] (hbmap.xpm) (Optional) β€” X PixMap compatible matrix file. very visually stunning of her 🌈
  • -don [<.xvg>] (donor.xvg) (Optional) β€” xvgr/xmgr file.
  • -dan [<.xvg>] (danum.xvg) (Optional) β€” xvgr/xmgr file.
  • -life [<.xvg>] (hblife.xvg) (Optional) β€” xvgr/xmgr file.
  • -nhbdist [<.xvg>] (nhbdist.xvg) (Optional) β€” xvgr/xmgr file.

πŸŽ€ Other options

  • -b <time> (0) β€” Time of first frame to read from trajectory (default unit ps). start of the era ⏳
  • -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.
  • -xvg <enum> (xmgrace) β€” xvg plot formatting: xmgrace, xmgr, none.
  • -a <real> (30) β€” Cutoff angle (degrees, Hydrogen - Donor - Acceptor).
  • -r <real> (0.35) β€” Cutoff radius (nm, X - Acceptor, see next option).
  • -[no]da (yes) β€” Use distance Donor-Acceptor (if TRUE) or Hydrogen-Acceptor (FALSE).
  • -r2 <real> (0) β€” Second cutoff radius. Mainly useful with -contact and -ac.
  • -abin <real> (1) β€” Binwidth angle distribution (degrees).
  • -rbin <real> (0.005) β€” Binwidth distance distribution (nm).
  • -[no]nitacc (yes) β€” Regard nitrogen atoms as acceptors.
  • -[no]contact (no) β€” Do not look for hydrogen bonds, but merely for contacts within the cut-off distance.
  • -shell <real> (-1) β€” when > 0, only calculate hydrogen bonds within # nm shell around one particle. 🐚
  • -fitstart <real> (1) β€” Time (ps) from which to start fitting the correlation functions in order to obtain the forward and backward rate constants for HB breaking and formation. With -gemfit we suggest -fitstart 0.
  • -fitend <real> (60) β€” Time (ps) to which to stop fitting the correlation functions in order to obtain the forward and backward rate constants for HB breaking and formation (only with -gemfit).
  • -temp <real> (298.15) β€” Temperature (K) for computing the Gibbs energy corresponding to HB breaking and reforming. πŸ”₯
  • -dump <int> (0) β€” Dump the first N hydrogen bond ACFs in a single .xvg file for debugging.
  • -max_hb <real> (0) β€” Theoretical maximum number of hydrogen bonds used for normalizing HB autocorrelation function. Can be useful in case the program estimates it wrongly.
  • -[no]merge (yes) β€” H-bonds between the same donor and acceptor, but with different hydrogen are treated as a single H-bond. Mainly important for the ACF. Not compatible with options that depend on knowing a specific hydrogen: -noad, -ang.
  • -acflen <int> (-1) β€” Length of the ACF, default is half the number of frames.
  • -[no]normalize (yes) β€” Normalize ACF.
  • -P <enum> (0) β€” Order of Legendre polynomial for ACF (0 indicates none): 0, 1, 2, 3.
  • -fitfn <enum> (none) β€” Fit function: none, exp, aexp, exp_exp, exp5, exp7, exp9.
  • -beginfit <real> (0) β€” Time where to begin the exponential fit of the correlation function.
  • -endfit <real> (-1) β€” Time where to end the exponential fit of the correlation function, -1 is until the end.

✨ SEE ALSO ✨

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


2026, GROMACS development team


πŸ’Œ and that's the whole page bestie!! this was GMX-HBOND-LEGACY(1) from GROMACS version 2026.4, dated Oct 02, 2026. go hydrate (your system, not yourself, though also yourself fr fr πŸ’§) and analyze those hydrogen bonds. periodt πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from