Calculate the Formation Energy of Charged Defects¶
1. Introduction¶
Calculate the formation energy of a defect for each of its charge states and for several supercell sizes, starting from the pristine cell. The pristine and defective supercells are built in the notebook, total energy and band gap jobs run for any pristine supercell that lacks them, and one defect formation energy job runs per size and charge state. No analytical finite-size correction is applied; a fit over the supercell sizes extrapolates to the isolated defect instead.
2. Open the notebook¶
In JupyterLite, the notebook is made/workflows/defect_formation_energy_charged.ipynb, entry 6.5.2 "Defect formation energy of charged defects" of made/workflows/Introduction.ipynb.
3. Set the parameters¶
Cell 1.2 holds the material, workflow and compute parameters:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
PRISTINE_NAME is taken from Standata when a Standata material matches it, otherwise looked up with load_material. TIME_LIMIT applies to every job of the notebook.
The overview explains the account, FOLDER, workflow, compute and job parameters.
Cell 1.3 holds the defect, size and charge parameters:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
DEFECT_CONFIGS lists the defects placed in each supercell, with coordinates in the crystal basis of the pristine cell; the default is a vacancy at the origin. SUPERCELL_SCALINGS are the supercell sizes and CHARGES the charge states. SCF_KGRID is the k-grid, the same for the pristine and defective cells. CHEMICAL_POTENTIALS holds the changes of the chemical potentials Δμ per element, in eV/atom, for example from Formation Energies and Convex Hull.
RELAX_PRISTINE_MATERIAL = True relaxes the pristine cell at variable cell before the supercells are built from it. RELAX_DEFECTIVE_MATERIAL = True relaxes each defective supercell at fixed cell in its charge state before its calculation.
4. Run and read the result¶
Run the notebook with Run > Run All and log in when it asks, as in Authentication in JupyterLite.
Section 6 submits the missing pristine reference jobs and one defect formation energy job per size and charge state, each tagged charge:<q>. After the jobs finish, section 7 tabulates the formation energies at the valence band maximum, plots the formation energy against the Fermi level for the largest supercell with every charge state, tabulates the Fermi level range in which each charge state is stable, and, with two or more sizes, plots the finite-size extrapolation.
5. Interactive JupyterLite notebook¶
The interactive JupyterLite notebook for calculating the formation energy of charged defects can be accessed below.
6. Related¶
Calculate Defect Formation Energy runs the defect formation energy workflow from the web interface.