pyobjcryst - Python bindings to the ObjCryst++ Object-Oriented Crystallographic Library
pyobjcryst and libobjcryst conda packages can be easily installed under Linux and macOS using channel conda-forge or diffpy channels, e.g.
conda install -c conda-forge libobjcryst pyobjcryst
conda install -c diffpy libobjcryst pyobjcryst
It is recommended to use the conda-forge channel which is updated more frequently than the diffpy one, unless you only use pyobjcryst through the DiffPy-CMI tools.
See the README file included with the distribution for more details.
Complete conda environment with optional GUI and jupyter dependencies¶
The fastest way to use pyobjcryst is to first install the Mamba-forge distribution (which is faster than traditional conda), and then you can directly create a new conda environment named pyobjcryst with all useful dependencies (including jupyter-lab, python 3.11..) using
mamba create -n pyobjcryst python=3.11 pyobjcryst matplotlib py3dmol jupyterlab ipympl multiprocess
(note: if you do not know mamba, it is a command equivalent to conda except much faster)
Then activate the environment and launch jupyter-lab using
conda activate pyobjcryst jupyter-lab
Usage & notebooks¶
pyobjcryst can be used
as a backend library to manage crystal structures description in an application like DiffPy-CMI
in python scripts or notebooks, allowing to:
display crystal structures,
index and refine powder diffraction patterns
solve crystal structures from diffraction data using global optimisation algorithms
The API documentation can be found in pyobjcryst API.
You can also read the documentation of the underlying ObjCryst++ library.