Skip to main content

Minimal library for parsing CIF & mmCIF files in Python.

Project description

https://raw.githubusercontent.com/glotzerlab/parsnip/refs/heads/main/doc/source/_static/parsnip_header_dark.svg

ReadTheDocs PyPI conda-forge

parsnip is a minimal Python library for parsing CIF files. While its primary focus is on simplicity and portability, performance-oriented design choices are made where possible.

Importing parsnip allows users to read CIF 1.1 files, as well as many features from the CIF 2.0 and mmCIF formats. Creating a CifFile object provides easy access to name-value pairs, as well as loop_-delimited loops. Data entries can be extracted as python primitives or numpy arrays for further use.

Setup

parsnip may be installed with pip or from conda-forge.

Installation via pip

python -m pip install parsnip-cif

Installation via conda-forge

conda install -c conda-forge parsnip-cif

Installation from source

First, clone the repository:

git clone https://github.com/glotzerlab/parsnip.git
cd parsnip

Then, choose one of the following. While parsnip is only dependent on Numpy, additional dependencies are required to run the tests and build the docs.

pip install .            # Install with no additional dependencies
pip install .[sympy]     # Install with sympy for symbolic unit cell math
pip install .[tests]     # Install with dependencies required to run tests (including sympy)
pip install .[tests,doc] # Install with dependencies required to run tests and make docs

Dependencies

numpy>=1.19
more-itertools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsnip_cif-0.4.1.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsnip_cif-0.4.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file parsnip_cif-0.4.1.tar.gz.

File metadata

  • Download URL: parsnip_cif-0.4.1.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parsnip_cif-0.4.1.tar.gz
Algorithm Hash digest
SHA256 bafd16efbf0149b787f66b70d6bd314da8f5e5c34a934b056e46297f75bffb81
MD5 3f44c85d9124e8ded06c7de9cec89001
BLAKE2b-256 b70578d4a137e31abf52c38821195a3c2e92d969cbf3ea8bf5c5100511ea7338

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsnip_cif-0.4.1.tar.gz:

Publisher: pypi-test-and-publish.yaml on glotzerlab/parsnip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsnip_cif-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: parsnip_cif-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parsnip_cif-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d60a6ea6b773fb5626ee73c55fcdc2c3300528148bf2e911e03536dcc718b92
MD5 4d55424e3f6896100426462a4e23095f
BLAKE2b-256 ea9a7a709b2862015a460c8c623b4215eb7ebc4fd805849c2657901db3226951

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsnip_cif-0.4.1-py3-none-any.whl:

Publisher: pypi-test-and-publish.yaml on glotzerlab/parsnip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page