where the first part indicates the energy difference between the defective supercell with charge state q (E (D,q) ) and the host supercell (E H ), the second term represents the change in Gibbs free energy when adding or removing an atom from the supercell (n i is the number of atoms, E i is the elemental reference energy for the corresponding atom, and µ i is the formal chemical potential), the third term is a combination of self-consistent Fermi level (E F ) referenced to the VBM, the eigenvalue of the host VBM (ϵ vbm ), and the potential alignment correction term (E align [q]). An additional correction term (E corr ), specifically the image-charge correction, is also needed to account for spurious finite-size supercell effects.