--- id: gemmi version: "0.7.5" license: MPL-2.0 license_treatment: copyleft maintenance: active --- # gemmi — library for structural biology License: copyleft · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does Gemmi is a C++ library designed for structural biology and crystallography, providing Python bindings to read, write, and manipulate macromolecular models, crystallographic reflections, electron density maps, and CIF/STAR files. It handles data from PDB, mmCIF, mmJSON, MTZ, and MRC/CCP4 formats, and includes support for crystallographic symmetries and refinement restraints. The library is developed by CCP4 and Global Phasing Ltd, two established providers of crystallography software. The package is distributed as precompiled wheels for common platforms, reducing installation friction for most users. It has no runtime dependencies beyond Python itself, making it straightforward to integrate into existing workflows. The project is actively maintained, with recent commits and no known security vulnerabilities, making it a stable choice for structural biology applications. Use it for: - Parse and manipulate protein structures from PDB or mmCIF files in structural biology pipelines - Extract and analyze crystallographic symmetry information for structure validation - Read and process crystallographic reflection data (MTZ files) in refinement workflows - Convert between structural file formats (PDB, mmCIF, mmJSON) in data preparation - Access electron density maps and other volumetric data for visualization or analysis - Build command-line tools for batch processing of macromolecular structures ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Gemmi is a C++ library with Python bindings for reading, writing, and manipulating macromolecular structural data (PDB, mmCIF, MTZ files) and crystallographic information, including symmetries, density maps, and refinement restraints. Yes, if you work with macromolecular structures or crystallographic data. Gemmi is actively maintained, has no known vulnerabilities, and offers precompiled wheels for common platforms. The copyleft license (MPL-2.0 or LGPLv3) is standard in academic software but requires attention if you plan to redistribute derivative works. Medium install friction is typical for C++ bindings and not a barrier for most workflows. ## Install pip install gemmi uv add gemmi poetry add gemmi ## Installing gemmi Before you install: Medium install friction due to compiled C++ bindings, but wheels are provided for current Python versions across macOS, Linux, and Windows. Repository is active with recent commits and no known vulnerabilities. License in practice: Licensed under MPL-2.0 (copyleft), or LGPLv3 at your option. Copyleft terms require derivative works to be distributed under compatible licenses; choose LGPLv3 if that constraint is problematic for your use case. Quickstart: pip install gemmi import gemmi # Read a PDB file doc = gemmi.read_pdb('structure.pdb') model = doc[0] for chain in model: for residue in chain: print(residue.name) Requires Python >=3.9. Compiled wheels available for common platforms; source build requires a C++14 compiler. Verify before relying: - Whether the library's command-line tools are accessible after pip install or require separate installation - Performance characteristics for large structures or batch processing workflows - Maturity level of the Fortran interface and WebAssembly bindings mentioned in the description - Which specific Python versions are covered by the precompiled wheels beyond the friction evidence shown ## Package facts - License: MPL-2.0 (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags PDB file parsing, crystallography data handling, macromolecular structure, mmCIF reader, structural biology toolkit, crystallographic symmetry, MTZ reflection data, molecular model processing, structural-biology, crystallography, file-formats [View on SkillFed](https://skillfed.io/packages/gemmi) · [View on PyPI](https://pypi.org/project/gemmi/)