Skip to main content

Icon pyobjcryst

PyPI Forge PythonVersion PR

CI Codecov Black Tracking

Python bindings to ObjCryst++, the Object-Oriented Crystallographic Library.

For more information about the pyobjcryst library, please consult our online documentation.

pyobjcryst is an open-source software package originally developed as a part of the DiffPy-CMI complex modeling initiative which originated in the DANSE project at Columbia University. It was further developed at Brookhaven National Laboratory, and Columbia University and the European Synchrotron Radiation Source (ESRF) and is now maintained at University of California, Santa Barbara and ESRF. The pyobjcryst sources are hosted at https://github.com/diffpy/pyobjcryst.

Citation

If you use diffpy.srfit in a scientific publication, we would like you to cite this package as

P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge, Complex modeling: a strategy and software program for combining multiple information sources to solve ill posed structure and nanostructure inverse problems, Acta Crystallogr. A 71, 562-568 (2015).

and

V. Favre-Nicolin and R. Cerný, FOX, ‘free objects for crystallography’: a modular approach to ab initio structure determination from powder diffraction, J. Appl. Cryst. 35, 734-743 (2002)

The second paper describes the c++ crystallographic objects in ObjCryst++ that are wrapped by pyobjcryst

Installation

The latest release of pyobjcryst runs in python versions 3.12, 3.13, 3.14 and 3.15. You may specify an earlier release if you need it to run in an earlier version of Python.

The preferred method is to use Miniconda Python and install from the “conda-forge” channel of Conda packages.

To permanently add “conda-forge” to the conda channels (recommended), run the following in a terminal.

conda config --add channels conda-forge

We want to install our packages in a suitable conda environment. The following creates and activates a new environment named pyobjcryst-env

conda create -n pyobjcryst-env pyobjcryst
conda activate pyobjcryst-env

To confirm that the installation was successful, type

python -c "import pyobjcryst; print(pyobjcryst.__version__)"

The output should print the latest version displayed on the badges above.

pyobjcryst is also included in the diffpy.cmi collection of packages for structure analysis and so can be installed by

conda install -c conda-forge diffpy.cmi

and following the instructions in the diffpy.cmi documentation to install packs containing pyobjcryst and its libraries.

Optional graphical dependencies for jupyter notebooks

Some of the classes can produce graphical outputs, which can be displayed in a jupyter notebook:

  • a Crystal structure can be displayed in 3D: this requires the py3dmol and ipywidgets modules. See the notebook docs/examples/cystal_3d_widget.ipynb

  • a PowderPattern can be displayed (and live-updated) if matplotlib and ipympl are installed. See the notebook docs/examples/structure-solution-powder-cimetidine.ipynb

Getting Started

You may consult our online documentation for tutorials and API references.

Alternative methods of installation

These approaches are not recommended but reproduced here for advanced users. You can use pip to download and install the latest release from Python Package Index. The PyPI wheels are self-contained (ObjCryst++, cctbx and newmat are built in), so no compiler or conda libraries are needed

pip install pyobjcryst

The optional graphical dependencies can be installed with

pip install ipywidgets matplotlib ipympl py3dmol

To build from source, a C++ compiler is required; CMake, nanobind and the Boost headers are fetched automatically by pip. ObjCryst++ is included as a git submodule, so clone with --recursive (or run git submodule update --init in an existing clone)

git clone --recursive https://github.com/diffpy/pyobjcryst.git
cd pyobjcryst
pip install .

Outside a conda environment, e.g. on Ubuntu Linux, the compiler and Boost headers can be installed using

sudo apt-get install build-essential python3-dev python3-pip libboost-dev

Boost headers can also be installed from conda-forge (libboost-headers), or their location given explicitly with pip install . -Ccmake.define.BOOST_INCLUDE_DIR=<path>.

Testing your installation

The installation integrity can be verified by executing the included tests.

First install test dependencies then type pytest:

conda install --file requirements/tests.txt
pytest

Support and Contribute

If you see a bug or want to request a feature, please report it as an issue and/or submit a fix as a PR.

Feel free to fork the project and contribute. To install pyobjcryst in a development mode, with its sources being directly used by Python rather than copied to a package directory, use the following in the root directory

pip install -e .

To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit hooks.

  1. Install pre-commit in your working environment by running conda install pre-commit.

  2. Initialize pre-commit (one time only) pre-commit install.

Thereafter your code will be linted by black and isort and checked against flake8 before you can commit. If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before trying to commit again.

When developing it is preferable to compile the extension module with debug information and C-assertions checks

pip install -e . -Ccmake.build-type=Debug

Improvements and fixes are always appreciated.

Before contributing, please read our Code of Conduct.

Contact

For more information on pyobjcryst please visit the project web-page or email Simon Billinge at sbillinge@ucsb.edu.

You can also contact Vincent Favre-Nicolin (favre@esrf.fr) if you are using pyobjcryst outside diffpy, e.g. to display structures in a notebook, refine powder patterns or solve structures using the global optimisation algorithms, etc..

Acknowledgements

This package bundles the following IUCr data files for bona fide research use:

pyobjcryst is built and maintained with scikit-package.

Metadata

Release files for pyobjcryst 2026.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyobjcryst 2026.2.0
File Size Uploaded Provenance Actions
pyobjcryst-2026.2.0.tar.gz 3.8 MB Without provenance Details for pyobjcryst-2026.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyobjcryst 2026.2.0
File Actions
pyobjcryst-2026.2.0-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details for pyobjcryst-2026.2.0-cp315-cp315-win_amd64.whl
pyobjcryst-2026.2.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for pyobjcryst-2026.2.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_x86_64.whl CPython 3.15 CPython 3.15 macOS 11.0+ x86-64 Details for pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_x86_64.whl
pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_arm64.whl CPython 3.15 CPython 3.15 macOS 11.0+ ARM64 Details for pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_arm64.whl
pyobjcryst-2026.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for pyobjcryst-2026.2.0-cp314-cp314-win_amd64.whl
pyobjcryst-2026.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for pyobjcryst-2026.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 11.0+ x86-64 Details for pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_x86_64.whl
pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_arm64.whl
pyobjcryst-2026.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for pyobjcryst-2026.2.0-cp313-cp313-win_amd64.whl
pyobjcryst-2026.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for pyobjcryst-2026.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_x86_64.whl
pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_arm64.whl
pyobjcryst-2026.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pyobjcryst-2026.2.0-cp312-cp312-win_amd64.whl
pyobjcryst-2026.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for pyobjcryst-2026.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_x86_64.whl
pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 36.2 MB

Release files / pyobjcryst-2026.2.0.tar.gz

Download URL pyobjcryst-2026.2.0.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
7b2b0acb836ab168b0a179a13c0df6a09ceb6db3b409c4b1eed2545b04123415
BLAKE2b-256 checksum
How to use checksums
e697bc846eefd9d20901834938fa16d8a0e29b8c465dd9f8c6cc835c62188ab9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp315-cp315-win_amd64.whl

Download URL pyobjcryst-2026.2.0-cp315-cp315-win_amd64.whl
Size 1.9 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
52d69e9202101d6ad6e21f1559476b1471ff98f4897ef9c1bf94f270dbb49c4c
BLAKE2b-256 checksum
How to use checksums
e56e1a867cb074ada71647b77532d259107f87f804f8233e8e850048535fc309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.15 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3619f5be48d19b57b4ce8a3cc1956772faebb97e08c8e4ca479c646f66f5d7f7
BLAKE2b-256 checksum
How to use checksums
7b7f3ecc789090f66b861a05c9507a1a96db3a872dda817b02e0ef6ae72a0aa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_x86_64.whl
Size 2.0 MB
Tags CPython 3.15 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
08d41f34333e61b2c8b89d0e0481a7966e3cd03ecbe4eba5b4c6c1c4fd0df10e
BLAKE2b-256 checksum
How to use checksums
531fd83f863c065175185fac5185d7df171763cb80574d30a52b9efbe8ee659a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_arm64.whl

Download URL pyobjcryst-2026.2.0-cp315-cp315-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.15 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
46fd900eac6e502897dd0d12e61169d793a6d664440efb3341222b43e8e4602d
BLAKE2b-256 checksum
How to use checksums
1e7399105c49a9099f71439568b6278c4df2a3c6f5fdf94bcb9e3abcc793b688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp314-cp314-win_amd64.whl

Download URL pyobjcryst-2026.2.0-cp314-cp314-win_amd64.whl
Size 1.9 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2ca8b9d0ce3c6175337517c73d0eb7d9b4b37d843a5daaaaeed5036ada386579
BLAKE2b-256 checksum
How to use checksums
e1df0f0c09900aadbff84237223a303caddbcc0a7cb6f983beed2f6297ff354d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
becca10c6f575096a0e429f5333ae8baf46ab045c18889d1c2747be8fe15c762
BLAKE2b-256 checksum
How to use checksums
dc38a902bf221bc3b2611c0ddbacde354b5e36987e4aaf36d071416b9ea2e8b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_x86_64.whl
Size 2.0 MB
Tags CPython 3.14 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
5120f4846ea7469f17db32f32bb66bd1f27f4d2c1e60f1521fc7c60df1fa35a8
BLAKE2b-256 checksum
How to use checksums
752cfcbd8d368c4c7c9605bba2e66214e810b6222536fba49a601916c212665e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL pyobjcryst-2026.2.0-cp314-cp314-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a6f9caf0a23a95c3e6c967318d35af88873a4d325a1158d5aa7414f39aecbc02
BLAKE2b-256 checksum
How to use checksums
3a7c67f0d96dda90a46afe205f1d04e5938dcd789b9bfe1be58ff06d7ab24ff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp313-cp313-win_amd64.whl

Download URL pyobjcryst-2026.2.0-cp313-cp313-win_amd64.whl
Size 1.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
9b88a89547c480b144cd82cd0caa4dcc6c2cdf77090b80e590c895f528b08b90
BLAKE2b-256 checksum
How to use checksums
5515e043fa0b7c24ea67ee17cbf69d817d8af04320ea20d34ccdd506027b7509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
90c180fed6348a34c067481da0e2111bd38399abda58082249d37e1f9adf5753
BLAKE2b-256 checksum
How to use checksums
90ff8457c430e0676d51ebecb941fd6598319266be06cab7012f4d7be3282015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_x86_64.whl
Size 2.0 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
a3a52e8c0638a15af8259d44a60770bbb7b96f367900985e68f73aa6fbb15317
BLAKE2b-256 checksum
How to use checksums
737737b386f1cc05dbb8c8e10ae79cf58e9b38f76b535c873f88792617e2b2ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL pyobjcryst-2026.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
643bbc7e124bb4c4545a4edb3f73c5d69c56e2e9f66bfe7b436a0e1cc6e00ab2
BLAKE2b-256 checksum
How to use checksums
0a053111f17640bbbe8dd84c03b471b1558102d453d45a7c5f53e3538bb21202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp312-cp312-win_amd64.whl

Download URL pyobjcryst-2026.2.0-cp312-cp312-win_amd64.whl
Size 1.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
aeba43e8784ceb003483f30211cc9229064ce9f78c739d8b3c12d5d1026df3a0
BLAKE2b-256 checksum
How to use checksums
a7c43a7c319784827959bb83e7106ba3787b73fe4048cfb3f4d8634e826c544d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3636cb7a5e9ba60145c6ff6b7dd95f8e8a203bdf55f9697157fed2ebcb45da25
BLAKE2b-256 checksum
How to use checksums
1222cf8e649c848cf491598e7761749788bcd93238c53ecf56ec89c91b66cc28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_x86_64.whl
Size 2.0 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
4be3f3650fcaff42127104ce6fd5e1fa2537d2c04e34150ae5be18414d60998c
BLAKE2b-256 checksum
How to use checksums
a08a9d2bbfa6242329961e4acd78daf9cb442af67aafb39818545ab1203085b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyobjcryst-2026.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d5279aa53e252a1e70f2241ef9d321f135901e53fe0ba80e7d9dd5024e5b59c9
BLAKE2b-256 checksum
How to use checksums
eb5e852556a4ff0e6541efffd5e2904d717999646bcd6f2d0b6af0fdaa703b34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for pyobjcryst 2026.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page