cifmi
cifmi reads CIF 1.1 and 2.0 files into crystal structures, with the cell, the space group, the sites, the symmetry operations and every atom of the unit cell, and writes crystal structures as standard CIF 1.1. It is written in Rust, with Python and Node.js bindings.
Quick start
Python
import cifmi
structure = cifmi.read_cif("sample.cif")
for atom in structure.atoms:
print(structure.sites[atom.site].label, atom.fractional)
cifmi.write_cif("copy.cif", structure)
Rust
use cifmi::{read_cif, write_cif, CifOptions};
fn main() -> Result<(), cifmi::Error> {
let structure = read_cif("sample.cif", &CifOptions::default())?;
for atom in &structure.atoms {
println!("{} {:?}", structure.sites[atom.site].label, atom.position);
}
write_cif("copy.cif", &structure)
}
Node.js
const cifmi = require('cifmi')
cifmi.readCifFile('sample.cif').then((structure) => {
for (const atom of structure.atoms) {
console.log(structure.sites[atom.site].label, atom.fractional)
}
return cifmi.writeCifFile('copy.cif', structure)
})
A structure from another crystal model is written the same way: build it
from its cell, operations and sites with Structure::new in Rust or
cifmi.Structure in Python; in Node.js, writeCifStr and writeCifFile
take any object of the shape readCifStr returns.
Every file is read one way, by crystallographic rules, and a file cifmi cannot read is an error with the reason. A structure is written as it is, in its own setting with the standard names. One cifmi reads writes as a CIF that reads back as the same structure, with repeated labels made unique; the design's §7 lists the few that read back otherwise or are refused. See the design for the rules and the evidence behind them, and CONTRIBUTING.md for development and releases.
Metadata
Release files for cifmi 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cifmi-0.2.1.tar.gz | 147.9 kB | With provenance | Details for cifmi-0.2.1.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| cifmi-0.2.1-cp311-abi3-win_arm64.whl | CPython 3.11 | abi3 | Windows ARM64 | Details for cifmi-0.2.1-cp311-abi3-win_arm64.whl |
| cifmi-0.2.1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details for cifmi-0.2.1-cp311-abi3-win_amd64.whl |
| cifmi-0.2.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details for cifmi-0.2.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| cifmi-0.2.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details for cifmi-0.2.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| cifmi-0.2.1-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for cifmi-0.2.1-cp311-abi3-macosx_11_0_arm64.whl |
Total release size: 3.1 MB
Release files / cifmi-0.2.1.tar.gz
| Download URL | cifmi-0.2.1.tar.gz |
|---|---|
| Size | 147.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e8e523879d6bd34f9cb33584d7febbe7683b2c6389b98920b593277a8b78c67
|
|
BLAKE2b-256 checksum How to use checksums |
5fa268748a2d0d3ff14c31f014a5d0d246d05b52a578e98c6953e75760221ced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / cifmi-0.2.1-cp311-abi3-win_arm64.whl
| Download URL | cifmi-0.2.1-cp311-abi3-win_arm64.whl |
|---|---|
| Size | 356.9 kB |
| Tags | CPython 3.11 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
062cbc60dffce137e8e98cb128251e58dc182c4ac0533f88999010397332dbec
|
|
BLAKE2b-256 checksum How to use checksums |
1396ae95b3a08341b306ccba79c81ea772396e1479c6e21251d6f1910e775f60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / cifmi-0.2.1-cp311-abi3-win_amd64.whl
| Download URL | cifmi-0.2.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 382.9 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d9c2d80ed5e8dbc229534c37834fdcd3c7159ff97cd816caa0efbf30653d97a8
|
|
BLAKE2b-256 checksum How to use checksums |
5c3dd3aaad3830b158d69deab792cd460a17316e3b96e290ebdf620a63faaffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / cifmi-0.2.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | cifmi-0.2.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 916.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d240f7406984f257187d1620ae0665679d339106135d198d96c7ca9989f4c05a
|
|
BLAKE2b-256 checksum How to use checksums |
c466368627ffc0921c0f0196b8ce9c52d79adfeb61384f9671ec7e9010d513d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / cifmi-0.2.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | cifmi-0.2.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 855.1 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
fd1aa23f1c77b613bccc5e9b12f5585be92e47b5b5da4d41ff8f74d92815b417
|
|
BLAKE2b-256 checksum How to use checksums |
520ba3cb281a5b06296b91406ba6962456733b37fc573de5eeaaff21c548fe52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / cifmi-0.2.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | cifmi-0.2.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 465.2 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9e8d403e907f67a56b921881fad19d8fb4edb45a248144d5e32150ba1162a3d4
|
|
BLAKE2b-256 checksum How to use checksums |
bec519f302eb4037305b13990bdd612fbcc7ef08a329ac03a011213331bbda44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for cifmi 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for cifmi-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.