Skip to content

glotzerlab/parsnip

Repository files navigation

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 .[tests]     # Install with dependencies required to run tests
pip install .[tests,doc] # Install with dependencies required to run tests and make docs

Dependencies

numpy>=1.19
more-itertools