Skip to content

About

Modify Gromcas enabling CIF file supporting

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Gromacs-CIF

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.

Installation

  1. Download Gromacs 2026.4 source from https://manual.gromacs.org/ (or use gromacs-2026.4-modified-CIF.tar.gz in this repository).

  2. 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

  3. Follow Gromacs' installation steps

Local full-source checkout (for building GROMACS-CIF)

  • 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.

Usage

Run "gmx pdb2gmx -f x.cif -o x.gro -p x.top -i x.itp"

Development

All modified parts in source files are surrounded with "//Gromacs-CIF"

Keeping up with downstream GROMACS changes

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.h
      • api/legacy/include/gromacs/fileio/pdbio.h
      • src/gromacs/fileio/filetypes.cpp
      • src/gromacs/fileio/pdbio.cpp
      • src/gromacs/fileio/confio.cpp
    • Saves them under upstream-cache/<ref>/...
    • Optional --show-diff prints a unified diff (upstream -> local modified file)
  • scripts/check_mmcif_support.py

    • Verifies required mmCIF glue is still present in the modified files
    • Fails if key hooks (e.g. efCIF handling) are removed or markers become unbalanced

CI safety check

GitHub Actions workflow .github/workflows/mmcif-guard.yml runs on push/PR (plus weekly schedule) and:

  1. Runs scripts/check_mmcif_support.py
  2. 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.

Citation

DOI: https://doi.org/10.1101/2023.09.01.555884

Author

Hengyue Wang & Zhiyong Zhang

About

Modify Gromcas enabling CIF file supporting

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages