GMX-X2TOP(1)

πŸ’– GMX-X2TOP(1) β€” the GROMACS glow-up page πŸ’–

okay bestie, so this is gmx-x2top, from the GROMACS fam. Sit down, hydrate, we're building a topology out of thin air (well, out of coordinates). πŸ¦‹


✨ NAME ✨

gmx-x2top β€” Generate a primitive topology from coordinates

Like. It makes a whole topology. From coordinates. No cap. πŸ’…


✨ SYNOPSIS ✨

gmx x2top [-f [<.gro/.g96/...>]] [-o [<.top>]] [-r [<.rtp>]]
          [-ff <string>] [-[no]v] [-nexcl <int>] [-[no]H14]
          [-[no]alldih] [-[no]remdih] [-[no]pairs] [-name <string>]
          [-[no]pbc] [-[no]pdbq] [-[no]param] [-[no]round]
          [-kb <real>] [-kt <real>] [-kp <real>]

✨ DESCRIPTION ✨

So gmx x2top generates a primitive topology from a coordinate file. The tea: the program assumes all hydrogens are present when it's defining the hybridization from the atom name and the number of bonds. It can also make an .rtp entry, and then you can just add that to the .rtp database. So handy. πŸŽ€

When -param is set, equilibrium distances and angles and force constants get printed in the topology for all interactions. Where do the equilibrium distances and angles come from? The input coordinates, babe. And the force constants? You set those with the command line options. Slay.

The force fields that are somewhat supported currently are:

  • G53a5 β€” GROMOS96 53a5 Forcefield (official distribution)
  • oplsaa β€” OPLS-AA/L all-atom force field (2001 aminoacid dihedrals)

The corresponding data files live in the library directory with the name atomname2type.n2t. Check Chapter 5 of the manual for more info about file formats, iykyk. πŸ“–

By default, the force field selection is interactive, but you can use the -ff option to specify one of the short names above on the command line instead. In that case gmx x2top just looks for the corresponding file. Periodt.


✨ OPTIONS ✨

πŸ“ Options to specify input files

  • -f [<.gro/.g96/...>] (default conf.gro) β€” Structure file: gro g96 pdb brk ent esp tpr

πŸ“ Options to specify output files

  • -o [<.top>] (default out.top) (Optional) β€” Topology file
  • -r [<.rtp>] (default out.rtp) (Optional) β€” Residue Type file used by pdb2gmx

πŸ“ Other options

  • -ff <string> (default oplsaa) β€” Force field for your simulation. Type "select" for interactive selection. πŸ‘€
  • -[no]v (default no) β€” Generate verbose output in the top file
  • -nexcl <int> (default 3) β€” Number of exclusions
  • -[no]H14 (default yes) β€” Use 3rd neighbour interactions for hydrogen atoms
  • -[no]alldih (default no) β€” Generate all proper dihedrals
  • -[no]remdih (default no) β€” Remove dihedrals on the same bond as an improper
  • -[no]pairs (default yes) β€” Output 1-4 interactions (pairs) in topology file
  • -name <string> (default ICE) β€” Name of your molecule 🧊 (yes the default is literally ICE, we love a frosty molecule moment)
  • -[no]pbc (default yes) β€” Use periodic boundary conditions.
  • -[no]pdbq (default no) β€” Use the B-factor supplied in a .pdb file for the atomic charges
  • -[no]param (default yes) β€” Print parameters in the output
  • -[no]round (default yes) β€” Round off measured values
  • -kb <real> (default 400000) β€” Bonded force constant (kJ/mol/nm^2)
  • -kt <real> (default 400) β€” Angle force constant (kJ/mol/rad^2)
  • -kp <real> (default 5) β€” Dihedral angle force constant (kJ/mol/rad^2)

😭 KNOWN ISSUES 😭

bestie. we have to talk. πŸ™ˆ these are the ✨quirks✨:

  • The atom type selection is primitive. Virtually no chemical knowledge is used. It's giving vibes-based chemistry.
  • Periodic boundary conditions screw up the bonding. πŸ’€
  • No improper dihedrals are generated.
  • The atoms to atomtype translation table is incomplete (that's atomname2type.n2t in the data directory). Please extend it and send the results back to the GROMACS crew! 🫢 They'd literally love that. Be the main character who fixed the table.
Lowkey important: that translation table being incomplete means you might hit stuff it just doesn't know about. Extending it and sending it upstream is a genuine glow-up for everyone. πŸ’œ

🌈 SEE ALSO 🌈

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


2026, GROMACS development team


okay that's the whole page bestie, you ate that πŸ’…βœ¨ so this lil manual page is from GROMACS version 2026.4, dated Oct 02, 2026 β€” go build something iconic with it, no cap πŸ¦‹πŸŽ€πŸ’–

πŸ“¦ where this page comes from