Skip to content

Commit

Permalink
Merge pull request #77 from SMTG-Bham/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ireaml authored Aug 17, 2024
2 parents d9ac923 + 9d223a3 commit c97ccbf
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: ruff
run: |
ruff --version
ruff --fix shakenbreak
ruff check --fix shakenbreak
- name: check docstrings
run: |
Expand All @@ -53,4 +53,4 @@ jobs:
- name: flake8
run: |
flake8 --version
flake8 --max-line-length 107 --color always --ignore=E121,E123,E126,E203,E226,E24,E704,W503,W504,F401,E203 shakenbreak
flake8 --max-line-length 107 --color always --ignore=E121,E123,E126,E203,E226,E24,E704,W503,W504,F401,E203 shakenbreak
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
==========

v3.3.6
----------
- Add `py.typed` to properly detect type hints by @Andrew-S-Rosen
- `snb-run` updates to improve efficiency

v3.3.5
----------
- Enforce ``doped>=2.4.4`` requirement.
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pip install --upgrade pymatgen shakenbreak
`ShakeNBreak` can take `pymatgen` `Defect` objects as input (to then generate the trial distorted structures),
**_but also_** can take in `pymatgen` `Structure` objects, `doped` defects or structure files
(e.g. `POSCAR`s for `VASP`) as inputs. As such, it should be compatible with any defect code
(such as [`doped`](https://doped.readthedocs.io/en/latest/index.html), [`pydefect`](https://github.com/kumagai-group/pydefect),
(such as [`doped`](https://doped.readthedocs.io), [`pydefect`](https://github.com/kumagai-group/pydefect),
[`PyCDT`](https://github.com/mbkumar/pycdt), [`PyLada`](https://github.com/pylada/pylada-defects),
[`DASP`](http://hzwtech.com/files/software/DASP/htmlEnglish/index.html), [`Spinney`](https://gitlab.com/Marrigoni/spinney/-/tree/master),
[`DefAP`](https://github.com/DefAP/defap), [`PyDEF`](https://github.com/PyDEF2/PyDEF-2.0)...) that generates these files.
Expand All @@ -128,10 +128,15 @@ Automatic testing is run on the master and develop branches using Github Actions

## Studies using `ShakeNBreak`

- Z. Yuan & G. Hautier **_First-principles study of defects and doping limits in CaO_** [_Applied Physics Letters_](https://doi.org/10.1063/5.0211707) 2024
- B. E. Murdock et al. **_Li-Site Defects Induce Formation of Li-Rich Impurity Phases: Implications for Charge Distribution and Performance of LiNi<sub>0.5-x</sub>M<sub>x</sub>Mn<sub>1.5</sub>O<sub>4</sub> Cathodes (M = Fe and Mg; x = 0.05–0.2)_** [_Advanced Materials_](https://doi.org/10.1002/adma.202400343) 2024
- A. G. Squires et al. **_Oxygen dimerization as a defect-driven process in bulk LiNiO2<sub>2</sub>_** [_ChemRxiv_](https://doi.org/10.26434/chemrxiv-2024-lcmkj) 2024
- Y. Fu & H. Lohan et al. **_Factors Enabling Delocalized Charge-Carriers in Pnictogen-Based
Solar Absorbers: In-depth Investigation into CuSbSe<sub>2</sub>_** [_arXiv_](https://doi.org/10.48550/arXiv.2401.02257) 2024
- S. Hachmioune et al. **_Exploring the Thermoelectric Potential of MgB4: Electronic Band Structure, Transport Properties, and Defect Chemistry_** [_Chemistry of Materials_](https://doi.org/10.1021/acs.chemmater.4c00584) 2024
- J. Hu et al. **_Enabling ionic transport in Li3AlP2 the roles of defects and disorder_** [_ChemRxiv_](https://doi.org/10.26434/chemrxiv-2024-3s0kh) 2024
- A. G. Squires et al. **_Oxygen dimerization as a defect-driven process in bulk LiNiO2<sub>2</sub>_** [_ACS Energy Letters_](https://pubs.acs.org/doi/10.1021/acsenergylett.4c01307) 2024
- X. Wang et al. **_Upper efficiency limit of Sb<sub>2</sub>Se<sub>3</sub> solar cells_** [_Joule_](https://doi.org/10.1016/j.joule.2024.05.004) 2024
- I. Mosquera-Lois et al. **_Machine-learning structural reconstructions for accelerated point defect calculations_** [_arXiv_](https://doi.org/10.48550/arXiv.2401.12127) 2024
- I. Mosquera-Lois et al. **_Machine-learning structural reconstructions for accelerated point defect calculations_** [_npj Computational Materials_](https://doi.org/10.1038/s41524-024-01303-9) 2024
- S. R. Kavanagh et al. **_doped: Python toolkit for robust and repeatable charged defect supercell calculations_** [_Journal of Open Source Software_](https://doi.org/10.21105/joss.06433) 2024
- K. Li et al. **_Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb<sub>2</sub>O<sub>5</sub>_** [_Chemistry of Materials_](https://doi.org/10.1021/acs.chemmater.3c03257) 2024
- X. Wang et al. **_Four-electron negative-U vacancy defects in antimony selenide_** [_Physical Review B_](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.108.134102) 2023
Expand Down
4 changes: 2 additions & 2 deletions docs/Analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ Further Defect Analysis
-------------------------
Once the ground state (and metastable) defect structures have been identified, we will want to compute
their formation energies using our final fully-converged calculation parameters (i.e. plane-wave cutoff
and k-point sampling). This can be done using `doped <https://doped.readthedocs.io/en/latest/index.html>`_,
and k-point sampling). This can be done using `doped <https://doped.readthedocs.io>`_,
manually (not recommended) or using the other defect codes listed on the
`Code Compatibility <https://shakenbreak.readthedocs.io/en/latest/Code_Compatibility.html>`_ page.

As shown in the `doped <https://doped.readthedocs.io/en/latest/index.html>`_ tutorials and docs, you may
As shown in the `doped <https://doped.readthedocs.io>`_ tutorials and docs, you may
want to further analyse the behaviour and impact on material properties of your defects using advanced
defect analysis codes such as `easyunfold <https://smtg-bham.github.io/easyunfold/>`_ (to analyse the
electronic structure of defects in your material),
Expand Down
2 changes: 1 addition & 1 deletion docs/Code_Compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ most recent version of :code:`pymatgen`. If you are receiving :code:`pymatgen`-r
:code:`ShakeNBreak` can take :code:`pymatgen` :code:`DefectEntry` objects as input (to then generate the trial distorted
structures), **but also** can take in :code:`pymatgen` :code:`Structure` objects, :code:`doped` defect dictionaries or
structure files (e.g. :code:`POSCAR`\s for :code:`VASP`) as inputs. As such, it should be compatible with any defect code
(such as `doped <https://doped.readthedocs.io/en/latest/index.html>`_, `pydefect <https://github.com/kumagai-group/pydefect>`_,
(such as `doped <https://doped.readthedocs.io>`_, `pydefect <https://github.com/kumagai-group/pydefect>`_,
`PyCDT <https://github.com/mbkumar/pycdt>`_, `PyLada <https://github.com/pylada/pylada-defects>`_,
`DASP <http://hzwtech.com/files/software/DASP/htmlEnglish/index.html>`_, `Spinney <https://gitlab.com/Marrigoni/spinney/-/tree/master>`_,
`DefAP <https://github.com/DefAP/defap>`_, `PyDEF <https://github.com/PyDEF2/PyDEF-2.0>`_...) that generates these files.
Expand Down
14 changes: 7 additions & 7 deletions docs/ShakeNBreak_Example_Workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"id": "9a98b5d2-c17f-4d00-8a0f-b5dfe8997420",
"metadata": {},
"source": [
"## 1. Generate defects with [`doped`](https://doped.readthedocs.io/en/latest/)/`pymatgen`"
"## 1. Generate defects with [`doped`](https://doped.readthedocs.io)/`pymatgen`"
]
},
{
Expand All @@ -139,9 +139,9 @@
"metadata": {},
"source": [
"The input defect objects for `ShakeNBreak` can be generated using either\n",
"[`doped`](https://doped.readthedocs.io/en/latest/), `pymatgen` or alternatively just\n",
"[`doped`](https://doped.readthedocs.io), `pymatgen` or alternatively just\n",
" the bulk and defect structures can be provided. Below we show how to generate the defect `python`\n",
" objects using [`doped`](https://doped.readthedocs.io/en/latest/) (Section\n",
" objects using [`doped`](https://doped.readthedocs.io) (Section\n",
" 1.1) and `pymatgen` (Section 1.1).\n",
"\n",
"In this case we take CdTe as our example system:"
Expand All @@ -163,7 +163,7 @@
"metadata": {},
"source": [
"To generate defects with doped, we can use the code below. This procedure is described in much more\n",
"detail on the [`doped` docs](https://doped.readthedocs.io/en/latest/), which also shows how to generate\n",
"detail on the [`doped` docs](https://doped.readthedocs.io), which also shows how to generate\n",
"and calculate the chemical potential terms (needed for defect formation energies), perform defect\n",
"supercell (finite-size) charge\n",
" corrections, calculate & plot the final defect formation energy diagram, and perform further defect\n",
Expand Down Expand Up @@ -960,7 +960,7 @@
" folder names will be set equal to `DefectEntry.name` if the `name`\n",
" attribute is set for all input `DefectEntry`s, otherwise generated\n",
" according to the `doped` convention\n",
" (see: https://doped.readthedocs.io/en/latest/dope_workflow_example.html).\n",
" (see: https://doped.readthedocs.io/en/latest/generation_tutorial.html).\n",
"\n",
" Defect charge states (from which bond distortions are determined) are\n",
" taken from the `DefectEntry.charge_state` property.\n",
Expand Down Expand Up @@ -3946,9 +3946,9 @@
"metadata": {},
"source": [
"### Further Defect Analysis\n",
"Once the ground state (and metastable) defect structures have been identified, we will want to compute their formation energies using our final fully-converged calculation parameters (i.e. plane-wave cutoff and k-point sampling). This can be done using [`doped`](https://doped.readthedocs.io/en/latest/), manually (not recommended) or using the other defect codes listed on the [Code Compatibility](https://shakenbreak.readthedocs.io/en/latest/Code_Compatibility.html) page.\n",
"Once the ground state (and metastable) defect structures have been identified, we will want to compute their formation energies using our final fully-converged calculation parameters (i.e. plane-wave cutoff and k-point sampling). This can be done using [`doped`](https://doped.readthedocs.io), manually (not recommended) or using the other defect codes listed on the [Code Compatibility](https://shakenbreak.readthedocs.io/en/latest/Code_Compatibility.html) page.\n",
"\n",
"As shown in the [`doped`](https://doped.readthedocs.io/en/latest/) examples and docs, you may want to further analyse the behaviour and impact on material properties of your defects using advanced defect analysis codes such as [`easyunfold`](https://smtg-bham.github.io/easyunfold/) (to analyse the electronic structure of defects in your material), [`py-sc-fermi`](https://py-sc-fermi.readthedocs.io/en/latest/) (to analyse defect concentrations, doping and Fermi level tuning), or [`nonrad`](https://nonrad.readthedocs.io/en/latest/)/[`CarrierCapture.jl`](https://wmd-group.github.io/CarrierCapture.jl/dev/) (to analyse non-radiative electron-hole recombination at defects)."
"As shown in the [`doped`](https://doped.readthedocs.io) examples and docs, you may want to further analyse the behaviour and impact on material properties of your defects using advanced defect analysis codes such as [`easyunfold`](https://smtg-bham.github.io/easyunfold/) (to analyse the electronic structure of defects in your material), [`py-sc-fermi`](https://py-sc-fermi.readthedocs.io/en/latest/) (to analyse defect concentrations, doping and Fermi level tuning), or [`nonrad`](https://nonrad.readthedocs.io/en/latest/)/[`CarrierCapture.jl`](https://wmd-group.github.io/CarrierCapture.jl/dev/) (to analyse non-radiative electron-hole recombination at defects)."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/Tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ message about the origin of the problem, it is likely to be an issue with your v
If this does not solve your issue, please check the specific cases noted below. If your issue still isn't
solved, then please contact the developers through the ``GitHub``
`Issues <https://github.com/SMTG-Bham/ShakeNBreak/issues>`_ page, or by email.
`Issues <https://github.com/SMTG-Bham/ShakeNBreak/issues>`_ page.

- A current known issue with ``numpy``/``pymatgen`` is that it might give an error similar to this:

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
author = 'Irea Mosquera-Lois, Seán R. Kavanagh'

# The full version, including alpha/beta/rc tags
release = '3.3.5'
release = '3.3.6'


# -- General configuration ---------------------------------------------------
Expand Down
10 changes: 7 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Code Compatibility
:code:`ShakeNBreak` can take :code:`pymatgen` :code:`Defect` objects as input (to then generate the trial distorted
structures), **but also** can take in :code:`pymatgen` :code:`Structure` objects, :code:`doped` defect dictionaries or
structure files (e.g. :code:`POSCAR`\s for :code:`VASP`) as inputs. As such, it should be compatible with any defect code
(such as `doped <https://doped.readthedocs.io/en/latest/index.html>`_, `pydefect <https://github.com/kumagai-group/pydefect>`_,
(such as `doped <https://doped.readthedocs.io>`_, `pydefect <https://github.com/kumagai-group/pydefect>`_,
`PyCDT <https://github.com/mbkumar/pycdt>`_, `PyLada <https://github.com/pylada/pylada-defects>`_,
`DASP <http://hzwtech.com/files/software/DASP/htmlEnglish/index.html>`_, `Spinney <https://gitlab.com/Marrigoni/spinney/-/tree/master>`_,
`DefAP <https://github.com/DefAP/defap>`_, `PyDEF <https://github.com/PyDEF2/PyDEF-2.0>`_...) that generates these files.
Expand Down Expand Up @@ -211,10 +211,14 @@ run tests and add new tests for any new features whenever submitting pull reques
Studies using ``ShakeNBreak``
=============================

- Z\. Yuan & G. Hautier **First-principles study of defects and doping limits in CaO** `Applied Physics Letters <https://doi.org/10.1063/5.0211707>`_ 2024
- B\. E. Murdock et al. **Li-Site Defects Induce Formation of Li-Rich Impurity Phases: Implications for Charge Distribution and Performance of LiNi** :sub:`0.5-x` **M** :sub:`x` **Mn** :sub:`1.5` **O** :sub:`4` **Cathodes (M = Fe and Mg; x = 0.05–0.2)** `Advanced Materials <https://doi.org/10.1002/adma.202400343>`_ 2024
- A\. G. Squires et al. **Oxygen dimerization as a defect-driven process in bulk LiNiO₂** `ChemRxiv <https://doi.org/10.26434/chemrxiv-2024-lcmkj>`_ 2024
- A\. G. Squires et al. **Oxygen dimerization as a defect-driven process in bulk LiNiO₂** `ACS Energy Letters <https://pubs.acs.org/doi/10.1021/acsenergylett.4c01307>`__ 2024
- Y\. Fu & H. Lohan et al. **Factors Enabling Delocalized Charge-Carriers in Pnictogen-Based Solar Absorbers: In-depth Investigation into CuSbSe<sub>2</sub>** `arXiv <https://doi.org/10.48550/arXiv.2401.02257>`_ 2024
- S\. Hachmioune et al. **Exploring the Thermoelectric Potential of MgB4: Electronic Band Structure, Transport Properties, and Defect Chemistry** `Chemistry of Materials <https://doi.org/10.1021/acs.chemmater.4c00584>`_ 2024
- J\. Hu et al. **Enabling ionic transport in Li3AlP2 the roles of defects and disorder** `ChemRxiv <https://doi.org/10.26434/chemrxiv-2024-3s0kh>`_ 2024
- X\. Wang et al. **Upper efficiency limit of Sb₂Se₃ solar cells** `Joule <https://doi.org/10.1016/j.joule.2024.05.004>`_ 2024
- I\. Mosquera-Lois et al. **Machine-learning structural reconstructions for accelerated point defect calculations** `arXiv <https://doi.org/10.48550/arXiv.2401.12127>`_ 2024
- I\. Mosquera-Lois et al. **Machine-learning structural reconstructions for accelerated point defect calculations** `npj Computational Materials <https://doi.org/10.1038/s41524-024-01303-9>`_ 2024
- S\. R. Kavanagh et al. **doped: Python toolkit for robust and repeatable charged defect supercell calculations** `Journal of Open Source Software <https://doi.org/10.21105/joss.06433>`_ 2024
- K\. Li et al. **Computational Prediction of an Antimony-based n-type Transparent Conducting Oxide: F-doped Sb₂O₅** `Chemistry of Materials <https://doi.org/10.1021/acs.chemmater.3c03257>`_ 2024
- X\. Wang et al. **Four-electron negative-U vacancy defects in antimony selenide** `Physical Review B <https://journals.aps.org/prb/abstract/10.1103/PhysRevB.108.134102>`_ 2023
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def package_files(directory):

setup(
name="shakenbreak",
version="3.3.5",
version="3.3.6",
description="Package to generate and analyse distorted defect structures, in order to "
"identify ground-state and metastable defect configurations.",
long_description=long_description,
Expand Down
Loading

0 comments on commit c97ccbf

Please sign in to comment.