skillfed

modelcif

Package for handling ModelCIF mmCIF and BinaryCIF files

modelcif v1.7 175.3K downloads/30d#10,267 on PyPI14
Permissive license MIT Active released

What it is and what it does

modelcif is a Python library for reading and writing mmCIF and BinaryCIF files that follow the ModelCIF extension standard used in structural biology. It wraps the ihm package to provide specialized handling for ModelCIF-compliant data, enabling researchers and bioinformaticians to work with molecular structure files in these formats.

The package is designed for Python 3.6 and later, installs with minimal dependencies (ihm is the only required runtime package), and offers optional BinaryCIF support when msgpack is available. It is actively maintained and well-documented, with worked examples and comprehensive documentation available.

Use it for:

  • Parse ModelCIF mmCIF files from structural biology databases or local sources.
  • Generate or modify mmCIF files programmatically for molecular modeling workflows.
  • Convert between mmCIF and BinaryCIF formats when msgpack is installed.
  • Integrate ModelCIF data handling into bioinformatics pipelines.
  • Validate mmCIF files against the ModelCIF extension specification.

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 ModelCIF extension, with optional BinaryCIF support via msgpack.

Yes. Low install friction, active maintenance, permissive MIT license, no known vulnerabilities, and a focused scope make it a safe choice for projects needing ModelCIF file handling. Install it if you work with mmCIF or BinaryCIF files in structural biology; skip it if you have no need for these formats.

Install

modelcif on PyPI

pip

pip install modelcif

uv

uv add modelcif

poetry

poetry add modelcif

Installing modelcif

Before you install

Low friction: pure Python wheel with a single runtime dependency (ihm). Active maintenance with a recent release (125 days ago) and ongoing repository commits.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects without licensing concerns.

Quickstart

pip install modelcif

import modelcif
# Load or create ModelCIF structures via the ihm dependency

Requires Python 3.6 or later. BinaryCIF support requires the optional msgpack package.

Verify before relying

  • Specific API surface and typical workflows beyond file I/O are not detailed in the excerpt.
  • Whether msgpack is automatically installed or must be added separately for BinaryCIF support.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — ihm
Maintenance actively maintained — 125 days since the last release
Last repo commit
First released
Downloads 175,256/month — #10,267 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: modelcif-1.7-py3-none-any.whl

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

Tags

mmcif file handlingbinarycif parsermodelcif formatstructural biology file formatspdb mmcif readermolecular structure serializationihm model format
structural-biologyfile-formatmolecular-modeling

More Scientific/Engineering packages