III-nitride materials such as GaN and InGaN have found their applications in advanced solid-state lighting technologies [1,2,3] and optoelectronic devices including diodes or solar cells [4,5,6]. Moreover, the ferromagnetism (FM) in GaN or InN without doping by transition metal atoms was recently observed [7,8,9,10,11]. This FM was ascribed to the formation of native defects, such as cation vacancies or their complexes. For example in Ref. [9], analysis of the characteristics of hysteresis curves in irradiated GaN showed that the coercive field increases in line with the increase of concentration of gallium vacancy (VGa). The stable FM was discovered in n-type GaN, and it can be due to the presence of non-intentional donors, such as oxygen.

Measurements using positron annihilation spectroscopy of VGa and its complexes containing the gallium vacancy and substitutional oxygen atom at nitrogen site VGaON have found them to be dominating defects in as-grown n-GaN [12,13,14,15,16,17,18,19,20,21]. Both defects were intensively studied in experiments for their optical properties [12, 13, 16, 17, 19, 21] indicating defects as possible sources of the green (GL) and yellow (YL) luminescence in GaN. In Ref. [12], Son et al. detect spin-polarized VGaON by electron paramagnetic resonance and suggest that YL and GL bands can be explained by 0/− and −/−2 VGaON–optical transition levels. Moreover, in Ref. [13], two electronic structures were observed, which arise due to two different configurations of VGaON in wurtzite (w) GaN, one with ON either along the c-axis (axial configuration, referred below as a) and other one in one of three equivalent tetrahedral positions (basal configuration, referred below as b).

However, there is not unequivocal agreement on the structure of VGa and its complexes—both experimental [12, 13, 16, 17, 19, 21, 22] and theoretical [14,15,16,17,18, 20,21,22,23,24,25,26,27,28,29,30,31,32] results are divergent and sometimes contradictory. For example, the prediction of multiband luminescence due to the difference in geometries of VGaON was demonstrated in Ref. [32]. Nevertheless, the magnetic properties for both a- and b-configuration of VGaON were not discussed there. Moreover, various aspects of magnetism in GaN are not yet fully elucidated. There are few works which analyze magnetic coupling of VGa-VGa [24, 25, 27, 31] or VGaON-VGaON [26].

In fact, the calculated defect structure strongly depends upon the used exchange-correlation functional [14,15,16,17,18, 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]. VGaON in III-N nitrides were theoretically investigated by local density approximation (LDA)/generalized gradient approximation (GGA) [14, 15, 20] or the hybrid functional (HyF) calculations [16,17,18, 21, 26, 32, 33]. Finally, GGA+U approach with the +U term imposed on p(N) in an examination of VGa was also tried [30, 31]. Both the GGA+U [30, 31] and the HyF [16,17,18, 21, 22, 26,27,28, 32,33,34] methods enhance spin polarization VGa or its complexes and push defect levels deeper into the band gap in comparison with LDA/GGA [14, 15, 20, 29]. According GGA+U calculations, VGa demonstrates the U-induced splitting of partly occupied multiplets, and “negative-Ueff” behavior. The results for U(N) = 5 eV [30, 31] reproduce well the HyF calculations [17, 18, 23, 27, 28, 32, 33]. Both approaches give rise to stronger localization of the wave functions. This, in turn, alters the character of magnetic coupling between defects [31]. In fact LDA/GGA calculations are erroneous as they lead to overly long-ranged magnetic interactions [24, 25, 27, 31].

The increasing localization of the defect wave function has the opposite effect on the stability of the local magnetic moment and on the collective magnetization: in the former case, the increased localization stabilizes the high-spin (HS) state, while the coupling through the overlap of the wave functions of the neighboring defects is decreased [27, 30, 31, 35]. For both the VGa and the VGaON complexes, strong localization can lead to stable local spin moments [26, 27, 35] but it does not guarantee automatically a stable interaction between them [31, 35]. Partial delocalization of defect-induced bands may reduce the stability of HS state defect but also be responsible for the long-range magnetic interactions. This stabilization can be due to p-d exchange interaction of impurity like Mn [36] or the spin polarization of p electrons in low In-content InGaN.

Both In concentration and microscopic In distribution strongly influence the electronic structure and physical properties of InGaN [37]. The localization of the valence band maximum (VBM) states and the domination of the light emission of InGaN with low In content were observed [37]. Similar to GaN, VGa-complexes were also suggested to be the important non-radiative defects in InGaN quantum well [38, 39]. Strong effects in electronic structure of VGaON-hydrogen complex were found in p-type InGaN for high In content [33].

To check the hypothesis that magnetic coupling between VGaON-complexes can be more stable in InGaN, in the present paper, we study VGaON-structure in zb (zinc blende)– and w-GaN and InGaN using GGA+U approach. After presenting the details of calculations in Sect. 1, the justification of the chosen approach is underlined. Next, we present results of calculations of the formation energies of defects (Sect. 1.3). Sections 2.12.3 contain the results of calculations of electronic structure of VGaON in GaN and transition levels (Sect. 2.2) and electronic structure of InGaN (Sect. 2.3). The magnetic coupling between defects is analyzed in Sect. 2.4. Next, the structural relaxation is discussed in Sect. 3. Finally, Sect. 4 summarizes the results.

1 Method of Calculations

1.1 Details of Calculations

Calculations based on the density-functional theory were performed using the ultrasoft pseudopotentials [40], the Perdew-Burke-Ernzerhof GGA exchange-correlation potential [41], including the +U term implemented in the QUANTUM-ESPRESSO code [42] along the theoretical framework developed in Ref. [43]. We employed ultrasoft atomic pseudopotentials and chose 3d, 4s, and 4p orbitals for Ga; 4d, 5s, and 5p for In; 2s and 2p for N; and O as valence orbitals. The plane wave basis with the kinetic energy cutoff (Ecut) of 40 Ry provided a convergent description of the analyzed properties. The Brillouin zone summations were performed using the Monkhorst-Pack scheme with a 2 × 2 × 2 k-point mesh [44]. Methfessel-Paxton smearing method with the smearing width of 0.136 eV was employed for obtaining partial occupancies. The zb 216- and 512-atoms and w 128-, 192-atoms supercells were considered, and ionic positions were optimized until the forces acting on ions were smaller than 0.02 eV/Å. The spin-orbit coupling was neglected. Formation energies were calculated according to Ref. [45] for N-rich conditions [30]. The +U corrections were imposed on d(Ga) and p(N) [30, 31]; d(Ga), p(N), and p(O); and d(Ga), p(N), p(O), and d(In) for pure GaN, GaN:VGaON, and InGaN:VGaON, respectively.

1.2 Justification for the Chosen Method

1.2.1 Impact +U Correct on Band and Crystal Structure of GaN

The band gaps Egap calculated within LDA/GGA are shrunk and amount only to about 1.4 and 1.6 eV for the zb- and w-crystals, respectively (see Fig. 1 and Refs. [30, 31]). Moreover, both LDA and GGA give too high calculated energy positions of d(Ga)-derived bands [46]. Inclusion of large U(Ga) = 10 eV term solves the problem with the correct position of d(Ga) [46,47,48], but Egap is still about 2.5 eV (see Fig. 1). Our previous works showed that increasing U(N) from 0 to 5 eV opens the band gap of w-GaN from 1.6 to 3.0 eV [30, 31], but with d(Ga) centered about 13 eV below the VBM, similar to LDA/GGA results [30, 46]. Here, we systematically analyze how the U(Ga) and U(N) terms affect the electronic structure in both the zb- and w-crystals. On-site +U parameter, varying from 0 to 10 eV, was applied separately on d(Ga) and p(N), and then together on both d(Ga) and p(N) orbitals, where U(N) = 5 eV. The energy Egap calculated as a function of U is shown in Fig. 1.

Fig. 1
figure 1

The energy of the band gap (Egap) of the w- and the zb-GaN as a function of U. +U correction along with the relaxation of atomic positions are enforced on 1, 1′ d(Ga); 2, 2′ p(N); and 3, 3′ +U correction applied on 3d(Ga) for U(N) = 5 eV. 1, 2, 3 w-GaN; 1′, 2′, 3′ zb-GaN

We found that U(Ga) = 3.0 eV along with U(N) = 5 eV reproduces the experimental Egap of 3.2 and 3.4 eV for both zb- and w-GaN [49] (Fig. 1, (3, 3′)) and the binding energy of Ga 3d level centered about 15.5 eV below the VBM—in agreement with Ref. [50]. These values are also in agreement with HyF results [51]. Such an underestimation of the band gap and band structure follows from the sublinear dependence of the LDA/GGA total energy on the occupation [43]. Moreover, the sensitivity of Egap in both U(Ga) and U(N) is explained by the orbital compositions of both the VBM and the minimum of the conduction band (CBM).

GGA+U calculations give the lattice constants azb = 4.57 Å and (aw = 3.19 and cw = 5.2 Å) for zb- and w-GaN, respectively. These values are very close to the experimental data of azbexp = 4.55 Å [52, 53] and (awexp = 3.18 and cwexp = 5.18 Å [52]) for zb- and w-structure, respectively.

1.2.2 Impact of +U Correction on Electronic Structure of GaN with Defect

The +U corrections were imposed on d(Ga), p(N), p(O), and d(In). U(O) = U(N) = 5 eV, and U(In) = U(Ga) = 3 eV for GaN. However, including U(O) and U(In) terms have a small effect on VGaON structure due to small contributions of p(O) and d(In) orbitals to the defect states (see Sects 2.1 and 2.3 for the detailed discussion of electronic structure of both GaN:VGaON and GaN:VGaONInGa).

1.2.3 GGA+U vs HSE Results

It was noted above that HyF [16,17,18, 21, 22, 26,27,28, 32, 33] calculated VGa-structure is in agreement with GGA+U results for U(N) = 5 eV [30, 31]. Here, in order to verify the agreement further, we perform calculations for Heyd, Scusseria, and Ernzherof functional, based on the PBE functional where parameter α is a fraction of the exchange that is replaced by Hatree-Fook exchange [54]. Calculations were done for isolated VGaON and VGaON-VGaON (3NNs axial configuration in notation of Sect. 2.4) for w-GaN. Screening parameter α = 0.25 was set to reproduce band gap of ~ 3.0 eV. Nevertheless, the results indicate that energies of spin polarization (ΔEPM−FM) (defined in Sect. 2.1) agree to within 0.05 eV or less, and energies of magnetization (ΔEAFM−FM) (defined in Sect. 2.2) agree to within 0.005 or less. That shows the good agreement for calculations of magnetic properties within these two approaches.

We note that the problem of choosing the α parameter for getting accurate defect levels is still an open issue [55, 56], as well choosing the U parameter in GGA+U approach [30].

1.3 Formation Energy of Defects

Formation energy of charged VGaON was calculated. One geometry of a-VGaON was considered for cubic GaN and two a- and b-VGaON configurations were analyzed for w-GaN. Because the aim was to understand the influence of In doping on spin-polarized properties, the number of configurations of complex VGaON was chosen: InGa as second nearest neighbor to VGa when forming ON-InGa (referred below as o) or N-InGa (referred later as n) chains where these ON and N are the nearest possible positions to VGa neighbors. Hence, the two geometries as referred as a-o- and a-n-VGaONInGa were considered for zb-crystal. And four geometry configurations referred as a-o-, a-n-, b-o-, and b-n-VGaONInGa were analyzed for w-GaN. In this work, the formation enthalpy of InGaN was calculated and the binding energy, Ebind, defined as a difference in the total energies of compounds that contain VGaONInGa or (VGaON and InGa) were taken into consideration.

Formation energy Eform of a defect was calculated by formula taken from Ref. [45]

$$ {\displaystyle \begin{array}{l}{E}_{form}={E}_{tot}\left( GaN:D\right)-{E}_{tot}\left(\mathrm{GaN}\right)+\left(-\right)\sum {n}_i{\mu}_i+\\ {}+q\left({\varepsilon}_{\mathrm{F}}+{E}_{\mathrm{VBM}}\right)+{E}_{\mathrm{correct}}\end{array}} $$
(1)

The first two terms on the right-hand side are the total energies of the supercell with and without the complex, respectively. ni is number with the +(−) sign corresponding to the removal (addition) of atoms. EVBM is the energy of the VBM of bulk GaN, and εF is the Fermi energy referenced to this EVBM. The energy EVBM is determined from the total energy difference between the pure crystal with and without a hole at the VBM in the dilute limit by algorithm from Ref. [45]. μi are the variable chemical potentials of atoms in the solid, which in general are different from the chemical potentials μi(bulk) of the ground state of elements (Ga bulk, In bulk, and N2, O2). Chemical potentials of the components in the standard phase are given by total energies per atom of the elemental solids: μ(Ga bulk) = Etot(Ga bulk), μ(In bulk) = Etot(In bulk), while μ(N bulk) = Etot(N2)/2 and μ(O bulk) = Etot(O2)/2 (ΔHf(NO) was neglected. In N-rich condition, μ(Ga) = Etot (Ga bulk) + ΔHf(GaN) and μ(In) = Etot (In bulk) + ΔHf(InN) are taken, where ΔHf is the enthalpy of formation per formula unit, and it is negative for stable compounds. ΔHf at T = 0 K is obtained by considering the reaction to form or decompose a crystalline GaN and InN from its components and dependent on an cohesive energy, Ecoh, of Ga, In, N, and O. The obtained results for Ecoh of Ga, N, and O were shown in Refs. [30, 57]. Calculated Ecoh (In) and ΔHf(zb-GaN), ΔHf(InN) are 2.56 (2.5 [58]) and − 1.24 (−1.27), −0.36 (−0.32) eV [59]), (experimental values presented in brackets).

The last term, Ecorrect, includes two corrections. The first one, ΔEPA, is the potential alignment correction of the VBM. The VBM in the ideal supercell and in the supercell with a (charged) defect differs by the electrostatic potential and is obtained by comparing the potential at two reference points far from the defect in the respective supercells with (P[Dq]) and without (P[0]) the defect, ΔEPA = q(P[Dq] − P[0]). Second correction is an image charge correction as expressed by 2-order Makov-Payne form: \( {E}_{\mathrm{M}\mathrm{P}}=\frac{q^2{\alpha}_{\mathrm{M}}}{2{\varepsilon}_d{W}^{1/3}} \), where αM is the lattice-dependent Madelung constant, which for hexagonal structure is 3.5, W is the supercell volume, and ε is the static dielectric constant. EMP was calculated to be 0.2, 0.4 eV for charged defects (q = − 1, − 2). Results of calculations are presented in Sect. 2.2.

2 Results

This section summarizes the obtained results for the defect structure and formation energy and discusses magnetic interaction between defects.

2.1 Electronic Structure and Spin Polarization of V GaON

The defect states of VGaON stem from the result of the interaction between the vacancy orbitals and the O-impurity states. Local atomic configuration of this defect has the C3v point symmetry. In both the zb- and the w-structures, the vacancy is tetrahedrally surrounded by three N and one O atoms, and the respective defect states are localized on the resultant broken sp3 bonds (Fig. 2) that split into a singlet ag and a higher in energy quasitriplet “t2”. Energies of ag and “t2”, calculated below as relative to the VBM, depend on the crystal structure, geometry of defect and the charge state. ag is a resonance state with the valence bands.“t2”-VGaON is located in the band gap and splits into a doublet e2 and a singlet a1 with a splitting energy of about 0.2, 0.5, and 0.7 eV for the zb-GaN, a- and b- geometries of VGaON in w-crystals, respectively (see Fig. 3, the green lines). The energy splitting contains the contributions of a weak perturbation by the w-symmetry in w-GaN and the U-induced so-called quasi-Jahn-Teller (JT) effect [30].

Fig. 2
figure 2

aj Calculated atomic configurations and isosurfaces of spin density corresponding to 0.003 electron/bohr3 of VGaON and VGaONInGa in various configurations. k, l Calculated isosurfaces of the electron density of a-n-VGaONInGa.

Fig. 3
figure 3

Electronic structure of the spin-polarized and charged VGaON and VGaONInGa in a zb-, and b, c w-GaN. b, c: left panels, VGaON; right panels, VGaONInGa. Zero energy corresponds to the VBM. Green dots denote electrons without spin polarization. Holes are shown as empty green dots. The spins of electrons are indicated by arrows for spin-polarized calculations. b, c For simplicity, the states which are resonances with the valence bands are not shown. ag, that is localized deeply in the valence band, is neither presented

In the case of non-vanishing spin polarization, the exchange coupling splits e2 into spin-up e2↑ and spin-down e2↓ states by the splitting exchange energy defined as Δεex = ε(e2↓) − ε(e2↑), where ε is the energy of the defect level, and a1 into a1↑ and a1↓ (Fig. 3, the blue lines). The Δεex, in general, depends on the symmetry of defect, the charge state and U. The e2↓ and a1↓ of neutral VGaON in zb-GaN are localized in the band gap at 2.6 and 1.9 eV above the VBM, respectively. The e2↑ and a1↑ are resonances with the VBM (Fig. 3a). According to this point of view VGaON is a deep acceptor containing two holes.

As presented above in Section 2.3, in w-crystal, the defect can exists in two different geometries tagged as a- and b-VGaON. According to GGA+U calculations, single-electron level representations of electronic structures are different for a- and b-VGaON (Fig. 3 b, c, left panels). Structure of a-VGaON in w-GaN is similar to the one of zb-GaN, e2↓ and a1↓ are 2.45 and 1.65 eV with the respect to the VBM, and e2↑ and a1↑ are hybridized with the valence bands (Fig. 3b). Introducing O atom into basal plane of defect leads to strong symmetry perturbation, e2↓ is split by 0.5 eV into two a2↓(1) and a2↓(2) singlet states. Thus, “t2↓” in this case is a composite band containing a1↓, a2↓(1), and a2↓(2) levels located about 1.4, 2.3, and 2.8 eV above the VBM, respectively (Fig. 3c).

The energies of VGaON levels strongly depend on the charge state q. Single-electron energy levels of VGaONq for q = 0, − 1, and − 2 with their respective charge states are shown in Fig. 3. The physics behind the calculated electronic structure of charged defects is determined by the following counteracting effects [30]: (i) the intracenter Coulomb repulsion is dominant in the non-spin-polarized calculations. Without spin polarization, the energy of e2, a1 increases by ~ 0.5–0.6 eV with the q changing from 0 to − 2 (the levels are shown in green color in Fig. 3); (ii) The effect of the value exchange splitting, for example, in zb-GaN with q changing from 0 to − 2, Δεex decreases from 2.6 to 0 eV; (iii) the U-induced potential which is attractive (repulsive) for occupied (unoccupied) orbitals [43]. This effect is clearly seen for e2↓ that decreases with q changing from 0 to − 1 (Figs.3 a, b). These results are in agreement with HyF calculations from Ref. [17] where negative-Ueff behavior of VGaON was observed.

t2” defect state is occupied by 4, 5, and 6 electrons for q = 0, − 1, and − 2, respectively. As shown in Figs. 2, 3 unpaired spins of the electrons localized on the dangling bond states lead to the local magnetic moment of VGaONq. Unlike VGaON−2, which is a closed-shell system, both VGaON and VGaON−1 are spin polarized. The energy gain ΔEPM−FM due to spin polarization, defined as the difference in total energy of the spin-nonpolarized (PM) and spin-polarized (FM) calculations, is shown in Table 1. Generally, ΔEPM−FM assumes the maximal value when “t2” is occupied with 4 electrons with the spin S = 1, and it vanishes when “t2” is fully occupied. Moreover, the energy of antiferromagnetic state (AFM) of single defect was considered also in the analysis [23].

Table 1 Spin polarization energy, ΔEPM−FM (in eV) and total local magnetic moment (in μB) of charged VGaON (a-, b-configurations) and VGaONInGa (a-o-, a-n-, b-o-, and b-n-configurations) in zb- and w-GaN

Every considered geometry of the neutral VGaON is the magnetic centrum in HS state with the local magnetic moment μtot of 2 μB. For example, ΔEPM−FM(VGaON0) are 1.7, 1.62, and 1.86 eV for defects in zb-GaN, and a- and b-geometry in w-GaN, respectively (Table 1). VGaON−1 is the paramagnetic centrum with μtot = 1 μB. ΔEPM−FM(VGaON−1) are 0.38 and 0.3, 0.4 eV for defects in zb-GaN, and a- and b-geometry in w-GaN, respectively (Table 1). Finally, VGaON−2 is the non-spin-polarized centrum (in this case ΔEPM−FM = 0). According to our calculations, b-configuration stabilizes the HS state in neutral VGaON by about 0.24 eV in comparison with a-geometry. This value is close to the energy gain of formation energies in b-VGaON and a-VGaON (see Sect. 2.2).

The geometry of the defect affects also the localization of the VGaON states. The effect is displayed in the plots of the density of spin polarization, Fig. 2a,e–f. Figure 2 indicates that the VGaON states are dominated in all cases by the localized and spin-polarized contribution of the three sp3 orbitals of the N nearest neighbors because O-atom is more electronegative than N-atom and two electrons with the opposite spins are located on sp3 oxygen orbital. In contrast to GGA method in which electrons that occupy for example, “t2↓” are spread over four p orbitals of the nearest neighbors [31, 60], GGA+U calculations showed that the partial occupancy is avoided [31, 60]. Moreover, in the case of b-VGaON, one can observe the anisotropy for three sp3 of N orbitals (Fig. 2d, f). The U-induced symmetry breaking of e2 level, i.e., the quasi-Jahn-Teller effect, was observed in b-VGaON. In a-VGaON contributions of the three N neighbors to the VGa states of the vacancy, wave function are almost equal, whereas for b-VGaON the wave function is dominated by the two basal N ions located in the (x,y) plane, and the contribution of the remaining N ion is strongly reduced, see Fig. 2d–f.

2.2 Formation Energy and Transition Levels

The calculated Eform of VGaON and assumed εF at the VBM are given in Table 2. Eform in all configurations is the same. The same trend was observed also in Ref. [32]. The obtained values 1.64, 3.54, and 5.73 eV in w-GaN are close to results of HSE (1.9, --, and 5.3 eV [17]) and HyF (B97-2- functional) (1.5, 4.0, and 6.2 eV) [32]. Our calculations demonstrate that Eform is similar in all geometries.

Table 2 The calculated Eform of VGaON assuming εF at the VBM (N-rich condition)

The change in the defect charge state is determined by the transition level ε(q1/q2), defined as the Fermi energy relative to the VBM at which formation energies of the q1 and q2 charge states are equal. We find ε(0/−) are 1.84 and 1.9, 2.1 eV for defects in zb-GaN, and a-, b-geometry in w-GaN, respectively, and ε(−/−2) are 2.1 and 2.2, 2.4 eV for defects in zb-GaN, and a-, b-geometry in w-GaN, respectively, which is consistent with VGaON energies shown in Fig. 3. Comparison of the calculated energies with the results for other exchange functionals is shown in Table 3. Table 3 contains dataset for only a-VGaON. Comparable values of ε(0/−) and ε(−/−2) were obtained with GGA+U and different HyF exchange-correlation functionals. For example, our results are close to the obtained by HSE06 approach (with 20% exact exchange) [17, 18].

Table 3 a-VGaON-calculated transition levels (in eV) in w-GaN

2.3 Spin Polarization of V GaONInGa

In Sect. 1.3 the geometrical configurations of VGaONInGa were discussed. Although our calculations show that binding energy in such a complex is low, ~ 0.1–0.3 eV, the formation energy is 1.9 eV which is a little higher than in the case of VGaON and considerably lower than in the case of VGa [30, 34]. Because the formation energy for different geometries (a- or b-) is similar, both VGaON and VGaONInGa can exist in non-equivalent atomic configurations.

In this section, the results for calculated energy of spin polarization, local magnetic moment, spin density, and density of charge of VGaONInGa are presented. Moreover, the effect of addition of In impurity on the spin-polarized properties is analyzed by comparing these results with similar results for VGaON. Next, in order to get a clearer picture of the influence of In on electronic structure, the complex VGaONnInGa, where n = 2, 3, and 4, is investigated in zb-GaN.

The defect states of VGaONInGa stem from the result of the interaction between the vacancy orbitals and the O- and In- impurity states.

According to GGA+U calculations, in zb-GaN, the electronic structure of VGaONInGa is similar to VGaON. There is only a difference in the defect energy levels of about 0.1–0.2 eV. With the increasing number of In content from 1 to 4, the level of e2 increases no more than 0.5 eV. It demonstrates the stability of defect symmetry in zb-structure.

Strong effect on the electron structure was observed for wurtzite crystal (see Fig. 3b, c, right panels). As with O-atom in basal plane, also in this case for both a- and b-VGaONInGa, “t2” is split into three singlet states a1↓, a2↓(1), and a2↓(2) due to strong tetragonal perturbation generated by In atom in the crystal structure. a2↓(2) of b-n-VGaONInGa is higher in energy, and it is a resonance state with the conduction bands (Fig. 3c).

Calculated ΔEPM−FM values for different configurations of VGaONInGa are given in Table 1. According to our calculations, the inclusion of InGa stabilizes HS state of the defect by 0.1–0.16 eV in comparison to VGaON (see Table 1). For example, in zb-GaN, the differences in the spin polarization energies of VGaON and VGaONInGa are 0.08 and 0.14 eV, for q = 0 and − 1, respectively. The same energy gain takes place in w-structure, for example, the differences between ΔEPM−FM (b-n-VGaONInGa) and (b-VGaON) are 0.16 and 0.08 eV, in cases q = 0 and − 1, respectively. Generally, the increase of ΔEPM−FM is in agreement with the changes of electron structure. Shifting up the single-electron levels (a2↓(2) in particular) to the CBM leads to the increase in the energy of exchange splitting, and therefore in the energy of ΔEPM−FM. The above results obtained for VGaONInGa are typical: the stability of the HS state predicted for VGaONInGa is 10–12% higher than that predicted for VGaON.

The increase in discrepancy of ΔEPM−FM was observed with the rising of In content. ΔEPM−FM is 1.7, 1.78, 1.88, 1.9, and 1.8 for n = 0, 1, 2, 3, and 4. For n = 4, ΔEPM−FM is smaller than for n = 2 and n = 3.

The spin (Fig. 2b, c, h-j) and electron (Fig. 2k, l) contour densities of VGaONInGa are shown in Fig. 2. Like in the case of VGaON, VGaONInGa states are localized mainly on the p orbitals of the three N atoms (Figs. 2 b, c, h–j). Spin density of VGaONInGa is more delocalized, since they comprise long-range tails that involve p orbitals of distant N ions or even p orbital of oxygen (refer to VGaON2InGa, see Fig. 2c). These orbitals constitute the VBM (Fig. 4) of GaN. VGaONInGa-spin-up states are resonances degenerate with the valence bands, i.e., both a1↑ and e2↑ hybridize with the upper part of the VBM, which forces also a partial delocalization of their wave functions. It is evident from Fig. 2 that enhancing correlation effects by addition of In atom leads to the decrease of the localization of the spin density on the broken bonds and to the increase of its axial anisotropy.

Fig. 4
figure 4

a Spin-resolved DOS of VGaONInGa. The contribution of: b 2p(N) orbitals of the nearest vacancy N neighbors; c 2p(N) orbitals of N distant atoms; d 2p(O) orbitals of the nearest vacancy O neighbors; e the contribution of 3d(Zn) orbitals; f the contribution of 3d(In) orbitals. Negative values denote the spin down channel. Contribution to the defect states from other orbitals is negligible

The contour (Fig. 2k, l) is plotted in the (100) plane and shows that a large contribution to the electron density comes from the nitrogen atoms and strong ionic bonds resulting from sp3 hybridization. The spherical symmetry around anions is observed, which indicates that the bonds in GaN:VGaONInGa are dominated by the ionic component.

By calculating the contributions of individual atoms projected onto relevant atomic orbitals to the total DOS (Fig. 4a), one finds that the main contribution comes from the defects states p(N) of the N nearest neighbors of VGa (Fig. 4b)—in agreement with Fig. 2. Both p(N) and p(O) orbitals also build the VBM of GaN (see Fig. 4b–d). The contribution of the d(In) orbitals to the spin density is non-negligible due to the substantial contribution of d(In) to the VBM and defect states (see Figs. 2 and 4f).

2.4 Magnetic Interaction of V GaON -V GaON and V GaONInGa -V GaONInGa

In the present section, we study VGaON-VGaON and VGaONInGa-VGaONInGa defect pairs and analyze the impact of crystal distortion on their properties by comparing the results of magnetic interaction calculations. The magnetic coupling between vacancy complexes is discussed as the possible origin of the experimentally observed FM in GaN. Electronic structure of a defect pair is determined by three factors: (i) the distance between vacancy complex, (ii) the relative orientations of complexes with respect to each other and to the crystal axes, and (iii) the charge state. VGaON-VGaON and VGaONInGa-VGaONInGa configurations were considered, in which the defects are the third nearest neighbors (3NNs) and fourth nearest neighbors (4NNs) with respective spatial separation of about ~ 5.2 and ~ 6.5 Å (it is a distance between VGa in the relaxed structure). In w-GaN, the defects can be located either in the same (x,y) basal plane perpendicular to the c-axis, which is referred to as the xy-case, or they can be oriented along the c-axis, which is denoted here as the c-case. Finally, we mention that the defect pair in such configurations has eight nearest neighbor atoms (two O and six N atoms). Because the goal of work was to analyze the FM in GaN, we do not consider here 1NNs configurations with the seven nearest neighbor atoms.

When the complex is spin polarized, the orientation of the two spins can be ferromagnetic (FM), ferrimagnetic (FiM, when spins of the two complexes are different because the defects are in different charge states), and antiferromagnetic (AFM). In the latter case, the total spin vanishes but the spin polarization energy is finite. Energy of magnetization ΔEAFM(FiM)-FM is defined as a difference between the total energies of AFM (FiM) and FM states and is positive when FM coupling is stable. In summary, two and four configurations were considered for VGaON-VGaON and VGaONInGa-VGaONInGa in zb-GaN, respectively, and four and eight geometries were considered for VGaON-VGaON and VGaONInGa-VGaONInGa both in w-GaN, respectively. ΔEAFM(FiM)-FM are summarized in Table 4. In Table 4, we only briefly highlight the results.

Table 4 Energy of magnetic coupling ΔEAFM(FiM)-FM together with total magnetic moment (in μB) of the complex in the charge state q (it is a sum q1 and q2, where) obtained for zb- and w-GaN calculations. For simplicity, both ΔEAFM−FM and ΔEFiM-FM are denoted by ΔEAFM−FM and the actual spin configurations and values of magnetic moment are given in the columns “μ

zb-GaN:

  1. (i)

    VGaON-VGaON are spin-polarized and the coupling between defect spins is FM in both charge states. Magnetic moment is 4 and 2 μB, for q = 0 and − 2, respectively. The observed FM is weak with ΔEAFM−FM energy of about 0.0045 and 0.001 eV, for q = 0 and − 2, respectively (for 4NNs pair). The obtained values are a little larger than those obtained by HSE06 approach in Ref. [26] due to shorter spatial separation between defects in our work.

  2. (ii)

    The inclusion of In impurity modifies the coupling. The absolute values of the coupling strength are few times higher than they are for 4NNs VGaON and amount to 0.01–0.014 and 0.006–0.008 eV, for q = 0 and − 2, respectively.

w-GaN:

  1. (i)

    The dependence on geometry configuration was observed. For example, in xy- basal plane, the ground state of (VGaON-VGaON) 0 is FM with ΔEAFM−FM of about 0.01, 0.006 eV (for 3NNs and 4NNs) and 0.09, 0.005 eV (for 3NNs and 4NNs) in a- and b-VGaON geometry, respectively.

  2. (ii)

    Unlike zb-crystal, in wurtzite, the dependence of the coupling on the orientation in crystal of the pairs is rather strong: the total energy differences between the xy- and c-orientations are larger than the corresponding values of ΔEAFM−FM. When defects are oriented along the c-axis, the magnetic interaction is AFM.

  3. (iii)

    Similar to the results for zb-crystal, magnetic coupling of VGaONInGa-VGaONInGa is larger than of VGaON-VGaON. Generally, for all configurations, In doping facilitates the stability of FM phase in GaN by order of magnitude (Table 4).

The dominant mechanism of magnetic interaction between VGaON is determined by the interplay between the counteraction of the bonding-antibonding (BA) and the exchange of spin-up–spin-down (Δeex) splittings.

Figure 5 shows spin densities calculated for several configurations of VGaON-VGaON and VGaONInGa-VGaONInGa. They reflect the shape and localization of the partially occupied defect states of the complexes. Generally, these states are localized on the p orbitals of the six N atoms. In most cases, spin density of a given defect in w-structure is like in Fig. 5 where two directions, orthogonal (xy) and parallel to the c-axis, are presented. In the FM cases, they are close to the sum of spin densities of VGaON shown in Fig. 2. Spin densities in b-VGaON and VGaONInGa are more delocalized, since they are comprised of long-range tails which involve p orbitals of distant N ions (Fig. 5). Moreover, N neighbors of the complex are not equivalent, as displayed by the dissimilar contributions to the spin density. Indeed, the contribution of the axial N (or O) ions is almost vanishing (Fig. 5 a, c, e, g). Non-negligible spin density of In orbital demonstrates the important contribution of In atom into magnetic interaction between defects.

Fig. 5
figure 5

Calculated atomic configurations and isosurfaces of spin density corresponding to 0.003 electron/bohr3 of 3NNs neutral VGaON and VGaONInGa in various geometry configurations. Blue and red color in a, e, f correspond to different spin orientations. For simplicity, VGaON and VGaONInGa are refer as VO and VOIn, respectively

2.5 Crystal Structure zb- and w-GaN and Relaxation

All above results are demonstrated for atomic relaxed structures. The increase of FM stability when In content grows can be explained by the distortion effects in crystal structure due to the atomic displacement in the process of relaxation. As it can be seen in Figs. 2 and 5, significant and complex perturbations in the crystal structure of GaN are experienced when vacancy is introduced and it can be attributed to the fact that the radius of In is larger than the one for Ga and the radius for N is larger than the one for O. The interatomic distances between the neighbors of a complex defect are mainly determined by the lattice constants of the host crystal (but here, for low In content, it was neglected), and also by the atomic relaxations, i.e., displacements of the neighbors. In the studied compounds, the outward relaxation of the nearest neighbors elongates bonds by about 5–12%, i.e., 0.2 Å, and reduces the total energy by the relaxation energy ΔErelax of 0.63, 0.86, 0.93, 0.98, and 0.99 for VGaONInGa, VGaONInGa, VGaON2InGa, VGaON3InGa, and VGaON4InGa, respectively. It can be noted that the structural relaxation in GaN:VGaONInGa is about 0.23–0.33 eV larger than in the case of GaN:VGaONInGa. From the results in Fig. 6, it follows that distortion (change in bond length) for the VGaONInGa is larger than that for the VGaON.

Fig. 6
figure 6

The bond lengths of Ga-N and In-N for aVGaON, bVGaONInGa in w-GaN. Initial bond lengths were equal to the length of Ga-N bond, i.e., 1.944 Å

But we note that structural distortions are more complex. Although, the displacements of the second and third neighbors are an order of magnitude smaller, the effect of atomic relaxations around defects, involving not only the nearest but also more distant neighbors, cannot be neglected. The states of the defect complexes are determined by the overlap of the N and O dangling bonds given by the N-N (N-O) distances. In ideal structure (after relaxation without defect), N-N is equal to 3.18 Å. In VGaON, the N-N and N-O dangling bonds are 3.55 and 3.48 Å, respectively. But in VGaONInGa, these values are shorter; three N-N are 3. 58, 3.52, and 3.48 Å, respectively, and N-O is 3.42 Å. It implies that the defect states are more localized, and the energy of spin polarization of such defects is higher.

3 Summary and Conclusions

In summary, spin states of VGaON and VGaONInGa complexes in both zb- and w-GaN, and magnetic coupling between them, were studied within GGA+U calculations. The U(Ga) =3 eV and U(N) = 5 eV terms were imposed on d(Ga) and p(N) leading to the correct band gap of GaN.

Charge states q from 0 to − 2 of VGaON were considered. In both crystal structures for neutral VGaON with S = 1, high-spin configuration is stable. Wave functions of VGaON have a multi-orbital character, being composed of three p(N) and one p(O) orbitals of vacancy neighbors. But the main contribution to the spin density comes from sp3 N orbitals.

Two different electronic structures, which arise due to two different geometry configurations of VGaON, with ON either along the c-axis and in one of three equivalent tetrahedral positions in w-GaN, were analyzed. The latter geometry configuration assumes stronger stability of HS state and more delocalization of defect state.

Introducing InGa as second neighbor to VGa on the one hand imposes changes to the electronic structure, on the other gives rise to the delocalized wave function of the defect as the crystal structure is perturbed, and finally contributes to long-tail spin density distribution. Magnetic moments originate mainly from sp3 N orbitals, and the contribution of p orbitals of distant N, d(Ga), and d(In) states is about 20%.

Various relative orientations of the defects and several charge states (q = 0 and q = − 2) were considered, and consequences regarding the observed FM in GaN were pointed out. Using a relation predicted from mean field model, Tc = 2zS(S + 1)J/3kB, the room temperature of FM implies that (assuming z = 6 neighbors and S = 1) the coupling constant J(VGaONInGa) = 0.01 and J(VGaON) = 0.0045 eV, i.e., 920 K and 415 K, respectively. These values have a limited reliability as the distribution of defects is random and the coupling depends on the distance between defects.

Comparing the obtained results with experiments, we note that, according to the results, the observed collective ferromagnetism in GaN systems [7,8,9,10,11] can originate from magnetic interaction between VGaON defects. And in Ga-rich InGaN alloys, we predict even stronger FM.