Skip to content

Commit

Permalink
Add JOSS badges and citation
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Apr 15, 2024
1 parent 4b77114 commit 4705d1c
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 13 deletions.
80 changes: 80 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
cff-version: "1.2.0"
authors:
- family-names: Kavanagh
given-names: Seán R.
orcid: "https://orcid.org/0000-0003-4577-9647"
- family-names: Squires
given-names: Alexander G.
orcid: "https://orcid.org/0000-0001-6967-3690"
- family-names: Nicolson
given-names: Adair
orcid: "https://orcid.org/0000-0002-8889-9369"
- family-names: Mosquera-Lois
given-names: Irea
orcid: "https://orcid.org/0000-0001-7651-0814"
- family-names: Ganose
given-names: Alex M.
orcid: "https://orcid.org/0000-0002-4486-3321"
- family-names: Zhu
given-names: Bonan
orcid: "https://orcid.org/0000-0001-5601-6130"
- family-names: Brlec
given-names: Katarina
orcid: "https://orcid.org/0000-0003-1485-1888"
- family-names: Walsh
given-names: Aron
orcid: "https://orcid.org/0000-0001-5460-7033"
- family-names: Scanlon
given-names: David O.
orcid: "https://orcid.org/0000-0001-9174-8601"
contact:
- family-names: Kavanagh
given-names: Seán R.
orcid: "https://orcid.org/0000-0003-4577-9647"
doi: 10.5281/zenodo.10957359
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Kavanagh
given-names: Seán R.
orcid: "https://orcid.org/0000-0003-4577-9647"
- family-names: Squires
given-names: Alexander G.
orcid: "https://orcid.org/0000-0001-6967-3690"
- family-names: Nicolson
given-names: Adair
orcid: "https://orcid.org/0000-0002-8889-9369"
- family-names: Mosquera-Lois
given-names: Irea
orcid: "https://orcid.org/0000-0001-7651-0814"
- family-names: Ganose
given-names: Alex M.
orcid: "https://orcid.org/0000-0002-4486-3321"
- family-names: Zhu
given-names: Bonan
orcid: "https://orcid.org/0000-0001-5601-6130"
- family-names: Brlec
given-names: Katarina
orcid: "https://orcid.org/0000-0003-1485-1888"
- family-names: Walsh
given-names: Aron
orcid: "https://orcid.org/0000-0001-5460-7033"
- family-names: Scanlon
given-names: David O.
orcid: "https://orcid.org/0000-0001-9174-8601"
date-published: 2024-04-15
doi: 10.21105/joss.06433
issn: 2475-9066
issue: 96
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 6433
title: "doped: Python toolkit for robust and repeatable charged defect
supercell calculations"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.06433"
volume: 9
title: "doped: Python toolkit for robust and repeatable charged defect
supercell calculations"
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[![PyPI](https://img.shields.io/pypi/v/doped)](https://pypi.org/project/doped)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/doped.svg)](https://anaconda.org/conda-forge/doped)
[![Downloads](https://img.shields.io/pypi/dm/doped)](https://pypi.org/project/doped)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.06433/status.svg)](https://doi.org/10.21105/joss.06433)

<a href="https://doped.readthedocs.io/en/latest/"><img align="right" width="150" src="https://raw.githubusercontent.com/SMTG-Bham/doped/main/docs/doped_v2_logo.png" alt="Schematic of a doped (defect-containing) crystal, inspired by the biological analogy to (semiconductor) doping." title="Schematic of a doped (defect-containing) crystal, inspired by the biological analogy to (semiconductor) doping."></a>`doped` is a Python software for the generation, pre-/post-processing and analysis of defect supercell calculations, implementing the defect simulation workflow in an efficient, reproducible, user-friendly yet powerful and fully-customisable manner.

Tutorials showing the code functionality and usage are provided on the [docs](https://doped.readthedocs.io/en/latest/) site, and an overview of the key advances of the package is given in the [JOSS paper](https://arxiv.org/abs/2403.08012).
<!-- Update this link!! -->
Tutorials showing the code functionality and usage are provided on the [docs](https://doped.readthedocs.io/en/latest/) site, and an overview of the key advances of the package is given in the [JOSS paper](https://doi.org/10.21105/joss.06433).

<a href="https://doi.org/10.21105/joss.06433"><img class="center" width="800" src="https://raw.githubusercontent.com/SMTG-Bham/doped/main/docs/JOSS/doped_JOSS_workflow_figure.png"></a>

Expand All @@ -26,8 +26,7 @@ All features and functionality are fully-customisable:
### Performance and Example Outputs
![https://github.com/openjournals/joss-reviews/issues/6433](docs/JOSS/doped_JOSS_figure.png)
**(a)** Optimal supercell generation comparison. **(b)** Charge state estimation comparison. Example **(c)** Kumagai-Oba (eFNV) finite-size correction plot, **(d)** defect formation energy diagram, **(e)** chemical potential / stability region, **(f)** Fermi level vs. annealing temperature, **(g)** defect/carrier concentrations vs. annealing temperature and **(h)** Fermi level / carrier concentration heatmap plots from `doped`. Automated plots of **(i,j)** single-particle eigenvalues and **(k)** site
displacements from DFT supercell calculations. See the [JOSS paper](https://github.com/openjournals/joss-reviews/issues/6433) for more details.
<!-- Update this link!! -->
displacements from DFT supercell calculations. See the [JOSS paper](https://doi.org/10.21105/joss.06433) for more details.

## Installation
```bash
Expand All @@ -44,6 +43,9 @@ Alternatively if desired, `doped` can also be installed from `conda` with:
If you haven't done so already, you will need to set up your VASP `POTCAR` files and `Materials Project` API with `pymatgen` using the `.pmgrc.yaml` file, in order for `doped` to automatically generate VASP input files for defect calculations and determine competing phases for chemical potentials.
See the docs [Installation](https://doped.readthedocs.io/en/latest/Installation.html) page for details on this.

## Citation
If you use `doped` in your research, please cite:
- S. R. Kavanagh et al. [doped: Python toolkit for robust and repeatable charged defect supercell calculations](https://doi.org/10.21105/joss.06433). _Journal of Open Source Software_ 9 (96), 6433, **2024**

## `ShakeNBreak`
As shown in the `doped` tutorials, it is highly recommended to use the [`ShakeNBreak`](https://shakenbreak.readthedocs.io/en/latest/) approach when calculating point defects in solids, to ensure you have identified the groundstate structures of your defects. As detailed in the [theory paper](https://doi.org/10.1038/s41524-023-00973-1), skipping this step can result in drastically incorrect formation energies, transition levels, carrier capture (basically any property associated with defects). This approach is followed in the [doped example notebook](https://github.com/SMTG-Bham/doped/blob/main/dope_workflow_example.ipynb), with a more in-depth explanation and tutorial given on the [ShakeNBreak](https://shakenbreak.readthedocs.io/en/latest/) website.
Expand Down
2 changes: 1 addition & 1 deletion docs/Dev_ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
- `doped` repo/docs cleanup `TODO`s above
- Quick-start tutorial suggested by Alex G
- Add chempot grid plotting tool, shown in `JOSS_plots` using Alex's chemical potential grid, and test (and remove TODO from JOSS plots notebook).
- Deal with cases where "X-rich"/"X-poor" corresponds to more than one limit (pick one and warn user?)
- Deal with cases where "X-rich"/"X-poor" corresponds to more than one limit (pick one and warn user?)(e.g. Wenzhen Si2Sb2Te6)
- `dist_tol` should also group defects for the concentration etc functions, currently doesn't (e.g. `CdTe_thermo.get_equilibrium_concentrations(limit="Te-rich", per_charge=False, fermi_level=0.5)` and `CdTe_thermo.dist_tol=10; CdTe_thermo.get_equilibrium_concentrations(limit="Te-rich", per_charge=False, fermi_level=0.5)`, same output)
- Add example to chemical potentials / thermodynamics analysis tutorials of varying chemical potentials as a function of temperature/pressure (i.e. gas phases), using the `Spinney` functions detailed here (https://spinney.readthedocs.io/en/latest/tutorial/chemipots.html#including-temperature-and-pressure-effects-through-the-gas-phase-chemical-potentials) or possibly `DefAP` functions otherwise.
- Plotting lines colour updates.
Expand Down
5 changes: 5 additions & 0 deletions docs/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ for charged defects, your ``POTCAR`` directory needs to be setup to work with ``
Note the Materials Project API key is required for determining the necessary competing phases to calculate in order to determine the chemical potential limits (required for defect formation energies). This should correspond to the legacy MP API, with your unique key available at: https://legacy.materialsproject.org/open.


If you use ``doped`` in your research, please cite:

- S\. R. Kavanagh et al. `doped: Python toolkit for robust and repeatable charged defect supercell calculations <https://doi.org/10.21105/joss.06433>`__. *Journal of Open Source Software* 9 (96), 6433, **2024**


Developer Installation
-----------------------
If you want to use the example files from the tutorials or run the package tests, you will need to clone
Expand Down
18 changes: 11 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
:target: https://anaconda.org/conda-forge/doped
.. image:: https://img.shields.io/pypi/dm/doped
:target: https://pypi.org/project/doped
.. image:: https://joss.theoj.org/papers/10.21105/joss.06433/status.svg
:target: https://doi.org/10.21105/joss.06433

.. raw:: html

Expand All @@ -22,9 +24,7 @@ powerful and fully-customisable manner.

Tutorials showing the code functionality and usage are provided on the :ref:`Tutorials` page, and an
overview of the key advances of the package is given in the
`JOSS paper <https://arxiv.org/abs/2403.08012>`__.

.. update JOSS paper link when done!
`JOSS paper <https://doi.org/10.21105/joss.06433>`__.

.. raw:: html

Expand All @@ -48,24 +48,28 @@ Performance and Example Outputs
-------------------------------

.. image:: JOSS/doped_JOSS_figure.png
:target: https://arxiv.org/abs/2403.08012
:target: https://doi.org/10.21105/joss.06433

**(a)** Optimal supercell generation comparison. **(b)** Charge state estimation comparison.
Example **(c)** Kumagai-Oba (eFNV) finite-size correction plot, **(d)** defect formation energy diagram,
**(e)** chemical potential / stability region, **(f)** Fermi level vs. annealing temperature, **(g)**
defect/carrier concentrations vs. annealing temperature and **(h)** Fermi level / carrier concentration
heatmap plots from ``doped``. Automated plots of **(i,j)** single-particle eigenvalues and **(k)** site
displacements from DFT supercell calculations. See the
`JOSS paper <https://github.com/openjournals/joss-reviews/issues/6433>`__ for more details.

.. Update all JOSS paper links when ready!
`JOSS paper <https://doi.org/10.21105/joss.06433>`__ for more details.

Installation
------------
``doped`` can be installed via PyPI (``pip install doped``) or ``conda`` if preferred, and further
instructions for setting up ``POTCAR`` files with ``pymatgen`` (needed for input file generation), if not
already done, are provided on the :ref:`Installation` page.

Citation
========

If you use ``doped`` in your research, please cite:

- S\. R. Kavanagh et al. `doped: Python toolkit for robust and repeatable charged defect supercell calculations <https://doi.org/10.21105/joss.06433>`__. *Journal of Open Source Software* 9 (96), 6433, **2024**

``ShakeNBreak``
================
Expand Down
5 changes: 4 additions & 1 deletion doped/chemical_potentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,13 +1475,16 @@ def calculate_chempots(self, csv_path=None, verbose=True, sort_by=None):
f"Here we will determine a single chemical potential 'limit' corresponding to the least "
f"unstable point on the convex hull for the host material, as an approximation for the "
f"true chemical potentials."
)
) # TODO: Add example of adjusting the entry energy after loading (if user has calculated
# e.g. temperature effects) and link in this warning
# decrease bulk_pde energy per atom by ``e_above_hull`` + 0.1 meV/atom
renormalised_bulk_pde = _renormalise_entry(self.bulk_pde, eah + 1e-4)
self._intrinsic_phase_diagram = PhaseDiagram(
[*intrinsic_phase_diagram_entries, renormalised_bulk_pde],
map(Element, self.bulk_composition.elements),
)
# TODO: Implement same downshifting & warning strategy for competing phase _generation_ too
# Na2FePO4F a good test case for this, 0.17 eV/atom above the MP Hull

chem_lims = self._intrinsic_phase_diagram.get_all_chempots(self.bulk_composition)

Expand Down

0 comments on commit 4705d1c

Please sign in to comment.