skillfed

ihm

Package for handling IHM mmCIF and BinaryCIF files

ihm v2.11 159.7K downloads/30d#10,689 on PyPI18
Permissive license MIT Active released

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 ihm

uv

uv add ihm

poetry

poetry add ihm

Installing 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

Intended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering

Tags

mmcif file handlingbinarycif parserihm extension supportstructural biology file formatprotein structure datapdb mmcif readerhybrid modeling files
structural-biologyfile-formatbioinformatics

More Scientific/Engineering packages