This is a (mid-development) Python package for managing solid-state defect calculations,
geared toward VASP. Much of it is a modified version of the excellent PyCDT.
See this link for the original PyCDT paper.
Defect formation energy plots are templated from AIDE and follow the aesthetics philosopy of sumo, both developed by the dynamic duo Adam Jackson and Alex Ganose.
Example Jupyter notebooks (the .ipynb
files) are provided in examples to show the code functionality and usage.
Chemical potential/stability region plots and defect formation energy (a.k.a. transition level) diagrams:
doped
requires pymatgen<2022.8.23
and its dependencies.
- Because of breaking changes made to the
pymatgen
defects code in version2022.8.23
,doped
requirespymatgen<2022.8.23
, which is installed automatically when installingdoped
. However, as discussed briefly below and in the example notebooks, theShakeNBreak
approach is highly recommended when calculating defects in solids, and this package has been updated to be compatible with the latest version ofpymatgen
. As such, it is recommended to installdoped
in a virtual python environment as follows:
conda create -n doped # create conda environment named doped
conda activate doped # activate doped conda environment
pip install doped # install doped package and dependencies
And then use this environment whenever using doped
.
Instead of conda
you can also use venv
to setup virtual environments,
see here for more.
If you want to use the example files,
you should clone the repository and install with pip install -e .
from the doped
directory.
- (If not set) Set the VASP pseudopotential directory in
$HOME/.pmgrc.yaml
as follows::
PMG_VASP_PSP_DIR: <Path to VASP pseudopotential top directory>
Within your VASP pseudopotential top directory
, you should have a folder named POT_GGA_PAW_PBE
which contains the POTCAR.X(.gz)
files (in this case for PBE POTCAR
s).
(Necessary to generate POTCAR
files, auto-determine INCAR
settings such as NELECT
for charged defects...)
See here if you have issues with this.
- (Optional) Set the Materials Project API key in
$HOME/.pmgrc.yaml
as follows::
MAPI_KEY: <Your mapi key obtained from www.materialsproject.org>
(For pulling structures and comparing properties with the Materials Project database).
As shown in the example notebook, 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.
- Download the
doped
source code using the command:
git clone https://github.com/SMTG-UCL/doped
- Navigate to root directory:
cd doped
- Install the code, using the command:
pip install -e .
doped
has benefitted from feedback from many users, in particular members of the Walsh and Scanlon research groups who have used / are using it in their work. Direct contributors are listed in the Contributors
sidebar above; including Seán Kavanagh, Katarina Brlec, Adair Nicolson and Sabrine Hachmioune. Code to efficiently identify defect species from input supercell structures was contributed by Dr Alex Ganose.