Gromologist: a tool for Gromacs topology manipulation

Hi,

Working with Gromacs over the years, I’ve automatized a topology parser for personal use, and then implemented new features each time I needed one. What came out of this is Gromologist, a pip-installable library with a bunch of useful but scattered applications (look at the README for details), tested with most typical Amber/CHARMM topologies. Most typical features, such as #defines, explicit bonded parameters, custom combination rules, CMAPs…, are supported, but there might be some exotic ones that aren’t (contact me if you want that to change!).

Several functions users might find interesting include:

  • all sorts of printing/listing/cleaning of topology data
  • merging molecule topologies with new bonds/angles/…
  • removing atoms from topologies while maintaining correct numbering
  • manipulation (swapping, collapsing etc) of alchemical B-states for selected atoms
  • type duplication
  • addition of NBFIX entries
  • dihedral fitting wrt QM, akin to VMD’s FFTk (but using Gromacs alone)
  • identifying missing FF parameters
  • explicit matching of FF parameters to bonded terms
  • some PDB manipulation routines (interpolation, adding chains, editing b-factors, printing of protein/NA sequences, consistency checks against topologies, reordering to match .top order, inserting atoms offset from specified atoms by a vector)

If you find the tool useful, feel free to suggest new features (and report bugs if found). Ideally, I plan to rebuild most of my scripting ecosystem around it, so it will be kept up-to-date and developed for a while at least.

Best,
Miłosz Wieczór
milafternoon@gmail.com