GEMMI - library for structural biology

Gemmi is a library, accompanied by a set of programs, developed primarily for use in macromolecular crystallography (MX). For working with:

  • macromolecular models (content of PDB, PDBx/mmCIF and mmJSON files),

  • refinement restraints (CIF files),

  • reflection data (MTZ and mmCIF formats),

  • data on a 3D grid (electron density maps, masks, MRC/CCP4 format)

  • crystallographic symmetry.

Parts of this library can be useful in structural bioinformatics (for symmetry-aware analysis of protein models), in chemical crystallography and in other molecular-structure sciences that use CIF files (we have the fastest open-source CIF parser).

Gemmi is open-source (MPL) and portable – it runs on Linux, Windows, MacOS and even inside a web browser if compiled to WebAssembly (here and here). It is written in C++11, with Python (2 and 3) bindings, and with partial C and Fortran 2003 interface.

Occasionally, the project gets sidetracked into visualization of the PDB data.

Gemmi is a joint project of Global Phasing Ltd and CCP4. It is named after Gemmi Pass. The name can also be expanded as GEneral MacroMolecular I/o.

Source code repository:


As of 2022 the library is under intensive development and not everything is documented yet. Just ask questions. You can ask in Discussions or Issues on GitHub. Alternatively, send me an email asking how to implement this and that, but add some context (is it for a student assignment, research project, in-house software?).