SMTG-Bham / doped

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.
https://doped.readthedocs.io
MIT License
129 stars 31 forks source link
ab-initio computational-chemistry computational-materials-science defect-calculation defect-formation-energy defect-levels defect-thermodynamics defects dft doping fermi-level point-defects pymatgen semiconductors shakenbreak transition-levels vasp

Build status Documentation Status PyPI Conda Version Downloads DOI

Schematic of a doped (defect-containing) crystal, inspired by the biological analogy to (semiconductor) doping.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 site, and an overview of the key advances of the package is given in the JOSS paper.

Key Features

All features and functionality are fully-customisable:

Performance and Example Outputs

https://github.com/openjournals/joss-reviews/issues/6433 (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 for more details.

Installation

pip install doped  # install doped and dependencies
conda install -c conda-forge spglib  # bundle C libraries with spglib

Note that either conda install -c conda-forge spglib or pip install git+https://github.com/spglib/spglib --config-settings=cmake.define.SPGLIB_SHARED_LIBS=OFF should be used after pip install doped, which ensures that the correct C libraries are bundled with spglib, to prevent unnecessary warnings.

Alternatively if desired, doped can also be installed from conda with:

  conda install -c conda-forge doped
  pip install pydefect  # pydefect not available on conda, so needs to be installed with pip or otherwise, if using the eFNV correction

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 page for details on this.

Citation

If you use doped in your research, please cite:

ShakeNBreak

As shown in the doped tutorials, it is highly recommended to use the ShakeNBreak approach when calculating point defects in solids, to ensure you have identified the groundstate structures of your defects. As detailed in the theory paper, 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, with a more in-depth explanation and tutorial given on the ShakeNBreak website.

ShakeNBreak Summary

Studies using doped, so far

Acknowledgments

doped (née DefectsWithTheBoys #iykyk) has benefitted from feedback from many users, in particular members of the Scanlon and Walsh research groups who have used / are using it in their work. Direct contributors are listed in the Contributors sidebar above; including Seán Kavanagh, Alex Squires, Adair Nicolson, Irea Mosquera-Lois, Alex Ganose, Bonan Zhu, Katarina Brlec, Sabrine Hachmioune and Savya Aggarwal.

doped was originally based on the excellent PyCDT (no longer maintained), but transformed and morphed over time as more and more functionality was added. After breaking changes in pymatgen, the package was entirely refactored and rewritten, to work with the new pymatgen-analysis-defects package.