ihm
Package for handling IHM mmCIF and BinaryCIF files
What it is and what it does
ihm is a Python library for reading and writing mmCIF and BinaryCIF files that follow the integrative/hybrid modeling (IHM) extension standard used in structural biology. It provides a programmatic interface to parse and manipulate these file formats, which encode structural and modeling metadata for complex biological systems. The package includes an optional C extension for faster file I/O, but falls back to pure Python if a C compiler is unavailable during installation.
The library is designed for researchers working with integrative structural biology data, particularly those using the IHM framework for modeling multi-component complexes. It depends on msgpack for BinaryCIF support and integrates with the broader ecosystem of structural biology tools. The package is actively maintained and has been in use since 2018.
Use it for:
- Parse mmCIF files from structural biology databases to extract integrative modeling metadata and constraints.
- Write BinaryCIF files for efficient storage and transmission of large integrative modeling datasets.
- Programmatically manipulate IHM-compliant structural data in Python workflows for computational modeling.
- Convert between mmCIF and BinaryCIF formats while preserving IHM extension information.
- Integrate structural biology file handling into bioinformatics pipelines that require IHM-compliant data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reads and writes mmCIF and BinaryCIF files conforming to the integrative/hybrid modeling (IHM) extension, with optional C acceleration for faster file parsing.
Yes, if you work with integrative/hybrid modeling data in structural biology. The package is actively maintained, has no known vulnerabilities, and is permissively licensed. Install friction is moderate—pip will attempt to build a C extension (requiring a compiler), but the library degrades gracefully to pure Python if compilation fails. For non-IHM structural models, consider python-modelcif instead.
Install
ihm on PyPI
pip
pip install ihmuv
uv add ihmpoetry
poetry add ihmInstalling ihm
Before you install
High install friction: pip builds a C extension module that requires a C compiler; the library falls back to pure Python if compilation fails. Recent release (70 days ago) and active repository maintenance suggest ongoing support.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install ihm
import ihm
# Read an mmCIF file
system = ihm.read(open('model.cif'))
C compiler required for optimized file reading; pure Python fallback available if not present. msgpack package required to write or read BinaryCIF files.
Verify before relying
- Whether the C extension provides meaningful performance gains for typical file sizes in the IHM domain.
- Compatibility with Python versions beyond 3.6 (requires_python is unspecified in metadata).
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | 1 — msgpack |
| Maintenance | actively maintained — 70 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 159,732/month — #10,689 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ihm-2.11.tar.gz
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
fhconfparserReads configuration files in INI, TOML, or JSON…
permissive · top 15,000 on PyPI
modelcifReads and writes mmCIF and BinaryCIF files…
permissive · top 15,000 on PyPI
mmcif-pdbxProvides a pure Python interface to read,…
permissive · top 15,000 on PyPI
gemmiGemmi is a C++ library with Python bindings for…
copyleft · top 5,000 on PyPI
mmcifProvides native Python and C++ bindings to…
permissive · top 5,000 on PyPI
mrcfilemrcfile reads and writes MRC2014 format files…
permissive · top 15,000 on PyPI
python-gdcmPython wrapper for GDCM (Grassroots DICOM), a…
permissive · top 15,000 on PyPI
OpenMMOpenMM is a Python wrapper for a C++ molecular…
permissive · top 15,000 on PyPI
msgpack-numpySerializes and deserializes NumPy arrays and…
permissive · top 5,000 on PyPI
pdb2pqrPDB2PQR prepares protein structures from PDB…
permissive · top 15,000 on PyPI