GMX-ENEMAT(1)

πŸ’– gmx-enemat πŸ’–

okay bestie, so this is the manual page for gmx-enemat, which lives in the GROMACS manual set. Short version: it pulls an energy matrix out of an energy file. You're gonna love it, fr fr. 🫢


✨ SYNOPSIS ✨

gmx enemat [-f [<.edr>]] [-groups [<.dat>]] [-eref [<.dat>]]
           [-emat [<.xpm>]] [-etot [<.xvg>]] [-b <time>] [-e <time>]
           [-dt <time>] [-[no]w] [-xvg <enum>] [-[no]sum]
           [-skip <int>] [-[no]mean] [-nlevels <int>] [-max <real>]
           [-min <real>] [-[no]coulsr] [-[no]coul14] [-[no]ljsr]
           [-[no]lj14] [-[no]bhamsr] [-[no]free] [-temp <real>]

🌸 DESCRIPTION 🌸

So gmx enemat extracts an energy matrix from the energy file, and that energy file is the one you hand it with -f. πŸ’…

If you're using -groups, you have to give it a file where each line is a group of atoms you want used. Then it goes into the energy file and pulls out a matrix of interaction energies for those groups, by hunting for energy groups whose names match up with pairs of atom groups. Like, say your -groups file has this in it:

2
Protein
SOL

then it's expecting energy groups in the energy file with names like 'Coul-SR:Protein-SOL' and 'LJ:Protein-SOL' (though ngl, gmx enemat really shines when you're analyzing lots of groups at the same time πŸ”₯). The matrices for different energy types get written out separately, and which ones show up is controlled by the -[no]coul, -[no]coulr, -[no]coul14, -[no]lj, -[no]lj14, -[no]bham and -[no]free options πŸ‘‘. And then, finally, the total interaction energy per group can be calculated with -etot.

You can also get an approximation of the free energy with:

E_free = E_0 + kT log(<exp((E-E_0)/kT)>)

where '<>' means time-average. And if you wanna calculate the free energy difference against some reference state, you can hand it a file full of reference free energies. ✨ Group names (think residue names) in that reference file should line up with the group names used in your -groups file, but if there's a number tacked onto the end of something in -groups (like a residue number), that gets ignored when it's doing the comparison. Iconic behaviour honestly.


πŸŽ€ OPTIONS πŸŽ€

Options to specify input files:

  • -f [<.edr>] (ener.edr) (Optional) β€” the energy file πŸ’–
  • -groups [<.dat>] (groups.dat) β€” a generic data file
  • -eref [<.dat>] (eref.dat) (Optional) β€” also a generic data file

Options to specify output files:

  • -emat [<.xpm>] (emat.xpm) β€” X PixMap compatible matrix file πŸ¦‹
  • -etot [<.xvg>] (energy.xvg) β€” xvgr/xmgr file

Other options:

  • -b <time> (0) β€” time of the first frame to read from the trajectory (default unit is ps)
  • -e <time> (0) β€” time of the 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 the output .xvg, .xpm, .eps and .pdb files πŸ‘€
  • -xvg <enum> (xmgrace) β€” xvg plot formatting: xmgrace, xmgr, none
  • -[no]sum (no) β€” sum up the energy terms you selected instead of displaying all of them
  • -skip <int> (0) β€” skip this many frames between data points
  • -[no]mean (yes) β€” with -groups, extract a matrix of mean energies instead of a matrix for each timestep
  • -nlevels <int> (20) β€” number of levels for the matrix colors 🌈
  • -max <real> (1e+20) β€” max value for energies
  • -min <real> (-1e+20) β€” min value for energies
  • -[no]coulsr (yes) β€” extract Coulomb SR energies
  • -[no]coul14 (no) β€” extract Coulomb 1-4 energies
  • -[no]ljsr (yes) β€” extract Lennard-Jones SR energies
  • -[no]lj14 (no) β€” extract Lennard-Jones 1-4 energies
  • -[no]bhamsr (no) β€” extract Buckingham SR energies
  • -[no]free (yes) β€” calculate free energy
  • -temp <real> (300) β€” reference temperature for the free energy calculation 🌑️

πŸ‘‘ SEE ALSO πŸ‘‘

More info about GROMACS lives at <http://www.gromacs.org/>. (the manpage has it with a line-break hyphen in there, but you get the vibe 🧚)


2026, GROMACS development team


aaaand that's the whole thing bestie, you ate that πŸ’…βœ¨ this was GROMACS 2026.4, dated Oct 02, 2026 β€” go forth and matrix-ify those energies, mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from