.. _images:
.. image:: https://raw.githubusercontent.com/glotzerlab/parsnip/refs/heads/main/doc/source/_static/parsnip_header_dark.svg
:width: 600
.. _header:
..
TODO: set up Readthedocs, PyPI, and conda-forge
|ReadTheDocs|
|PyPI|
|conda-forge|
.. |ReadTheDocs| image:: https://readthedocs.org/projects/parsnip-cif/badge/?version=latest
:target: http://parsnip-cif.readthedocs.io/en/latest/?badge=latest
.. |PyPI| image:: https://img.shields.io/pypi/v/parsnip-cif.svg
:target: https://pypi.org/project/parsnip-cif/
.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/parsnip-cif.svg
:target: https://anaconda.org/conda-forge/parsnip-cif
.. _introduction:
**parsnip** is a minimal Python library for parsing `CIF <https://www.iucr.org/resources/cif>`_ files. While its primary focus is on simplicity and portability, performance-oriented design choices are made where possible.
.. _parse:
Importing ``parsnip`` allows users to read `CIF 1.1 <https://www.iucr.org/resources/cif/spec/version1.1>`_ files, as well as many features from the `CIF 2.0 <https://www.iucr.org/resources/cif/cif2>`_ and `mmCIF <https://pdb101.rcsb.org/learn/guide-to-understanding-pdb-data/beginner’s-guide-to-pdb-structures-and-the-pdbx-mmcif-format>`_ 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.
.. _CifFile: https://parsnip-cif.readthedocs.io/en/latest/package-parse.html#parsnip.parsnip.CifFile
.. _pairs: https://parsnip-cif.readthedocs.io/en/latest/package-parse.html#parsnip.parsnip.CifFile.pairs
.. _loops: https://parsnip-cif.readthedocs.io/en/latest/package-parse.html#parsnip.parsnip.CifFile.loops
.. _installing:
Setup
-----
**parsnip** may be installed with **pip** or from **conda-forge**.
Installation via pip
^^^^^^^^^^^^^^^^^^^^
.. code:: bash
python -m pip install parsnip-cif
Installation via conda-forge
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code:: bash
conda install -c conda-forge parsnip-cif
Installation from source
^^^^^^^^^^^^^^^^^^^^^^^^
First, clone the repository:
.. code:: bash
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.
.. code:: bash
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
^^^^^^^^^^^^
.. code:: text
numpy>=1.19
more-itertools
.. _contributing:
Raw data
{
"_id": null,
"home_page": null,
"name": "parsnip-cif",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "Development Status :: 4 - Beta, License :: OSI Approved :: BSD License, Programming Language :: Python :: 3.7, Programming Language :: Python :: 3.8, Programming Language :: Python :: 3.9, Programming Language :: Python :: 3.10, Programming Language :: Python :: 3.11, Programming Language :: Python :: 3.12, Topic :: Scientific/Engineering :: Physics, Topic :: Scientific/Engineering :: Chemistry",
"author": null,
"author_email": "Jen Bradley <jenbrad@umich.edu>",
"download_url": "https://files.pythonhosted.org/packages/cf/2a/ae515e55624aba2377f1b00b143795b8c7538e2b6e0542b83bbc3df63037/parsnip_cif-0.3.0.tar.gz",
"platform": null,
"description": ".. _images:\n\n.. image:: https://raw.githubusercontent.com/glotzerlab/parsnip/refs/heads/main/doc/source/_static/parsnip_header_dark.svg\n :width: 600\n\n\n.. _header:\n\n..\n TODO: set up Readthedocs, PyPI, and conda-forge\n\n|ReadTheDocs|\n|PyPI|\n|conda-forge|\n\n.. |ReadTheDocs| image:: https://readthedocs.org/projects/parsnip-cif/badge/?version=latest\n :target: http://parsnip-cif.readthedocs.io/en/latest/?badge=latest\n.. |PyPI| image:: https://img.shields.io/pypi/v/parsnip-cif.svg\n :target: https://pypi.org/project/parsnip-cif/\n.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/parsnip-cif.svg\n :target: https://anaconda.org/conda-forge/parsnip-cif\n\n\n.. _introduction:\n\n**parsnip** is a minimal Python library for parsing `CIF <https://www.iucr.org/resources/cif>`_ files. While its primary focus is on simplicity and portability, performance-oriented design choices are made where possible.\n\n.. _parse:\n\nImporting ``parsnip`` allows users to read `CIF 1.1 <https://www.iucr.org/resources/cif/spec/version1.1>`_ files, as well as many features from the `CIF 2.0 <https://www.iucr.org/resources/cif/cif2>`_ and `mmCIF <https://pdb101.rcsb.org/learn/guide-to-understanding-pdb-data/beginner\u2019s-guide-to-pdb-structures-and-the-pdbx-mmcif-format>`_ formats.\nCreating a `CifFile`_ object provides easy access to name-value `pairs`_, as well\nas `loop\\_`-delimited `loops`_. Data entries can be extracted as python primitives or\nnumpy arrays for further use.\n\n.. _CifFile: https://parsnip-cif.readthedocs.io/en/latest/package-parse.html#parsnip.parsnip.CifFile\n.. _pairs: https://parsnip-cif.readthedocs.io/en/latest/package-parse.html#parsnip.parsnip.CifFile.pairs\n.. _loops: https://parsnip-cif.readthedocs.io/en/latest/package-parse.html#parsnip.parsnip.CifFile.loops\n\n.. _installing:\n\nSetup\n-----\n\n**parsnip** may be installed with **pip** or from **conda-forge**.\n\n\nInstallation via pip\n^^^^^^^^^^^^^^^^^^^^\n\n.. code:: bash\n\n python -m pip install parsnip-cif\n\nInstallation via conda-forge\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: bash\n\n conda install -c conda-forge parsnip-cif\n\n\nInstallation from source\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nFirst, clone the repository:\n\n.. code:: bash\n\n git clone https://github.com/glotzerlab/parsnip.git\n cd parsnip\n\nThen, choose one of the following. While **parsnip** is only dependent on Numpy,\nadditional dependencies are required to run the tests and build the docs.\n\n.. code:: bash\n\n pip install . # Install with no additional dependencies\n pip install .[sympy] # Install with sympy for symbolic unit cell math\n pip install .[tests] # Install with dependencies required to run tests (including sympy)\n pip install .[tests,doc] # Install with dependencies required to run tests and make docs\n\nDependencies\n^^^^^^^^^^^^\n\n.. code:: text\n\n numpy>=1.19\n more-itertools\n\n.. _contributing:\n",
"bugtrack_url": null,
"license": null,
"summary": "Minimal library for parsing CIF & mmCIF files in Python.",
"version": "0.3.0",
"project_urls": {
"Issues": "https://github.com/glotzerlab/parsnip/issues",
"Source": "https://github.com/glotzerlab/parsnip"
},
"split_keywords": [
"development status :: 4 - beta",
" license :: osi approved :: bsd license",
" programming language :: python :: 3.7",
" programming language :: python :: 3.8",
" programming language :: python :: 3.9",
" programming language :: python :: 3.10",
" programming language :: python :: 3.11",
" programming language :: python :: 3.12",
" topic :: scientific/engineering :: physics",
" topic :: scientific/engineering :: chemistry"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "54cae1788151038d9e09717109a0ed74df2cfcf18ae00e622d3a1415b90d3568",
"md5": "64eb34df3616bd5b2b133c520f42fb08",
"sha256": "913680d3d171bd0516e785a5494edf4783eae31d9cc347061b442e52601d1407"
},
"downloads": -1,
"filename": "parsnip_cif-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "64eb34df3616bd5b2b133c520f42fb08",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 19005,
"upload_time": "2025-07-16T21:14:03",
"upload_time_iso_8601": "2025-07-16T21:14:03.028039Z",
"url": "https://files.pythonhosted.org/packages/54/ca/e1788151038d9e09717109a0ed74df2cfcf18ae00e622d3a1415b90d3568/parsnip_cif-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cf2aae515e55624aba2377f1b00b143795b8c7538e2b6e0542b83bbc3df63037",
"md5": "85973541770cfe62c043453b776c1402",
"sha256": "aa600057cd09400e0be0b83ae1b005aaea6f36c62b853ba80dfae1c67821b061"
},
"downloads": -1,
"filename": "parsnip_cif-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "85973541770cfe62c043453b776c1402",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 27303,
"upload_time": "2025-07-16T21:14:04",
"upload_time_iso_8601": "2025-07-16T21:14:04.456015Z",
"url": "https://files.pythonhosted.org/packages/cf/2a/ae515e55624aba2377f1b00b143795b8c7538e2b6e0542b83bbc3df63037/parsnip_cif-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 21:14:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "glotzerlab",
"github_project": "parsnip",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "more-itertools",
"specs": []
},
{
"name": "numpy",
"specs": [
[
">=",
"1.19.0"
]
]
}
],
"lcname": "parsnip-cif"
}