Skip to main content

crystals

Documentation Status PyPI Package latest release Conda-forge Version DOI badge

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
python setup.py install

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crystals-1.4.0.tar.gz (155.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

crystals-1.4.0-py3.9.egg (354.0 kB view details)

Uploaded Egg

crystals-1.4.0-py3.8.egg (353.5 kB view details)

Uploaded Egg

crystals-1.4.0-py3.7.egg (351.4 kB view details)

Uploaded Egg

crystals-1.4.0-py3-none-any.whl (254.4 kB view details)

Uploaded Python 3

File details

Details for the file crystals-1.4.0.tar.gz.

File metadata

  • Download URL: crystals-1.4.0.tar.gz
  • Upload date:
  • Size: 155.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for crystals-1.4.0.tar.gz
Algorithm Hash digest
SHA256 f5f362dccd7918f4de27c7da10b2d4b56723b9aa1bb864e4f6db1937c3866d03
MD5 10a0706e844368691889129eb5aa70b0
BLAKE2b-256 7cab6f2426e0b809527fd74dbec752d594e28f0864f9a7e1041d7fcb41b43668

See more details on using hashes here.

File details

Details for the file crystals-1.4.0-py3.9.egg.

File metadata

  • Download URL: crystals-1.4.0-py3.9.egg
  • Upload date:
  • Size: 354.0 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for crystals-1.4.0-py3.9.egg
Algorithm Hash digest
SHA256 ac13af86a64fce707b69cda78667ab4475c82d95707a7340695ced6ed022cbd4
MD5 b7cb6605102d63484f574a6a9b8226c4
BLAKE2b-256 93172866f4bed201b1dbfed5600009ea5fb1446d994023b0eb79659b57c18285

See more details on using hashes here.

File details

Details for the file crystals-1.4.0-py3.8.egg.

File metadata

  • Download URL: crystals-1.4.0-py3.8.egg
  • Upload date:
  • Size: 353.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for crystals-1.4.0-py3.8.egg
Algorithm Hash digest
SHA256 88eb1e07b0b93d16a1b4c9e8eedf83da045227adc84cec0f99473b85b04fe026
MD5 020d0c00f713b845f71a20d1c5620035
BLAKE2b-256 7dbe33b763c9a1ea37e5781c81ceb7948e806b31b89c25d854b3c30ab3466db7

See more details on using hashes here.

File details

Details for the file crystals-1.4.0-py3.7.egg.

File metadata

  • Download URL: crystals-1.4.0-py3.7.egg
  • Upload date:
  • Size: 351.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for crystals-1.4.0-py3.7.egg
Algorithm Hash digest
SHA256 8ebc3377fd7c6b1e9c60ae190495fb11ac8d3bee42e319833796da487f803d6e
MD5 b33b9c3eb76acf1da135ff42e7059d84
BLAKE2b-256 c9fb27a61a4992c81dbd640623dbd002e413127f2201b25055ed8ce5cca7c4e2

See more details on using hashes here.

File details

Details for the file crystals-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: crystals-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 254.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for crystals-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e9b0f16566c2c8b5d17dc96a6938af222f0bc2b6635be640292c4d6c59d850a
MD5 bf737b63b95dba3e41f3b740350c8144
BLAKE2b-256 e9e050ef8edf7a4523dfd400b3c312e4d5c95f59ad746297a2fb2d0ea575d9a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page