This release is a pre-release and may not be stable for production use.
pyobjcryst
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.
Install pre-commit in your working environment by running conda install pre-commit.
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:
cpd-1a.prn: Powder diffraction dataset from the IUCr CPD Round Robin on Quantitative Phase Analysis.
Source: https://www.iucr.org/__data/iucr/powder/QARR/col/cpd-1a.prn
Round Robin on Quantitative Phase Analysis: Madsen, I. (1997) ‘Round Robin on Quantitative Phase Analysis’, Powder Diffraction, 12(1), pp. 1–2. Available at: https://doi.org/10.1017/S0885715600020212.
pyobjcryst is built and maintained with scikit-package.
Metadata
Release files for pyobjcryst 2026.2.0rc1
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 |
|---|---|---|---|---|
| pyobjcryst-2026.2.0rc1.tar.gz | 3.8 MB | Without provenance | Details for pyobjcryst-2026.2.0rc1.tar.gz |
Built distributions (wheels)
Total release size: 36.2 MB
Release files / pyobjcryst-2026.2.0rc1.tar.gz
| Download URL | pyobjcryst-2026.2.0rc1.tar.gz |
|---|---|
| Size | 3.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d8783fa063845f1eb0b2b11372c788fcc7d8f91fa37fe98f8ab5296a8fb616a
|
|
BLAKE2b-256 checksum How to use checksums |
b5016a1410d5d21de26e73c7e1a001aa9f1454e7ede079ff5e5c70b57f53b949
|
| 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.0rc1-cp315-cp315-win_amd64.whl
| Download URL | pyobjcryst-2026.2.0rc1-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
143fd33714e28c7dbb598ed423f818a46a7ba800741cdc7fdab766e03ae1f2a7
|
|
BLAKE2b-256 checksum How to use checksums |
cff7cb81dfafd3902d90e5265f47d03841822a694c6ed2379e8e7dbbd132f14b
|
| 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.0rc1-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
992fdd5a31091f5e1a4a48cf8ffa575536af0698804dd8e523fabbb2ed2e1bb9
|
|
BLAKE2b-256 checksum How to use checksums |
a069477dece01eaa493023868502f94baaddc982695e85185937f3cc43f8f2ea
|
| 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.0rc1-cp315-cp315-macosx_11_0_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
6fbf00057a346e371ec056062b1d29e9f6b61bee8ed0ad1ebf320deeb83f40be
|
|
BLAKE2b-256 checksum How to use checksums |
1d28c3da713a60141d8687b6c475a224b43b41fd18241b957e2c541e0e54e9de
|
| 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.0rc1-cp315-cp315-macosx_11_0_arm64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
ce112a582f57a8788fcbd424282a6be61486fa457db10fe78b4a7a3c1b584fe3
|
|
BLAKE2b-256 checksum How to use checksums |
c18d48616aa6b637ab0bb2b5de534e58fb6dae6274426aedc8eaea38c4f41d85
|
| 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.0rc1-cp314-cp314-win_amd64.whl
| Download URL | pyobjcryst-2026.2.0rc1-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3b0df561cfd6c899bc6b10cd10f96faee0f6a4f96c88265e9c2190895e555271
|
|
BLAKE2b-256 checksum How to use checksums |
4193fc8234490e6a8afa25b39d56733686d70bb7e9a02969c2c5a71b5e190f0c
|
| 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.0rc1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
b6dc405692cec291dfd5d11b7082d5b97931d269d2c9568153a4706479280c31
|
|
BLAKE2b-256 checksum How to use checksums |
629c7283ec67dd914ce355a1059296bc8b87ce40ab4742f5314359981e86a4a8
|
| 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.0rc1-cp314-cp314-macosx_11_0_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
07176b975772667dc8a5a31dcb01f73643ca058854537c52b59e4e028f0e891b
|
|
BLAKE2b-256 checksum How to use checksums |
e3fd6f03547746432293465fec6341c139f61d2e94877ef6b93b056b616ce715
|
| 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.0rc1-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
eccd6450d67fded5a640c0040bf86b55508eb664cf992076617b33c8d9cb24e6
|
|
BLAKE2b-256 checksum How to use checksums |
058b2d5d2e6087f08c53cfc1dde1bef6bb2e722efe7a8a2b97efd3e1814bf7ce
|
| 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.0rc1-cp313-cp313-win_amd64.whl
| Download URL | pyobjcryst-2026.2.0rc1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8f746f6efd2d803896a5692bc9cec4f75d4260172e1bdb39669eaf0e5bbda44b
|
|
BLAKE2b-256 checksum How to use checksums |
402b7bdb2d15615aeaba2074d9b0edcb441f5aa578fd856d76b01d3e74d97519
|
| 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.0rc1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
de61cbd72b358759a8b58d2285b5aa8237a045df896b7470dbc599d723710150
|
|
BLAKE2b-256 checksum How to use checksums |
277bb921592e9c9e90e32e7109f4269f1ab284384c1660368896f335069b014a
|
| 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.0rc1-cp313-cp313-macosx_11_0_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
c4d018a2b1b937d1bc447fe07b3d139dc109c34e42b2904cf3b6b749a82a5459
|
|
BLAKE2b-256 checksum How to use checksums |
a37bc78ed45b2ec2c26eaf10fcbb3c856c1f562e1d4ef0ba117f4231941c9e35
|
| 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.0rc1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
ed5a9d6c68bd186e2cf728278a068498fa6ecaae661e39d979419f9f88cfea9f
|
|
BLAKE2b-256 checksum How to use checksums |
1e5adac9b3f4d09f9d8a88fc48943a9a0fea4e066f41a60f68715addf156bc49
|
| 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.0rc1-cp312-cp312-win_amd64.whl
| Download URL | pyobjcryst-2026.2.0rc1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
04dc6da7a7d8b73db2539a9bb1f0bfde3e55977cbf2cecdef4ee179dfcc1236a
|
|
BLAKE2b-256 checksum How to use checksums |
51902769d6c97c79ad022c279ef632f5550c5c96494ef9e78dc0699c01813070
|
| 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.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
a764775ccbedbaf36088dbf8a917a19929daf698dd3bd78e0003b666d7657ac7
|
|
BLAKE2b-256 checksum How to use checksums |
d3cb914484b2296fce43b14a15fbe4d045d8719d995cf0133c536ff0dd9af591
|
| 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.0rc1-cp312-cp312-macosx_11_0_x86_64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
535e3fb66fe3da5496cb74862d83ea9af95a7863e4159ef25a575295d83b14c0
|
|
BLAKE2b-256 checksum How to use checksums |
99de29759ccf75312be37488713ed8640abf0c402eee0c3019f4b517e7872a60
|
| 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.0rc1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pyobjcryst-2026.2.0rc1-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 |
6a8996bce5684646def834f2448072183680d8a81ec94771b6ba899fb2fae94b
|
|
BLAKE2b-256 checksum How to use checksums |
b86497ec36cce9e98b2afa2c79f4a8366d253f0bf0cbdb84318005284ff9e5e5
|
| 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.0rc1
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.