Introduction

Density functional theory (DFT) including a Hubbard U correction has been largely used to overcome limitations of standard DFT for correlated systems1,2,3,4,5,6,7,8,9,10. However, the parameter U associated with an effective on-site Coulomb interaction on specific orbitals needs to be selected. In 2005, Cococcioni and de Gironcoli introduced a nonempirical linear-response approach based on density-functional perturbation theory10, which has largely been applied11,12,13,14,15,16,17,18,19,20. In other studies, the parameter U is chosen to reproduce specific experimental properties, such as band gaps21,22, reaction enthalpies23,24,25, oxidation energies26, activation energies21, atomic structures27, density of states28, or magnetic arrangements29. Alternative strategies consist in fixing U to yield states in the middle of the band gap30, to comply with criteria based on energy barriers31, to have vanishing quasiparticle corrections to the fundamental band gap32, or to match hybrid-functional results33. The parameter U has also been calculated through an alternative linear-response method34, through unrestricted Hartree-Fock approach35,36, through the random-phase approximation37,38,39,40, through Monte Carlo sampling41, and through machine-learning techniques based on Bayesian optimization42. Clearly, a general consensus on the way U should be determined is still lacking.

In the linear-response approach of Cococcioni and de Gironcoli10, U is fixed to comply with the piecewise linearity condition (PWL) of the total energy upon electron occupation, which is a property of the exact density functional43,44,45,46,47. While being defined for fractional charges, the PWL allows for an accurate description of ground state and excited state properties of systems with integer number of electrons48. Most density functionals do not comply with the PWL. For instance, the total energy obtained with the Perdew-Burke-Ernzerhof (PBE)49 semilocal functional is convex with the number of electrons. Similarly, the total energy obtained with the Hartree-Fock functional is concave. However, the PWL can be retrieved through suitably tuned functionals. For instance, for hybrid functionals50, there exists a fraction α = αk of Fock exchange for which the total energy is linear upon electron occupation. Through Janak’s theorem51, this results in a generalized Kohn-Sham level that is constant upon electron occupation. Additionally, under this condition, band gaps and formation energies of localized states are accurately reproduced48,52,53,54,55,56,57,58,59,60,61,62.

Localized states represent a prototypical case for enforcing the PWL. For instance, for hybrid functionals, this can be achieved by using either electron probes57,58,59,60, defect states52,54,61,62,63,64,65,66,67,68,69,70,71, or Wannier functions72. In the context of polarons, the PWL has been used to regulate the strength of potentials added to the semilocal Hamiltonian to favor charge localization, as in the schemes of Lany and Zunger73 and of Falletta and Pasquarello61,62. Moreover, the properties of polaronic defects are found to be robust for semilocal or hybrid functionals complying with the PWL61,62. Hence, it is of interest to investigate whether such robustness can be used to validate the determination of U in DFT + U functionals.

In this work, we determine the Hubbard parameter U by using polaronic defect states to explicitly enforce the piecewise linearity of the total energy upon electron occupation. We achieve electron densities, lattice distortions, and formation energies in accord with results from piecewise linear hybrid functionals, thereby validating the accuracy of the method. The resulting energetics is accurate also for polaron hoppings, whereby the use of configurational-dependent U values can be avoided. In this approach, the selection of U is based on physical properties that are directly associated with the orbitals to which U is applied, without involving more global properties, such as band gaps and density of states. For comparison, we also calculate U values through a widely-used linear-response approach10 finding significantly different values of U, which result in a departure from the condition of piecewise linearity. As case studies, we consider the self-trapped electron in BiVO4, the self-trapped hole polaron in MgO, the Li-trapped hole in MgO, and the Al-trapped hole trapped α-SiO2.

Results and Discussion

Selection criterion for U

The DFT + U energy functional can be written in its simplified rotationally-invariant form as8:

$${E}^{U}[\{{\psi }_{\uparrow }^{U}\},\{{\psi }_{\downarrow }^{U}\}]={E}^{0}[{n}_{\uparrow }^{U},{n}_{\downarrow }^{U}]+\frac{U}{2}\mathop{\sum}\limits_{I\sigma }{{{\rm{Tr}}}}[{{{{\bf{n}}}}}^{I\sigma }(1-{{{{\bf{n}}}}}^{I\sigma })],$$
(1)

where E0 is the semilocal energy, \({\psi }_{i\sigma }^{U}\) are the wave functions, \({n}_{\sigma }^{U}={\sum }_{i}| {\psi }_{i\sigma }^{U}|\) is the total density, σ the spin index, U the Hubbard parameter, I the atomic site, and nIσ the occupation matrix of localized orbitals \({\phi }_{m}^{I}\) of state index m, which is defined as

$${n}_{m{m}^{{\prime} }}^{I\sigma }=\mathop{\sum}\limits_{i}{f}_{i\sigma }\left\langle {\psi }_{i\sigma }^{U}| {\phi }_{m}^{I}\right\rangle \,\left\langle {\phi }_{{m}^{{\prime} }}^{I}| {\psi }_{i\sigma }^{U}\right\rangle ,$$
(2)

where fiσ are the occupations of the Kohn-Sham orbitals. Variational minimization of the energy functional EU leads to the following equations:

$$({{{{\mathcal{H}}}}}_{\sigma }^{0}+{V}_{\sigma }^{U}){\psi }_{i\sigma }^{U}={\epsilon }_{i\sigma }^{U}{\psi }_{i\sigma }^{U},$$
(3)

where \({{{{\mathcal{H}}}}}_{\sigma }^{0}\) is the PBE Hamiltonian, \({\epsilon }_{i\sigma }^{U}\) are the eigenvalues, and \({V}_{\sigma }^{U}\) is the DFT + U potential given by13

$${V}_{\sigma }^{U}=U\mathop{\sum}\limits_{Im{m}^{{\prime} }}\left[\frac{{\delta }_{m{m}^{{\prime} }}}{2}-{n}_{m{m}^{{\prime} }}^{I\sigma }\right]\left\vert {\phi }_{{m}^{{\prime} }}^{I}\right\rangle \,\left\langle {\phi }_{m}^{I}\right\vert .$$
(4)

From Eq. (4), one can see that the Hubbard potential is repulsive for unoccupied orbitals and attractive for occupied orbitals, thereby favoring the Mott localization of electrons on specific atomic sites.

We here consider enforcing the PWL through polaronic defect states associated with the orbitals subject to the correction U. The PWL can then be determined nonempirically by finding the value U = Uk such that the concavity of the total energy upon partial electron occupation vanishes, namely

$${\left.\frac{{d}^{2}}{d{q}^{2}}{E}^{U}(q)\right\vert }_{U = {U}_{{{{\rm{k}}}}}}=0,$$
(5)

where q is the fractional charge. Through Janak’s theorem, the condition in Eq. (5) turns into a constraint on the energy level of the localized state,

$${\left.\frac{d}{dq}{\epsilon }_{{{{\rm{p}}}}}^{U}(q)\right\vert }_{U = {U}_{{{{\rm{k}}}}}}=0,$$
(6)

which requires the energy level to be independent of electron occupation. Eq. (6) can be rewritten as

$$\frac{d{\epsilon }_{{{{\rm{p}}}}}^{0}}{dq}+\frac{d}{dq}\left\langle {\psi }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}| {V}_{\sigma }^{{U}_{{{{\rm{k}}}}}}| {\psi }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}\right\rangle =0,$$
(7)

where \({\psi }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}\) is the wave function of the localized state and \(d{\epsilon }_{{{{\rm{p}}}}}^{0}/dq\) the variation of the energy level with q as calculated with PBE. We remark that the second term on the right-hand side of Eq. (7) includes complex derivatives of the matrix elements \({n}_{m{m}^{{\prime} }}^{I\sigma }\) with respect to q. Therefore, it is more practical to determine Uk by solving Eq. (6) by finite differences, namely by imposing that the energy levels calculated at integer charges q = 0 and q = Q coincide (Q = −1 for localized electrons, Q = +1 for localized holes).

For a Hubbard parameter U, the formation energy of the defect state is calculated as74

$${E}_{{{{\rm{f}}}}}^{U}(Q)={E}^{U}(Q)-{E}_{{{{\rm{ref}}}}}^{U}(0)+Q{\epsilon }_{{{{\rm{b}}}}}^{U},$$
(8)

where EU(Q) and \({E}_{{{{\rm{ref}}}}}^{U}(0)\) are the total energies of the defect state and of the reference system, respectively, and \({\epsilon }_{{{{\rm{b}}}}}^{U}\) is the relevant band edge of the pristine system. In Eq. (8), the defect and reference systems contain the same atoms. We stress that finite-size electrostatic corrections due to the use of periodic boundary conditions need to be applied69,75,76,77. For simplicity of notation, we consider all total energies, formation energies, and energy levels to be corrected by finite-size effects via the expressions in Eqs. (11) and (12) in Methods.

As case studies, we consider self-trapped and impurity-trapped polaronic defects. In particular, we take the self-trapped electron in BiVO478, the self-trapped hole in MgO79, the Li-trapped hole in MgO80,81, and the Al-trapped hole in α-SiO279,82,83,84,85,86. We remark that, when using the PBE functional, such polaronic states are unstable. Thus, upon structural relaxation, the lattice distortions vanish and the defect charge delocalizes. In particular, self-trapped polarons delocalize over the entire system, and impurity-trapped holes distribute over the O atoms surrounding the impurity. At variance, for the polaronic defects under consideration, DFT + U can stabilize the localized states. We apply the U correction to the orbitals that constitute the localized states, namely the 3d orbitals of V atoms in BiVO4, the 2p orbitals of O atoms in MgO, and the 2p orbitals of O atoms in α-SiO2. In BiVO4, the self-trapped electron localizes on a V atom. In MgO, the self-trapped hole localizes on a O atom. In Li-doped MgO, the hole localizes on a O atom neighboring the Li site. In α-SiO2, the hole localizes on a O atom neighboring the Al site. Additional computational details are given in Methods.

We determine the Hubbard parameter Uk through the enforcement of Eq. (6). We proceed as follows. We obtain the defect structure at various values of U by performing self-consistent structural relaxations. At such fixed structures, we calculate the energy levels \({\epsilon }_{{{{\rm{p}}}}}^{U}(Q)\) and \({\epsilon }_{{{{\rm{p}}}}}^{U}(0)\) accounting for finite-size effects [cf. Eq. (12) in Methods]. By imposing that \({\epsilon }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}(Q)={\epsilon }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}(0)\), we then obtain Uk = 3.5, 7.7, 7.5, and 8.3 eV for the self-trapped electron in BiVO4, the self-trapped hole in MgO, the Li-trapped hole in MgO, and Al-trapped hole in α-SiO2, respectively. This procedure is illustrated in Fig. 1 for the self-trapped hole in MgO. We remark that the values of Uk obtained for the self-trapped and the Li-trapped holes in MgO differ by only 0.2 eV, indicating that our scheme is robust upon varying the polaronic defect. This is analogous to the case of hybrid functionals, where one observes a weak dependence of αk on the defect used for enforcing the PWL52,57,58,59. In this context, we remark that finite-size corrections crucially affect the value of Uk. Indeed, without such corrections, we would have obtained \({U}_{{{{\rm{k}}}}}^{{{{\rm{uncor}}}}}=\) 1.7, 4.9, 4.6, 5.1 eV for our respective case studies, with differences with respect to the corrected values amounting up to 3.2 eV. This emphasizes the importance of correcting for finite-size errors.

Fig. 1: Enforcement of the piecewise linearity.
figure 1

Energy levels \({\epsilon }_{{{{\rm{p}}}}}^{U}(+1)\) and \({\epsilon }_{{{{\rm{p}}}}}^{U}(0)\) as a function of U for the self-trapped hole in MgO. The defect levels are identified by their respective charge. The value Uk is found such that \({\epsilon }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}(+1)={\epsilon }_{{{{\rm{p}}}}}^{{U}_{{{{\rm{k}}}}}}(0)\).

Band gaps and density of states

It is of interest to investigate the band gaps resulting from our selection of U. In Fig. 2, we show the evolution of the band gaps obtained with DFT + U as function of U and of the band gaps obtained with PBE0(α) as a function of α. In correspondence of Uk, DFT + U yields band gaps of 2.52, 6.67, and 8.82 eV for BiVO4, MgO, and α-SiO2, respectively. For MgO, we here use the value of Uk calculated for the self-trapped hole, considering the negligible difference with respect to the value for the Li-trapped hole. After the inclusion of appropriate corrections due to spin-orbit coupling, phonon renormalization, and exciton binding energies62, the DFT + Uk band gaps are found to noticeably differ from their experimental counterparts (cf. Table 1). These discrepancies contrast with the case of hybrid functionals, for which the agreement with experiment is within 0.25 eV (cf. Table 1). The good performance of hybrid functionals derives from a global improvement of the electronic structure, in accord with numerous previous studies52,53,57,58,60,72,87,88. From this analysis, we infer that an accurate description of band gaps should generally not be expected from DFT + Uk. We assign this to the fact that the U correction only applies to a subset of orbitals, which are not necessarily involved in both valence and conduction bands. Nevertheless, we expect that physical properties directly associated with the U-corrected orbitals should be properly described in DFT + Uk. For instance, in the case of polaronic defects, the formation energies express the relative stability of localized and delocalized states both being constituted by the same U-corrected orbitals.

Fig. 2: Band gaps obtained with various functionals.
figure 2

Band edges as obtained with DFT + U and PBE0(α) as a function of U and α, respectively, for BiVO4, MgO, and α-SiO2. For MgO, we consider Uk and αk calculated for the self-trapped hole. The vertical red line denotes the choice of the parameter for which the piecewise linearity condition is retrieved. The energy levels are aligned with respect to the average electrostatic potential98.

Table 1 Band gaps.

Similar arguments apply when considering the effect of the Hubbard parameter Uk on the density of states. As test case, we take α-SiO2 and compare the density of states obtained with DFT + Uk with respect to experiment. As illustrated in Fig. 3, DFT + Uk yields a valence band width of 8.1 eV, which is lower than both the corresponding PBE value of 9.3 eV and the experimental value of 11.0 eV89. This confirms the common finding that DFT + U narrows the band widths90. Hence, in analogy to our discussion on band gaps, DFT + Uk should not be expected to reproduce more global properties such as the density of states, even though the polaronic properties are reasonably well captured. This should be contrasted with the case of the hybrid functional PBE0(αk), where the globally improved functional also yields an improved band width. Indeed, in the case of α-SiO2, we find a PBE0(αk) band width of 10.0 eV, improving upon the PBE value of 9.3 eV (cf. Fig. 3).

Fig. 3: Band widths obtained with various functionals.
figure 3

Density of valence band states for α-SiO2 as calculated with PBE0(αk), PBE, and DFT + Uk, compared with the experimental XPS spectrum from ref. 89. The corresponding band widths are indicated. The theoretical band widths correspond to differences between Kohn-Sham levels, whereas the experimental band width is obtained from extrapolations of the wings. The curves are aligned with respect to the position of the highest energy peak.

Polaronic defects

We calculate electronic and structural properties of the polaronic defects studied in this work using the DFT + Uk functional and compare the results with those from PBE0(αk) hybrid functionals. Details of the hybrid functional calculations are given in Methods. As illustrated in Fig. 4, we find very good agreement between the defect densities calculated with the two schemes. Moreover, the lattice distortions practically coincide, with bond lengths deviating by at most 0.03 Å (cf. Table 2). Using Eq. (8), we calculate the respective formation energies \({E}_{{{{\rm{f}}}}}^{{U}_{{{{\rm{k}}}}}}=-0.49\), − 0.64, − 2.01, and −3.27 eV. These values are given in Table 3. Deviations from PBE0(αk) results amount to at most 0.19 eV (cf. Table 3). This extends the robustness of piecewise linear functionals to DFT + U schemes61,62, and concurrently validates our criterion for determining the value of U.

Fig. 4: Polaron electron density.
figure 4

Electron densities obtained with DFT + Uk and PBE0(αk) functionals for the self-trapped electron in BiVO4, the self-trapped hole in MgO, Li-trapped hole in MgO, and the Al-trapped hole in α-SiO2. The defect density is integrated over xy-planes. On top, isodensity surfaces at 5% of their maximum (Bi in orange, V in cyan, O in red, Mg in pink, Li in brown, Si in blue, Al in gray).

Table 2 Polaron structure.
Table 3 Comparison between different schemes for the determination of U.

We further investigate the accuracy of the DFT + Uk energetics along a polaron hopping pathway. As test case, we consider the hopping of a hole polaron between two neighboring sites in MgO. We construct a 7-image migration pathway through linear interpolation of the initial and final states. First, we evaluate the energy along the path using the determined value of Uk, as given in Fig. 5a. Next, we determine \({U}_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) through the enforcement of the PWL for each image, finding the largest deviation with respect to Uk in correspondence of the transition state. This is due to the fact that at the transition state the polaron density is equally distributed among two neighboring O sites, thus deviating the most from the case of the hole polaron trapped at a single O site. Then, we calculate the energy along the pathway as \({E}^{{U}_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}}[{{{\rm{polaron,\; im}}}}]-{E}^{{U}_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}}[{{{\rm{bulk}}}}]\) for each image. As illustrated in Fig. 5a, the difference between the energy barriers calculated with either fixed Uk or image-dependent \({U}_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) amounts to only 0.06 eV. This validates the choice of a fixed Uk for polaron hopping calculations. We carry out the same analysis with the PBE0(α) hybrid functional, finding a difference of 0.08 eV between the barriers calculated with either fixed αk or image-dependent \({\alpha }_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) [cf. Fig. 5b)]. The energy barriers obtained with DFT + Uk and PBE0(αk) differ by 0.32 eV, which is comparable with the typical accuracy achieved upon enforcing the PWL with different functionals (cf. Table 3 and refs. 61,62).

Fig. 5: Polaron hopping barriers obtained with various functionals.
figure 5

Energy along a polaron pathway connecting two neighboring O atoms in MgO, as calculated (a) with fixed Uk and image-dependent \({U}_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) in DFT + U calculations, and (b) with fixed αk and image-dependent \({\alpha }_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) in PBE0(α) calculations. The values of \({U}_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) and \({\alpha }_{{{{\rm{k}}}}}^{{{{\rm{im}}}}}\) for individual images are given.

Comparison with linear-response method

For comparison, we also determine U using the linear-response approach introduced by Cococcioni and de Gironcoli10. In this method, the parameter U is chosen to enforce the PWL in density-functional perturbation theory as

$${U}_{{{{\rm{LR}}}}}={({\chi }_{0}^{-1}-{\chi }^{-1})}_{II},$$
(9)

where χ and χ0 are screened and unscreened response matrices, respectively, which are defined as variations of the occupations \({n}^{I}={\sum }_{\sigma m}{n}_{mm}^{I\sigma }\) with respect to perturbations αJ of the electronic occupations at site J. We determine ULR on neutral bulk structures using the PBE wave functions. We find ULR = 5.4, 10.9, 10.1 eV for BiVO4, MgO, and α-SiO2, respectively. The resulting formation energies of the polaronic defects studied in this work are \({E}_{{{{\rm{f}}}}}^{{U}_{{{{\rm{LR}}}}}}=-\)1.34, − 1.67, 3.09, and − 4.00 eV, as given in Table 3. We remark that ULR is noticeably larger than Uk in all cases. Consequently, the respective formation energies calculated with Uk and ULR differ by 0.85, 1.03, 1.08, and 0.73 eV. These large variations are in part due to the shift of the band edges upon variation of U (cf. Fig. 2), which enter the definition of the formation energy in Eq. (8). To assess the dependence on the adopted configuration in the context of this comparison, we also use the linear-response approach on the very same polaron configuration used for the determination of Uk in the direct piecewise linear scheme. In this way, the same configurational set-up is used in the two approaches, thereby enabling a direct comparison. We take the \({U}_{{{{\rm{LR}}}}}^{{\prime} }\) parameter resulting from the linear-response scheme for the atom where the polaron is localized. Focusing on the hole polaron in MgO, we find \({U}_{{{{\rm{LR}}}}}^{{\prime} }=9.4\) eV, to be compared with the respective value Uk = 7.7 eV found through the direct application of the PWL condition. Thus, this analysis further confirms that the structural configuration is not at the origin of the differences between the two schemes for the determination of U. Additionally, we remark that our Uk is found for a Hubbard correction acting on all the atoms of the same species at the same time, whereas in the linear-response approach ULR is found through a variation on a single atom. Hence, for an even closer comparison, we also determine the value \({U}_{{{{\rm{k}}}}}^{{\prime} }\) by enforcing the PWL upon the application of U to the sole atom where the polaron localizes. In the case of the hole polaron in MgO, we find \({U}_{{{{\rm{k}}}}}^{{\prime} }=8.5\) eV, which still differs sizably from \({U}_{{{{\rm{LR}}}}}^{{\prime} }=9.4\) eV. This further confirms that the differences between the two methods are not only related to the computational setup.

The significant differences between Uk and ULR call for a deeper investigation. Since both approaches are designed to enforce the PWL, we explicitly verify the extent by which the PWL is satisfied in the two schemes. This can be achieved by studying the total energy and the defect level as a function of q for the two choices of the parameter U. As illustrated in Fig. 6, Uk indeed yields a piecewise linear total energy and a constant defect level with respect to partial electron occupation. At variance, for ULR, the total energy is convex with q, and the defect level is not constant. To understand these differences, we remark that the Kohn-Sham equations used to determine U in the linear-response approach are

$$\left({{{{\mathcal{H}}}}}_{\sigma }^{0}+{\alpha }^{I}\mathop{\sum}\limits_{m}\left\vert {\phi }_{m}^{I}\right\rangle \,\left\langle {\phi }_{m}^{I}\right\vert \right){\psi }_{i\sigma }^{{\alpha }^{I}}={\epsilon }_{i\sigma }^{{\alpha }^{I}}{\psi }_{i\sigma }^{{\alpha }^{I}},$$
(10)

where αI is the amplitude of the perturbation, and \({\epsilon }_{i\sigma }^{{\alpha }^{I}}\) and \({\psi }_{i\sigma }^{{\alpha }^{I}}\) are the corresponding eigenvalues and wave functions. The Hamiltonian in Eq. (10) differs from the DFT + U Hamiltonian in Eq. (3), whereby the U values that enforce the PWL in the two cases could be different. This could underlie the departure from the PWL observed in Fig. 6 for DFT + ULR. However, we remark that despite the different defect formation energies, the electron densities and the structural distortions of the polaronic defects obtained with Uk and ULR practically coincide.

Fig. 6: Piecewise linearity of different schemes for the determination of U.
figure 6

a Deviation from the piecewise linearity of the total energy and b dependence of the defect level on the charge q, for the self-trapped hole in MgO. Results for Uk and ULR are compared. The solid lines are a guide to the eye.

Discussion

In conclusion, our work addresses the determination of the Hubbard U in the DFT + U functional through enforcing the piecewise linearity condition on polaronic defect states. Our selection of U yields electronic and structural properties of such defects in good agreement with results from hybrid functionals satisfying the same constraint. Our scheme is further validated by the excellent agreement found for formation energies obtained with piecewise linear functionals. We demonstrate that our criterion for U leads to accurate energy barriers in polaron hoppings, whereby configurational-dependent U values can be avoided. We emphasize that our approach targets physical properties related to the U-corrected orbitals, while more global properties, such as band gaps and band widths, are not directly involved. For comparison, we also calculate U through a widely-used linear-response method, finding values of U that break the piecewise linearity condition and give larger formation energies. To sum up, we showed that polaronic defect states can effectively be used for determining the value of the Hubbard U parameter in DFT + U. Additionally, we demonstrated that the resulting electronic, structural, and energetic properties of such defects closely correspond to those obtained with hybrid functionals, but at a noticeably lower computational cost.

Methods

Computational details

The calculations are performed using the version 7.1 of the quantum espresso suite91. The core-valence interactions are described by normconserving pseudopotentials92. BiVO4 is modeled with a 96-atom orthorhombic supercell (a = 10.34 Å, b = 10.34 Å, c = 11.79 Å), MgO with a 64-atom cubic supercell (a = 8.45 Å), and α-SiO2 ($\alpha$-quartz) with a 72-atom hexagonal supercell (a = 9.97 Å, c = 10.96 Å). We optimize the lattice parameters and the atomic positions using the PBE functional for the pristine systems. The Brillouin zone is sampled at the Γ point and the energy cutoff is set to 100 Ry in all cases. We obtain the electron and hole polarons by either adding or removing one electron, respectively. The defect structures are relaxed at fixed supercell parameters. The high-frequency and static dielectric constants used for the determination of the finite-size effects69 are calculated by applying finite electric fields93 at the semilocal level of theory61,62. The Hubbard parameters ULR are calculated using the code hp20.

Hybrid functional calculations

The procedure for determining αk is analogous to that for Uk (see refs. 61,62). The hybrid functional results for the self-trapped polarons in BiVO4 and MgO, and the Al-trapped hole in α-SiO2 are taken from refs. 61,62, in which the same computational setup has been employed. For the Li-trapped hole in MgO, we obtain αk = 0.33, which is in good agreement with the value αk = 0.34 found for the self-trapped hole61,62. The corresponding formation energy is −1.82 eV and is given in Table 3.

Finite-size corrections

For a system with supercell charge q* in a geometry \({{{{\bf{R}}}}}_{{Q}^{* }}\), relaxed in the presence of a charge Q*, the finite-size correction for the total energy is given by69

$$\begin{array}{l}{E}_{{{{\rm{cor}}}}}({q}^{* },{{{{\bf{R}}}}}_{{Q}^{* }})\,=\,{E}_{{{{\rm{m}}}}}({Q}^{* },{\varepsilon }_{0})-{E}_{{{{\rm{m}}}}}({Q}^{* }+{Q}_{{{{\rm{pol}}}}}^{* },{\varepsilon }_{\infty })\\ \qquad\qquad\qquad\quad+\,{E}_{{{{\rm{m}}}}}({q}^{* }+{Q}_{{{{\rm{pol}}}}}^{* },{\varepsilon }_{\infty }),\end{array}$$
(11)

where Em denotes the finite-size correction for defects screened through either the high-frequency (ε) or the static (ε0) dielectric constant75,76, and \({Q}_{{{{\rm{pol}}}}}^{* }=-{Q}^{* }(1-{\varepsilon }_{\infty }/{\varepsilon }_{0})\) is the ionic polarization charge associated with the frozen lattice distortions. Through Janak’s theorem, the corresponding finite-size correction for the defect energy level is69

$${\epsilon }_{{{{\rm{cor}}}}}({q}^{* },{{{{\bf{R}}}}}_{{Q}^{* }})=-2\frac{{E}_{{{{\rm{m}}}}}({q}^{* }+{Q}_{{{{\rm{pol}}}}}^{* },{\varepsilon }_{\infty })}{{q}^{* }+{Q}_{{{{\rm{pol}}}}}^{* }}.$$
(12)

We remark that the supercell charges q* and Q* coincide with the polaron charges q and Q for self-trapped polarons, as in BiVO4 and MgO. At variance, in the cases of Li-doped MgO and Al-doped α-SiO2, q* = q − 1 and Q* = Q − 1 since the hole trapping occurs in the neutral state.

Acknowledgements

The calculations have been performed at the Swiss National Supercomputing Centre (CSCS) (grant under Projects ID s1122).