GMX-ROTMAT(1)

✨ gmx-rotmat πŸ’…

okay bestie, this is gmx-rotmat from the GROMACS manual, and it's literally the tool that shows you how a molecule's rotation matrix be having when you fit it onto a reference structure. periodt. πŸŽ€


🌸 NAME 🌸

gmx-rotmat β€” plot the rotation matrix for fitting to a reference structure πŸ¦‹


🫢 SYNOPSIS 🫢

gmx rotmat [-f [<.xtc/.trr/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
           [-o [<.xvg>]] [-b <time>] [-e <time>] [-dt <time>]
           [-[no]w] [-xvg <enum>] [-ref <enum>] [-skip <int>]
           [-[no]fitxy] [-[no]mw]

πŸ’– DESCRIPTION πŸ’–

okay so gmx rotmat plots the rotation matrix you need for a least squares fit of one conformation onto the reference conformation you handed it with -s. Translation gets removed before the fitting happens, slay. ✨

the output is three vectors, and they give you the new directions of the x, y and z directions of the reference conformation. so for example: (zx,zy,zz) is the orientation of the reference z-axis in the trajectory frame. got it? iconic. πŸ’…

this tool is useful for, like, determining the orientation of a molecule at an interface? possibly on a trajectory that was made with gmx trjconv -fit rotxy+transxy to remove the rotation in the x-y plane. iykyk. 🧚

option -ref determines a reference structure for the fitting, instead of just using the structure from -s. the structure with the lowest sum of RMSD's to all other structures is the one that gets used. and ngl, since the computational cost of this whole procedure grows with the square of the number of frames, the -skip option can be super useful. a full fit, or only a fit in the x-y plane, can be performed. 🌈

option -fitxy fits in the x-y plane before determining the rotation matrix. πŸ’«


✨ 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) β€” Structure+mass(db): tpr gro g96 pdb brk ent πŸ’œ
  • -n [<.ndx>] (index.ndx) (Optional) β€” Index file πŸŽ€

πŸ¦‹ Options to specify output files:

  • -o [<.xvg>] (rotmat.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 ✨
  • -ref <enum> (none) β€” Determine the optimal reference structure: none, xyz, xy πŸ’«
  • -skip <int> (1) β€” Use every nr-th frame for -ref 🧚
  • -[no]fitxy (no) β€” Fit the x/y rotation before determining the rotation πŸ’…
  • -[no]mw (yes) β€” Use mass weighted fitting 🫢

πŸ’€ SEE ALSO πŸ’€

more information about GROMACS is available at <‐ http://www.gromacs.org/>. 🌈


2026, GROMACS development team πŸ‘‘


and that's the whole vibe check, bestie β€” this page was served to you fresh from version 2026.4, dated Oct 02, 2026. go fit something cute. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from