Data structures for crystallography
Project description
crystals
crystals
is a library of data structure and algorithms to manipulate
abstract crystals in a Pythonic way. crystals
helps with reading
crystallographic files (like .cif and .pdb), provides access to atomic
positions, scattering utilities, allows for symmetry determination, and
indexing of diffraction peaks. Although crystals
can be used on its own,
it was made to be integrated into larger projects (like
scikit-ued).
Take a look at the documentation for more information and examples.
Installation
crystals
is available on the Python Package Index:
pip install crystals
For users of the conda package manager, crystals
is also available
from the conda-forge channel:
conda install -c conda-forge crystals
From source
crystals
can also be installed from source:
git clone https://github.com/LaurentRDC/crystals.git
cd crystals
# Pull the source for third-party C++ libraries, such as pinkindexer
git submodule update --init --recursive
python setup.py build_ext
# If you want to use crystals, use `install`
python setup.py install
# If you want to hack crystals, `use develop`
python setup.py develop
You can install the latest development version using pip
as well:
python -m pip install git+git://github.com/LaurentRDC/crystals.git
To build documentation, you will need a few more packages, listed in
dev-requirements.txt
. For example, to build documentation from source:
git clone https://github.com/LaurentRDC/crystals.git
cd crystals
pip install -r dev-requirements.txt
python setup.py build_sphinx
Documentation
The documentation, including user guides as well as detailed reference, is available here: https://crystals.readthedocs.io/
Development
Tests can be run with the pytest
package:
python -m pytest --pyargs crystals
Some optional tests might be skipped if dependencies are not installed, e.g. ASE.
Citations
As this package is a spinoff from scikit-ued
, please consider citing
the following publication if you find crystals
useful:
L. P. René de Cotret, M. R. Otto, M. J. Stern. and B. J. Siwick, An open-source software ecosystem for the interactive exploration of ultrafast electron scattering data, Advanced Structural and Chemical Imaging 4:11 (2018) DOI: 10.1186/s40679-018-0060-y.
Underlying algorithms provided by spglib
are described in the
following publication:
A. Togo and I. Tanaka, spglib: a software library for crystal symmetry search. https://arxiv.org/abs/1808.01590 (written at version 1.10.4).
Structure parsing from CIF files has been tested for correctness against CIF2CELL, detailed here:
Torbjorn Bjorkman, CIF2Cell: Generating geometries for electronic structure programs, Computer Physics Communications 182, 1183-1186 (2011) DOI: 10.1016/j.cpc.2011.01.013
Structure parsing from PDB files has been tested for correctness against
Bio.PDB
, detailed here:
Hamelryck, T., Manderick, B. PDB parser and structure class implemented in Python. Bioinformatics 19: 2308–2310 (2003)
Atomic weights are reported in the following publication:
Meija, J., Coplen, T., Berglund, M., et al. (2016). Atomic weights of the elements 2013 (IUPAC Technical Report). Pure and Applied Chemistry, 88(3), pp. 265-291. Retrieved 30 Nov. 2016, DOI:10.1515/pac-2015-0305
Covalent radii are reported in the following article:
Cordero, B. et al. (2008). Covalent radii revisited. Dalton Transactions, issue 21, pp. 2832-2838. The Royal Society of Chemistry. DOI: 10.1039/B801115j
Support / Report Issues
All support requests and issue reports should be filed on Github as an issue.
License
crystals
is made available under the GPLv3 license. For more
details, see LICENSE.
Related projects
- Streaming operations on NumPy arrays are available in the npstreams package.
- Interactive exploration of ultrafast electron diffraction data with the iris-ued package.
- Data structures and algorithms to handle ultrafast electron scattering data in the scikit-ued package.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for crystals-1.7.0a1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 835e9a6815ab8aea81fa7ff76741e5b1648d474c2ce559814ceea04a225377a6 |
|
MD5 | 8180051f31ec59e6df8922052bfaa291 |
|
BLAKE2b-256 | e490036152f47f03458d446bfe8250dde8ee2c420b2753881edd9c215391f297 |
Hashes for crystals-1.7.0a1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4f30f0fa14ce8eb8f2e62d87c7e6e00c8c03014804c74cd7dda4a15605318c |
|
MD5 | b3d18b0d66a5833ae96537efd2936f79 |
|
BLAKE2b-256 | e08ce7b8547eb2647155dc8b5ace0bfa10c8a5df34bab5070c1d0db20d2c0ede |
Hashes for crystals-1.7.0a1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691ee5c311eb86895e2ac73e31ddf36aa07c82ae8545765c22e925bc98b896bd |
|
MD5 | 91a240bf0f415b75ffc86e21c4b1a7fd |
|
BLAKE2b-256 | 83801545d3855da2a00a3b9ce132fe83659e2e377a176f1823259ab87878130a |
Hashes for crystals-1.7.0a1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d4b6326d6b3a41e35a89fdeac72d3d2889d9cba3732becf8a2e89f150666a6d |
|
MD5 | cd700838baeb210f9298582860baa263 |
|
BLAKE2b-256 | 691a63872eabb83d62a843917fd825540036c9bcec3d6c7421b32c158f1de732 |
Hashes for crystals-1.7.0a1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 864a317cfa031415afed42ecbfe501ed9dab0e6fe629feae91547e46484ffcee |
|
MD5 | 9a227e23e650858621433a8a7ed2c51e |
|
BLAKE2b-256 | 3cb15f4ec4b2ef1856e6a5d72a193a4bb758518a5d111763c980580463faf88a |
Hashes for crystals-1.7.0a1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c528e8c3b22fdcd6dd3b49870a3ab2c111ea366cc4765c954960dccbc66251bf |
|
MD5 | 03ee62e6a5dd0d56958c4f2230943402 |
|
BLAKE2b-256 | a01ae0377eeb0f7d434bbc64ff791ddb86e96e35337205227e990ec64b5b647d |
Hashes for crystals-1.7.0a1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1073914dfb1c4a2498cdec299c81c39cd647af3dc46bdca5e121ec83150e4588 |
|
MD5 | 6ad0b107f4071d25ebb4dad7b065365e |
|
BLAKE2b-256 | 8c43381f6f46e07e1c37998e2d7c788aa6df831573a28b8115faed950ba221e0 |
Hashes for crystals-1.7.0a1-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3977fbee9d0d57362b3b05469b3a5b5626d9d87dea2b9aacb069a57656f9a22e |
|
MD5 | cffa62bd24625099853c2e418120e99d |
|
BLAKE2b-256 | 2d135db250ea0398569d68b02e0f2d13f363e765a41af672b50b9453a74123da |
Hashes for crystals-1.7.0a1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c067342ff786dcca1282aa816f19fe1992bc027d7407e40fd58aa08b12ad8733 |
|
MD5 | 7c14557e059bed873233c4e006a566fc |
|
BLAKE2b-256 | 95278a8d8f93e5d09b9cad47767a6e588185ae33eb5eadd952d08e6cc0d8c802 |
Hashes for crystals-1.7.0a1-cp37-cp37m-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd1f1bc5b7f3de1d057ef4fa1b53a0f1c225ba7788b10ec401ec435e481ffb97 |
|
MD5 | 1405c0bf52d75ec7303a732c2a358ddd |
|
BLAKE2b-256 | 9259911bb8036b661bf0cc01d2783f2911f65291ee37565cae9a2c87465ed5a0 |