Skip to content

Commit

Permalink
Re-license to GPLv3
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Feb 6, 2021
1 parent 9f80ea5 commit 1aa2458
Show file tree
Hide file tree
Showing 6 changed files with 678 additions and 139 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ What's new
1.3.0
-----

* Starting with this version, ``crystals`` is licensed under GPLv3.
* General purpose single-crystal structure indexing with the DirAx algorithm has been added: :func:`index_dirax`.
* :meth:`Lattice.scattering_vector` and :meth:`Lattice.miller_indices` now accept tables of reflections/scattering vectors. This calculation is vectorized using NumPy.
* Migration of testing infrastructure to pytest.
Expand Down
685 changes: 668 additions & 17 deletions LICENSE

Large diffs are not rendered by default.

125 changes: 6 additions & 119 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,120 +5,13 @@ 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, and allows for symmetry determination.
Although `crystals` can be used on its own, it was made to be integrated
into larger projects (like
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](https://github.com/LaurentRDC/scikit-ued)).

Take a look at the [documentation](https://crystals.readthedocs.io/) for
more information.

Usage example
-------------

`crystals` is all about constructing crystals and getting information
about the resulting object. Crystals can be built from a variety of
sources:

- From files on disk, such as Crystallography Information Files (CIF)
or Place-Wave Self-Consistent Field calculations (PWSCF);
- From the internal database of over 90 structure files (mostly
elemental crystals);
- From online databases, such as the [RCSB Protein
DataBank](http://www.rcsb.org/) or the [Crystallography Open
Database](http://www.crystallography.net/cod/).

Here\'s a quick example of building a crystal from the internal
database:

```python
>>> from crystals import Crystal
>>>
>>> Crystal.from_database('vo2-m1')
< Crystal object with following unit cell:
Atom O @ (0.10, 0.21, 0.20)
Atom O @ (0.10, 0.29, 0.70)
Atom O @ (0.39, 0.69, 0.29)
Atom O @ (0.39, 0.81, 0.79)
Atom O @ (0.61, 0.19, 0.21)
Atom O @ (0.61, 0.31, 0.71)
Atom O @ (0.90, 0.71, 0.30)
Atom O @ (0.90, 0.79, 0.80)
Atom V @ (0.24, 0.53, 0.53)
Atom V @ (0.24, 0.97, 0.03)
Atom V @ (0.76, 0.03, 0.97)
Atom V @ (0.76, 0.48, 0.47)
Lattice parameters:
a=5.743Å, b=4.517Å, c=5.375Å
α=90.000°, β=122.600°, γ=90.000°
Chemical composition:
O: 66.667%
V: 33.333% >

```

Symmetry information is also readily available:

```python
>>> from crystals import Crystal
>>> from pprint import pprint # pretty printing
>>>
>>> vo2 = Crystal.from_database('vo2-m1')
>>> pprint(vo2.symmetry())
{'centering': <CenteringType.primitive: 'P'>,
'hall_number': 81,
'hall_symbol': '-P 2ybc',
'hm_symbol': 'P121/c1',
'international_full': 'P 1 2_1/c 1',
'international_number': 14,
'international_symbol': 'P2_1/c',
'pointgroup': '2/m'}

```

### Command-line script

`crystals` comes with command-line utilities. The most important of them
is the `crystals info` command-line program, which will give you
information on a crystal.

For example, the equivalent of the usage example above is as follows:

```bash
> crystals info vo2-m1
Crystal object with following unit cell:
Atom O @ (0.10, 0.29, 0.70) | [1s²2s²2p⁴]
Atom O @ (0.10, 0.21, 0.20) | [1s²2s²2p⁴]
Atom O @ (0.90, 0.71, 0.30) | [1s²2s²2p⁴]
Atom O @ (0.90, 0.79, 0.80) | [1s²2s²2p⁴]
Atom O @ (0.39, 0.69, 0.29) | [1s²2s²2p⁴]
Atom O @ (0.39, 0.81, 0.79) | [1s²2s²2p⁴]
Atom O @ (0.61, 0.19, 0.21) | [1s²2s²2p⁴]
Atom O @ (0.61, 0.31, 0.71) | [1s²2s²2p⁴]
Atom V @ (0.24, 0.97, 0.03) | [1s²2s²2p⁶3s²3p⁶4s²3d³]
Atom V @ (0.76, 0.03, 0.97) | [1s²2s²2p⁶3s²3p⁶4s²3d³]
Atom V @ (0.24, 0.53, 0.53) | [1s²2s²2p⁶3s²3p⁶4s²3d³]
Atom V @ (0.76, 0.48, 0.47) | [1s²2s²2p⁶3s²3p⁶4s²3d³]
Lattice parameters:
a=5.743Å, b=4.517Å, c=5.375Å
α=90.000°, β=122.600°, γ=90.000°
Chemical composition:
V: 33.333%
Source:
(...omitted...)\crystals\crystals\cifs\vo2-m1.cif
Symmetry information:
International symbol
(short) ..... P2_1/c
(full) ...... P 1 2_1/c 1
International number .... 14
Hermann-Mauguin symbol .. P121/c1
Pointgroup .............. 2/m
Hall Number ............. 81
Centering ............... CenteringType.primitive
```

`crystals` will guess what the input means. You can pass a filename, or
database entry. See `crystals --help` for more details.
more information and examples.

Installation
------------
Expand Down Expand Up @@ -155,7 +48,7 @@ To build documentation, you will need a few more packages, listed in
Documentation
-------------

The documentation, including a user guide as well as detailed reference,
The documentation, including user guides as well as detailed reference,
is available here: <https://crystals.readthedocs.io/>

Development
Expand Down Expand Up @@ -195,12 +88,6 @@ 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](https://doi.org/10.1515/pac-2015-0305)
Aknowledgements
---------------

This package depends on the work of some amazing people. Of note are the
[spglib contributors](https://github.com/atztogo/spglib).

Support / Report Issues
-----------------------

Expand All @@ -210,7 +97,7 @@ issue](https://github.com/LaurentRDC/crystals/issues).
License
-------

`crystals` is made available under the BSD 3-clause license. For more
`crystals` is made available under the GPLv3 license. For more
details, see [LICENSE](https://github.com/LaurentRDC/crystals/blob/master/LICENSE).

Related projects
Expand Down
2 changes: 1 addition & 1 deletion crystals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
__author__ = "Laurent P. René de Cotret"
__email__ = "[email protected]"
__license__ = "BSD3"
__license__ = "GPLv3"
__version__ = "1.3.0"

from .atom import Atom
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ All support requests and issue reports should be `filed on Github as an issue <h
License
=======

``crystals`` is made available under the BSD 3-clause license. For more details, see `LICENSE <https://github.com/LaurentRDC/crystals/blob/master/LICENSE>`_.
``crystals`` is made available under the GPLv3 license. For more details, see `LICENSE <https://github.com/LaurentRDC/crystals/blob/master/LICENSE>`_.

Related projects
================
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
Expand Down

0 comments on commit 1aa2458

Please sign in to comment.