In the Protein Data Bank (PDB), the PDB format stands as the major file format for protein structures. However, there are certain intrinsic limitations in the PDB format, such as the storage of structural information in a fixed-width format that would be an issue for very large protein complexes. Therefore, the CIF (Crystallographic Information Framework) format has been proposed, which is characterized by superior expansibility. GROMACS, a widely used software suite for molecular dynamics simulations, presently only supports the PDB format. In this study, we have modified the source code of GROMACS, which enables it to support the CIF format structure files as input and subsequently generate molecular topology files. This work would simplify the pre-processing of large protein complexes for MD simulations.
-
Download Gromacs 2026.4 source from https://manual.gromacs.org/ (or use
gromacs-2026.4-modified-CIF.tar.gzin this repository). -
Replace Gromacs' source files with files in ..\src
filetypes.h —— ..\api\legacy\include\gromacs\fileio\filetypes.h
pdbio.h —— ..\api\legacy\include\gromacs\fileio\pdbio.h
filetypes.cpp —— ..\src\gromacs\fileio\filetypes.cpp
confio.cpp —— ..\src\gromacs\fileio\confio.cpp
pdbio.cpp —— ..\src\gromacs\fileio\pdbio.cpp
-
Follow Gromacs' installation steps
- A full source checkout is kept in
gromacs-2026.4-modified-CIF/for local builds. - This directory is intentionally ignored by git via
.gitignore. - The tracked distributable archive is
gromacs-2026.4-modified-CIF.tar.gz.
Run "gmx pdb2gmx -f x.cif -o x.gro -p x.top -i x.itp"
All modified parts in source files are surrounded with "//Gromacs-CIF"
This repository now includes tooling to help pull in changes from upstream GROMACS while protecting mmCIF support:
-
scripts/fetch_gromacs_upstream.py- Downloads the current upstream files for:
api/legacy/include/gromacs/fileio/filetypes.hapi/legacy/include/gromacs/fileio/pdbio.hsrc/gromacs/fileio/filetypes.cppsrc/gromacs/fileio/pdbio.cppsrc/gromacs/fileio/confio.cpp
- Saves them under
upstream-cache/<ref>/... - Optional
--show-diffprints a unified diff (upstream -> local modified file)
- Downloads the current upstream files for:
-
scripts/check_mmcif_support.py- Verifies required mmCIF glue is still present in the modified files
- Fails if key hooks (e.g.
efCIFhandling) are removed or markers become unbalanced
GitHub Actions workflow .github/workflows/mmcif-guard.yml runs on push/PR (plus weekly schedule) and:
- Runs
scripts/check_mmcif_support.py - Fetches upstream reference files from GROMACS
main
This means you can merge downstream updates and immediately get a CI signal if mmCIF support wiring is accidentally broken.
DOI: https://doi.org/10.1101/2023.09.01.555884
Hengyue Wang & Zhiyong Zhang