mrcfile
MRC file I/O library
Decision gist · record as of 2026-08-14
Yes. mrcfile is a stable, actively maintained library with low install friction (numpy only) and no known vulnerabilities. It fills a specific, well-defined role in structural biology workflows. Install it if you work with MRC format files in cryo-EM or related fields; skip it if you have no need for MRC file I/O.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only numpy as a runtime dependency.
- Active maintenance with recent commits and a stable release history since 2016.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2025-01-22 (569 days) · last repo commit 2026-03-02 · 86 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 434,123 downloads/mo, #6,696 on PyPI
Alternatives
Verify before relying
pip install mrcfile
import mrcfile
import numpy as np
with mrcfile.open('file.mrc') as mrc:
data_slice = mrc.data[10, 10]
array = np.zeros((5, 5), dtype=np.int8)
with mrcfile.new('output.mrc') as mrc:
mrc.set_data(array)
mrc.data[1:4, 1:4] = 10- Whether memory-mapped and asynchronous file loading features are production-ready and documented
- Performance characteristics for very large files relative to alternatives
What it is and what it does
mrcfile is a Python library for reading and writing MRC2014 format files, the standard format for storing 3D image and volume data in structural biology and cryo-electron microscopy. It provides a clean, simple API that exposes file headers and data as numpy arrays, making it easy to inspect, modify, and save MRC files without compiled dependencies beyond numpy itself.
The library supports gzip and bzip2 compressed files, includes validation against the MRC2014 specification, and offers memory-mapped access for efficient random access to large files. It runs on Python 2.7 and modern Python 3 versions across Linux, macOS, and Windows, and is actively maintained as part of the CCP-EM software suite used in structural biology research.
Use it for
- Load and inspect 3D electron microscopy density maps in cryo-EM workflows
- Create and modify MRC format files programmatically in image processing pipelines
- Validate MRC file headers and data compliance with the MRC2014 standard
- Access large volume datasets efficiently using memory-mapped file mode
- Convert between MRC format and numpy arrays for analysis in scientific Python code
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
mrcfile is a stable, actively maintained library with low install friction (numpy only) and no known vulnerabilities. It fills a specific, well-defined role in structural biology workflows. Install it if you work with MRC format files in cryo-EM or related fields; skip it if you have no need for MRC file I/O.
Install
mrcfile on PyPI
Before you install
Low friction: pure Python wheel with only numpy as a runtime dependency. Active maintenance with recent commits and a stable release history since 2016.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install mrcfile
import mrcfile
import numpy as np
with mrcfile.open('file.mrc') as mrc:
data_slice = mrc.data[10, 10]
array = np.zeros((5, 5), dtype=np.int8)
with mrcfile.new('output.mrc') as mrc:
mrc.set_data(array)
mrc.data[1:4, 1:4] = 10
Verify before relying
- Whether memory-mapped and asynchronous file loading features are production-ready and documented
- Performance characteristics for very large files relative to alternatives
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 569 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 434,123 / month, #6,696 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Bio-InformaticsTopic :: Software Development :: Libraries :: Python Modules |
Evidence: mrcfile-1.5.4-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “MRC file format reader writer”
- mrcfilemrcfile reads and writes MRC2014 format files used in structural…
- rosettasciioRosettaSciIO reads and writes scientific data files across many…
- libconfReads and writes configuration files in libconfig format, a format…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also rosettasciio · modelcif · ome-zarr · ihm · mmcif-pdbx · gemmi · mmcif · safetensors · python-libsbml · fitsio