+q(E F + E vbm ) + E q corr , where E X q tot is the total energy of a supercell containing defect X in charge state q, and E bulk tot is the total energy of the defect free supercell. ∆µ i are chemical potentials of each atomic species i that are added to (n i > 0) or removed from (n i < 0) the supercell to form defect X. µ i are elemental reference energies, calculated for each element in its standard state. E F is the Fermi energy, with this term accounting for the energy to add (q < 0) or remove (q > 0) electrons to or from the supercell. E vbm is the DFT-calculated energy of the valence band maximum of the host system. E q corr is a correction term that accounts for the finite size of the supercell . Correction terms were determined using the method of Freysoldt, Neugebauer, and Van de Walle . The relevant region of the chemical potential space is restricted by the thermodynamic stability limits of the system under study with respect to competing phases and was determined using CPLAP .