
What's new
==========

1.1.2
-----

* Atom site occupancies are now parsed from CIF files `(#3) <https://github.com/LaurentRDC/crystals/issues/3>`_.

1.1.1
-----

* ``Orbital`` instances are now orderable, i.e. ``Orbital("1s") < Orbital("2p")``.
* The ``Element`` class can now be initialized from another ``Element``, and also from full atomic names (e.g. ``"hydrogen"``). This simplifies the normalization for input types.
* Added the ``ElectronicStructure.outer_shell`` method to quickly get the outermost shell.

1.1.0
-----

* Added the ability to describe the electronic structure of atoms using the ``ElectronicStructure`` class.

1.0.0
-----

* Added the ability to set a Materials Project API key as environment variable ``MATERIALS_PROJECT_API_KEY``.
* Added the Materials Project constructor to the ``crystals info`` script.

0.6.7
-----

* Added the ``Crystal.from_mp`` constructor to create crystals through the Materials Project API.
* Added the method ``Crystal.indexed_by``, which allows to index reflections of a crystal by using another lattice.
* Re-organized the ``Crystal`` class hierarchy to be more specific. This change should not affect anyone.

0.6.6
-----

* Added command-line utilities, including the `crystals info` script.

0.6.5
-----

* New algorithm to determine the lattice vectors from lattice parameters. Results should be the same except in edge cases.
* Space-group and symmetry information has been inserted into immutable dictionaries
* Fixed an issue where the parsing of CIF files without Hall symbol would fail because the International Table number was parsed as a string, not an integer.
* Updated minimum dependency bound on PyCifRW to 4.4.1 because of potential issues with Python 3.7.
* Refactoring of internal string handling to use f-strings.

0.6.4
-----

* ``Crystal.ideal`` and ``Crystal.primitive`` will now preserve subclasses.
* ``Crystal.primitive`` will now always return a new ``Crystal``, even if the ``Crystal`` already has a primitive cell.
* ``Supercell`` is no longer a subclass of ``Crystal``. The only recommended way of building supercells is now ``Crystal.supercell``.
* ``Lattice.scattering_vector`` and ``Lattice.miller_indices`` now work on single vectors of shape (3,).
* Added the ``Lattice.bounded_reflections`` generator. 


0.6.3
-----

* Added the constructor ``Crystal.from_pwscf`` to create crystal instances from output files generated by the `Plane-Wave Self-Consistent Field (PWSCF) program <https://www.quantum-espresso.org/Doc/pw_user_guide/>`_.  
* Added the ``Crystal.ideal`` method to create idealized crystal structures.
* Added the ``Crystal.reciprocal_symmetry_operations`` method to determine crystal symmetry operations in reciprocal basis.
* Symmetry-determination via ``Crystal.symmetry()`` and related methods now raises a ``RuntimeError`` if symmetry-determination fails, rather than returning ``None``
* Added the ``Atom.tag`` property, which can be used to tag ``Atom`` instances with extra information. This is for internal use. So far, it is used to label the order of Atoms from a PWSCF output file.

0.6.2
-----

* Added the ``Crystal.symmetry_operations`` method to determine crystal symmetry operations.

0.6.1
-----

* Fixed an issue where cache directories on MacOS could not be used.
* `CODParser` will now try to download files from three Crystallography Open Database mirrors.
* `AtomicStructure` and subclasses now support "truthiness", i.e. they are considered `False` if empty, and `True` otherwise.
* Added the `AtomicStructure.satisfying` method, to extract atoms satisfying a predicate from structures
* Added the `is_element` function. It can be used to make `AtomicStructure.satisfying` more readable.