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

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

Release files for crystals 1.7.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 crystals 1.7.0
File Size Uploaded
crystals-1.7.0.tar.gz 174.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crystals 1.7.0
File Interpreter ABI Platform
crystals-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size:448.7 kB

Release files / crystals-1.7.0.tar.gz

Download URL crystals-1.7.0.tar.gz
Size 174.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4185ae1f7a7babcb34446c4139d0b6c31a1872d0e84fbe9f00dcd1502a78d837
BLAKE2b-256 checksum
How to use checksums
80fc4fb3d500e097f3ea66d2fd5bac114065bcaa9b07681bc9f51298ea611b06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / crystals-1.7.0-py3-none-any.whl

Download URL crystals-1.7.0-py3-none-any.whl
Size 274.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f7d639461563c9595d3e43a6bf3daa62b430c779fb6887fa9cc50bc54f5ab20
BLAKE2b-256 checksum
How to use checksums
aadd1507437528fe29529eaff9d9950bce87f24e5249ba820522a2d4bef4b5bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.7.0 This release

2 release files

1.6.2

7 release files

1.6.1

5 release files

1.6.0

5 release files

1.5.0

5 release files

1.4.1

5 release files

1.4.0

5 release files

1.3.2

5 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

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