Introduction

At room temperature, GaN has a direct band gap of 3.42 eV [1] and an exciton binding energy of 25 meV [2]. GaN has unipolar structure with high electron mobility [3,4,5]. GaN is a third-generation semiconductor after silicon and indium phosphide [6]. GaN has a wide range of application potential and good market prospects in high-brightness blue, green, purple, and white light diodes, blue and purple lasers, and antiradiation, high-temperature, and high-power microwave devices [7,8,9].

The effects of Be/Mg/Ca doping and point vacancies on the physical properties of GaN have been widely investigated theoretically and experimentally. Gao et al. [10] used the first principles to study the effects of N vacancy doping with different valence states on the physical properties of GaN. The results show that the doped system is relatively stable when the N vacancies are 0, + 1, and + 3 valence states. Gao et al. [11] utilized the first principles to study the physical properties of GaN containing point vacancies defects. The results show that the presence of N vacancies results in the GaN system to be semimetallized with the lowest formation energy, and Ga vacancies causes the GaN system to form a structure with higher formation energy. Djermouni et al. [12] calculated the exchange coupling effect of Mn-doped and Mn–Mg-codoped GaN and the valence state of Mn by using density functional calculations. The results show that Mn is + 3 valence in the absence of Mg atoms. When the number of Mg atoms is 1 or 2, the valence of Mn is + 4 or + 5 valences, respectively. The doped system experiences ferromagnetic exchange coupling, resulting in a decrease in the density of states at the Fermi level. Xu et al. [13] used a plane wave ultrasoft pseudopotential method based on density functional theory (DFT), combined with generalized gradient approximation plane wave ultrasoft pseudopotential + U (GGA + U) to calculate the electronic structure, energy, and optical properties of undoped wurtzite InN supercell and three different ordered occupancy Mn2+- and Mn3+-doped InN. Studies have shown that the total energy and formation energy of the system decrease after doping, and the stability increases. The doping of Mn elements with different valences has different effects on the electronic structure, magnetic, and optical properties of the system. Jia et al. [14] used DFT first-principle methods combined with hybrid functional theory (HSE06) to calculate the electronic structure and effective mass of Mg-doped GaN and Mg–Fe-codoped GaN systems. They analyzed the stability of the system from the perspective of phonon dispersion. The results show that the introduction of Fe improves the characteristics and stability of the GaN:Mg system. The effective mass difference of the GaN:Mg:Fe system in different directions is less than the GaN:Mg system, indicating that the anisotropy of the system is reduced by doping Fe. Maskar et al. [15] used DFT and semiclassical Boltzmann transport equations to calculate the influence of rare earth elements (RE = Pm, Sm, and Eu) on the structure of gallium nitride wurtzite. The result shows that all doped compounds become semimetal ferromagnets, and the electron spin polarization rate at the Fermi level is 100%.

Wolos et al. [16] used electron paramagnetic resonance spectroscopy to study the optical and magnetic properties of Mn-doped GaN systems. The results show that the valence state of Mn ions in GaN depends on the Fermi level position. For example, in n-type samples, Mn ions are + 2 valence, and the magnetic strength of the Mn-doped GaN system depends on the Fermi level position. Arifin et al. [17] studied the physical properties of Mg-doped GaN by using plasma-assisted metal organic chemical vapor deposition (MOCVD). The results show that an increase in the concentration of Mg ions reduces the availability of Ga vacancies. Hwang et al. [18] used photoemission spectroscopy and X-ray absorption spectroscopy to study the electronic structure of Cr- and Mn-doped GaN systems. The results show that the valence states of Cr ions and Mn ions are + 3 valence and + 2 valence in the tetrahedral crystal field, respectively. The different valence states of Cr ions have different effects on the electronic structure of the GaN system. Narita et al. [19] used ultrahigh pressure annealing to study the diffusion process of Mg in GaN. The results show that the interstitial H promotes the diffusion process of Mg. Chen et al. [20] used in situ synchrotron radiation X-ray absorption and diffraction to study the valence state and phase transition of Fe-based electrocatalyst in the oxidation reduction process in alkaline media. The results show that the local structure and valence state transition potential of Fe atoms contributes the most to the oxidation reduction reaction of Fe-based electrocatalysts.

The effects of Be/Mg/Ca doping and point defects on the physical properties of GaN have been investigated experimentally and theoretically. However, these studies ignored the influence of interstitial H and different valence states of VGa/VN on the physical properties of GaN. In accordance with the report in the literature [10, 21], different valence states of VGa/VN have different effects on the physical properties of the doped system [10, 21]. In accordance with reports in the experimental literature [22, 23], the interstitial H affects the physical properties of the doping system in the research of MOCVD and vacuum coating [22, 23]. In the literature [24], the influence of Be/Mg/Ca, interstitial H, and Ga vacancy codoping on the photocatalytic performance of GaN system is considered. However, the effect of the different valence states of VN point vacancy and VGa vacancy on the performance of the doped system is ignored [24]. A comprehensive and in-depth systematic research is needed. This study explored the influence of interstitial H and different valence states of VGa/VN on the photocatalytic performance of the doped systems. Point vacancies and valence states are difficult to control accurately in experiments. However, the first principles have certain advantages. Accordingly, the effects of Be/Mg/Ca and different valence states of VGa/VN and interstitial H codoping on the photocatalytic performance of GaN systems were investigated via GGA + U method within the DFT framework. Analyses of the effects of visible light, carrier activity, carrier lifetime, and oxidation reduction reactions reveal that the Ga34CaHiN36(VGa3−) system has excellent photocatalytic performance. This system has a certain reference value for preparing novel GaN photocatalysts.

Model and method

GaN is a hexagonal wurtzite structure that belongs to the \(P6_{3}\) mc space group. The symmetry of GaN is \(C_{6v}^{4}\). An undoped Ga36N36 (3 × 3 × 2) supercell model was constructed, as shown in Fig. 1a. Ga34MHiN36(M = Be/Mg/Ca) or Ga35MHiN35(M = Be/Mg/Ca) models were constructed, where M (M = Be/Mg/Ca) is located at (0.556, 0.778, 0.750) to replace a Ga atom and coexists with a fixed Ga vacancy (0.544, 0.571, 0.600) or a fixed N vacancy (0.455, 0.562, 0.852). The interstitial H is located at (0.554, 0.568, 0.520), as shown in Fig. 1b. Two interstitial H (0.641, 0.453, 0.513) and (0.603, 0.271, 0.246) were added relative to Ga vacancies or N vacancies from near to far, and 1, 2, and 3 were used to represent the interstitial H positions, as shown in Fig. 1c. This process was performed to study the influence of the interstitial H at different positions on the difficulty of system doping of the doped systems. According to the literature [24, 25], the selection of the position of the point defects and the position of the doped element in this article is random and reasonable. All the system structures are stable after calculation and verification. Geometric optimizations and electronic structure calculations were performed on these models, and the results were analyzed and discussed.

Figure 1
figure 1

Theoretical models: (a) Ga36N36, (b) Ga34MHiN36(M = Be/Mg/Ca) and Ga35MHiN35(M = Be/Mg/Ca), and (c) Ga34MHi2N36(M = Be/Mg/Ca) or Ga34MHi3N36(M = Be/Mg/Ca) and Ga35MHi2N35(M = Be/Mg/Ca) or Ga35MHi3N35(M = Be/Mg/Ca). Brown represents Ga, blue denotes N, black represents VN or VGa, and green indicates M (M = Be/Mg/Ca). White signifies interstitial H, which is designated by numbers 1, 2, and 3

In this study, the method of plane wave ultrasoft pseudopotential GGA + U under the DFT framework [26, 27] was used for calculation on the CASTEP module of Materials Studio software [28, 29]. The electrons were subjected to spin polarization, and the pseudopotentials were described with Perdew–Burke–Ernzerhof [26] function. The valence state of the cation Ga vacancy was set to 0/ − 1/ − 2/ − 3 valences, and the valence state of the anion N vacancy was set to 0/ + 1/ + 3 valences [10]. The valence electron configurations of each atom were Ga–3d104s24p1, Be–2s2, Mg–2p63s2, Ca–3s23p64s2, H–1s2, and N–2s22p3. The cutoff energy radius was set to 330 eV during geometric optimization. The self-consistent field was set to 5.0 × 10−6 eV/atom in estimating the convergence accuracy of energy. The force acting on each atom was set to < 0.1 eV/nm, the internal stress was set to < 0.02 GPa, and the tolerance deviation was to 5 × 10−5 nm. The Monkhorst–Pack method was used to select the k-point in the Brillouin area as 3 × 3 × 2. Errors are found in the calculation using the traditional GGA method. This condition increases the bandwidth of the valence band and narrows the band gap. The U values of N-2p and Ga-3d are 6 and 0 eV, respectively. The U values of M (M = Be/Mg/Ca) atoms and H atom and the software default value of 0 were adopted.

Results and discussion

Structure and doping and stability

The lattice constants of unit cells after conversion, volume, formation energy, and binding energy of the Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga), and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems were calculated. The results are summarized in Table 1. The lattice parameters of the Ga36N36 system are a = b = 0.3227 nm and c = 0.5258 nm, which is consistent with the experimental values of a = b = 0.3189 nm and c = 0.5186 nm [30].

Table 1 Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) unit cell lattice constants, volumes, formation energy, binding energy after conversion, and total magnetic moment

As shown in Table 1, the volumes of Ga34MHiN36 (VGa3–/VGa2–/VGa1–/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) are larger than the volume of the Ga36N36 system. The ion radius of Mg/Ca (0.072 nm/0.099 nm) [31, 32] is larger than that of Ga (0.062 nm) [33], and the radius of Be (0.045 nm) [31] is smaller than that of Ga (0.062 nm). Repulsive forces are found between Ga vacancy and surrounding N, between N vacancy and surrounding Ga, between N vacancy and H, and between N vacancy and Be/Mg/Ca. Attractive effects are observed between H and N, between Ga vacancy and H, between Ga vacancy and Be/Mg/Ca, and between N vacancy and surrounding N, and between H and N. Considering the influence of the radius effect and the Coulomb force, the volume of the doped systems is larger than that of the Ga36N36 system.

Formation energy is a key physical quantity used to study and analyze the difficulty of doping systems. The binding energy refers to the energy released by the free particles bound to the crystal or the energy required to decompose the crystal into free particles and is an important indicator of the stability of the doped system. The formation energy can be calculated by using Eqs. (1 and 2) [34], and the binding energy is calculated by using Eqs. (3 and 4) [35, 36].

$$ E_{f} (M - V_{Ga} - H_{i} ) = E_{{GaN:M + V_{Ga} + H_{i} }} - E_{GaN} - \mu_{M} - \mu_{{H_{i} }} + 2\mu_{Ga} { + }\;q\left( {E_{F} + E_{VBM} } \right) $$
(1)
$$ E_{f} (M - V_{N} - H_{i} ) = E_{{GaN:M + V_{Ga} + H_{i} }} - E_{GaN} - \mu_{M} - \mu_{{H_{i} }} + \mu_{Ga} { + }\mu_{N} { + }\;q\left( {E_{F} + E_{VBM} } \right) $$
(2)
$$ E_{{{\text{bind}}}} (M - V_{Ga} - H_{i} ) = E_{f} (M - V_{Ga} - H_{i} ) - E_{f} (M) + E_{f} (2V_{Ga} ) - E_{f} (H_{i} ) $$
(3)
$$ E_{{{\text{bind}}}} (M - V_{N} - H_{i} ) = E_{f} (M - V_{N} - H_{i} ) - E_{f} (M) + E_{f} (V_{Ga} ){ + }E_{f} (V_{N} ) - E_{f} (H_{i} ) $$
(4)

where \(E_{f} (M - V_{Ga} - H_{i} )\) represents the total energy of interstitial H, Ga vacancy, and Be/Mg/Ca coexisting in Ga36N36; \(E_{f} (M - V_{N} - H_{i} )\) represents the total energy of interstitial H, N vacancy, and Be/Mg/Ca coexisting in Ga36N36; \(E_{GaN}\) is the total energy of an undoped GaN supercell equal to the doped system. \(\mu_{M}\) and \(\mu_{Ga}\) are the chemical potentials of Be/Mg/Ca and Ga, respectively, which are replaced by the energy of each atom of the most stable (ground state) metal phase; \(\mu_{{H_{i} }}\) is the chemical potential of the H atom, which is replaced by the energy of the H atom. \(E_{F}\) and \(E_{VBM}\) represent the Fermi level and the valence band maximum of the doped GaN system, respectively; q represents the valence state of the doped system. Under thermal equilibrium conditions, GaN exists as \(E_{{_{{G{\text{a}}N}} }} = \mu_{{G{\text{a}}}} { + }\mu_{N}\); in N-rich and Ga-rich cases, there are \(\mu_{N} = \frac{1}{2}\mu_{{N_{2} }}\), and \(\mu_{Ga} = \mu_{Ga} (bulk)\), secondly, there are \(\mu_{Ga} = E_{GaN} - \mu_{N}\), and \(\mu_{N} = E_{{G{\text{aN}}}} (bulk) - E_{{G{\text{a}}}} (bulk)\), where \(\mu_{N}\) represents the chemical potential of the N atom as replaced by the energy of the N atom. \(E_{bind} (M - V_{Ga} - H_{i} )\) and \(E_{bind} (M - V_{N} - H_{i} )\) represent the binding energy of the Ga36N36 system in which doped Be/Mg/Ca, H interstitial, and Ga vacancy or N vacancy coexist, respectively; \(E_{f} (M)\) is the formation energy of doped Be/Mg/Ca atoms in the Ga36N36 system; \(E_{f} (V_{Ga} )\) and \(E_{f} (V_{N} )\) indicate the formation energy of Ga vacancy or N vacancy in the Ga36N36 system; \(E_{f} (H_{i} )\) is the formation energy of H interstitial doped in the Ga36N36 system. Known data are substituted in Eqs. (14), and the results are summarized in Table 1. The calculated magnetic moments of the doped systems are shown in Table 1.

As shown in Table 1, the formation energy of doped systems under N-rich conditions is lower than that of doped systems under Ga-rich conditions. This finding indicates that doped systems are easier to form under N-rich conditions [7]. In the presence of VGa, the Ga34MHiN36(VGa3–) (M = Be/Mg/Ga) system has the lowest formation energy, and the system is the most easily doped. In the presence of VN, the formation energy of Ga35MHiN35 (VN3+) (M = Be/Mg/Ga) system is relatively the lowest, and the system is relatively easier to dope. Interestingly, under N-rich conditions, the formation energy of Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) system is lower than that of the Ga35MHiN35(VN3+) (M = Be/Mg/Ga) system. This finding shows that the Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) system is relatively easier to form. The Ga34CaHiN36(VGa3−) system has the lowest formation energy, and its structure is the easiest to form. As shown in Table 1, the binding energy of doped systems under N-rich conditions is lower than that of doped systems under Ga-rich conditions. This finding indicates that doped systems are more stable under N-rich conditions. The Ga34CaHiN36(VGa3–) system has the lowest binding energy, indicating that the system structure is the most stable. This condition will be further demonstrated by the phonon dispersion spectrum of the system.

The influence of the different positions of interstitial H on the formation difficulty of the doped system structure was studied [24]. The Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) system models with different interstitial H positions were constructed, as shown in Fig. 1(c). The lattice constants, volumes, and formation energies of different systems were calculated, as shown in Fig. 1c and Table 2.

Table 2 Formation energy of Ga34MHi1N36(VGa3−) (M = Be/Mg/Ca), Ga34MHi2N36 (VGa3−) (M = Be/Mg/Ca), and Ga34MHi3N36(VGa3−) (M = Be/Mg/Ca) at different interstitial H positions

As shown in Table 2, the Ga34MHi1N36(VGa3–) (M = Be/Mg/Ga) system has the lowest formation energy, and the Ga34MHi3N36(VGa3–) (M = Be/Mg/Ga) system has the highest formation energy. This finding shows that the closer the interstitial H is to the center of the system, the easier it is for the system to be doped. Therefore, considering the Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) system as the research object when the interstitial H is located at (0.554, 0.568, 0.520) is reasonable. For the convenience of presentation, the number 1 of the interstitial H position is omitted. Other doped systems can be deduced by analogy.

In order to further verify that the constructed doped systems have thermodynamic stability, the Ga36N36, Ga34CaHiN36, and Ga35CaHiN35 systems were selected as representatives, and the phonon dispersion spectrum of Ga36N36, Ga34CaHiN36, and Ga35CaHiN35 systems was calculated, as shown in Fig. 2a–c.

Figure 2
figure 2

Phonon dispersion curve (a) Ga36N36; (b) Ga34CaHiN36; (c) Ga35CaHiN35

As shown in Fig. 2a–c, the phonon dispersion spectrum of the three systems has no imaginary frequency, which ensures the stability of the systems. The results of the phonon dispersion curve are corroborated with the results of the binding energy analysis. Other doped systems are similar and will not be repeated.

Band gap

The distributions of energy band structures of the Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga), and Ga35MHiN35 (VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems calculated herein are shown in Fig. 3a–g. The MS software defaults the Fermi level to the zero energy point (the following are similar).

Figure 3
figure 3

Band structures of (a) Ga36N36; (b) Ga34BeHiN36(VGa3−/VGa2−/VGa1−/VGa0); (c) Ga35BeHiN35(VN3+/VN1+/VN0); (d) Ga34MgHiN36(VGa3−/VGa2−/VGa1−/VGa0); (e) Ga35MgHiN35(VN3+/VN1+/VN0); (f) Ga34CaHiN36(VGa3−/VGa2−/VGa1−/VGa0); (g) Ga35CaHiN35(VN3+/VN1+/VN0)

As shown in Fig. 3a, the valence band maximum and the conduction band minimum of the Ga36N36 system correspond to the same G point, indicating that this system is a direct band gap semiconductor. To reduce the calculation error, we tried multiple sets of different U values of Ga-3d and N-2p to correct the band gap, as shown in Table 3. The calculations reveal that the most suitable U values are Ud-Ga = 0 eV and Up-N = 6 eV, and the band gap width of GaN is 3.43 eV, which is consistent with the experimental results [37].

Table 3 Band gap values controlled by multiple groups of different U values for the 3d state of Ga and the 2p state of N in GaN

The calculations demonstrate that using the GGA + U method to adjust the band gap width is reasonable. The band gap widths of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35 (VN3+/ VN1+/ VN0) (M = Be/Mg/Ga) systems are shown in Table 4 (Fig. 3b–g).

Table 4 Band gap widths of Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga), and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems

As shown in Table 4, the band gap values of all doped systems are smaller than that of undoped GaN. In accordance with renormalization theory, firstly, the Burstein–Moss (B–M) effect causes the light absorption edge to move to a low-energy direction, thereby expanding the band gap. Secondly, the interaction between charges produces the multibody effect. Overlaps between impurities and defect bands narrow the band gap [38]. Thirdly, in the doped system, the generation of a built-in magnetic field splits the energy levels near the conduction band minimum and the valence band maximum and narrows the band gap of the system.

The total effects of the multibody effect and the built-in magnetic field on all doped systems are greater than those of the B–M effect (Figs. 3b–g), and the band gap of all doped systems is narrowed. The calculations reveal that the band gap widths of Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35 (VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are narrower than that of the Ga36N36 system. The narrowed band gap is conducive to the transition of carriers, and a narrow band gap width can substantially improve the effects of visible light on doped systems. Among the doped systems, the Ga34MHiN36(VGa3−) system has the narrowest band gap and is the most conducive to the transition of carriers. The visible-light effect is the best, and this condition will be further verified via absorption spectrum analyses.

Magnetic moment

The total density of states (TDOS) of the Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga), and Ga35MHiN35(VN3+/ VN1+/ VN0) (M = Be/Mg/Ga) systems calculated herein is shown in Fig. 4a–g.

Figure 4
figure 4

TDOS values of (a) Ga36N36; (b) Ga34BeHiN36(VGa3−/VGa2−/VGa1−/VGa0); (c) Ga35BeHiN35(VN3+/VN1+/VN0); (d) Ga34MgHiN36(VGa3−/VGa2−/VGa1−/VGa0); (e) Ga35MgHiN35(VN3+/VN1+/VN0); (f) Ga34CaHiN36(VGa3−/VGa2−/VGa1−/VGa0); (g) Ga35CaHiN35(VN3+/VN1+/VN0)

The spin-up and spin-down TDOS values of the Ga36N36 system are symmetrical, indicating that the system is nonmagnetic, and the magnetic moment is 0 \(\mu_{B}\) (\(\mu_{B}\) is the Bohr magneton) (Fig. 4a). The spin-up and spin-down TDOS values of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are asymmetrical, indicating that they are magnetic (Fig. 4b–g). Thus, all doped systems generate a built-in magnetic field, and the spin-level splitting phenomenon occurs under the influence of the built-in magnetic field of spintronic. This phenomenon is one of the reasons for the band gap narrowing of the doped systems.

The calculated magnetic moments of Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are shown in Table 1. Interestingly, the magnetic moments of the Ga34MHiN36 (VGa2−/VGa0) (M = Be/Mg/Ga) system are integers, and some systems have negative magnetic moment. The magnetic moment is negative because the system has more spin-down electronic states than spin-up electronic states. Thus, the magnetic moment is negative. The magnitude of the magnetic moment in Table 1 can quantitatively explain the reason for the band gap narrowing. Among the doped systems, the Ga34CaHiN36(VGa3−) system has the largest magnetic moment.

The magnetism source of the doped systems can be explained from the ionization equation. Ga34MHiN36 (VGa2−/ VGa0) (M = Be/Mg/Ga) is taken as an example for analysis, and the ionization equations are expressed as Eqs. (58).

$$ M_{{}}^{2 + } + V_{{G{\text{a}}}}^{2 - } + H_{i}^{ + } \to (M - V_{{G{\text{a}}}} - H_{i} )^{ + } $$
(5)
$$ M_{{}}^{2 + } + V_{{G{\text{a}}}}^{0} + H_{i}^{ + } \to (M - V_{{G{\text{a}}}} - H_{i} )^{{3{ + }}} $$
(6)
$$ (M - V_{Ga} - H_{i} )^{ + } + V_{Ga}^{2 - } \to (M - 2V_{Ga} - H_{i} )^{ - } , $$
(7)
$$ (M - V_{Ga} - H_{i} )^{3 + } + V_{Ga}^{2 - } \to (M - 2V_{Ga} - H_{i} )^{ + } , $$
(8)

where \(M\) is the Be/Mg/Ca atom, \(V_{G\,a}\) is the Ga vacancy, and \(H_{i}\) is the interstitial H. In accordance with the ionization equation, the oxidation states of the complexes \((M - 2V_{Ga} - H_{i} )^{ - }\) and \((M - 2V_{Ga} - H_{i} )^{ + }\) in the Ga34MHiN36 (VGa2−/VGa0) (M = Be/Mg/Ga) systems are − 1 and + 1 valences, and one unpaired electron is produced in the systems. Thus, the magnetic moments of the Ga34MHiN36 (VGa2−/VGa0) (M = Be/Mg/Ga) and Ga34MHiN36 (VGa2−/VGa0) (M = Be/Mg/Ga) systems under the action of a built-in magnetic field are − 1 and 1 \(\mu_{B}\), respectively.

Magnetic mechanism

The partial density of state (PDOS) of the Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35 (VN3+/ VN1+/ VN0) (M = Be/Mg/Ga) systems calculated herein is shown in Fig. 5a–g.

Figure 5
figure 5

PDOS values of (a) Ga36N36; (b) Ga34BeHiN36(VGa3−/VGa2−/VGa1−/VGa0); (c) Ga35BeHiN35(VN3+/VN1+/VN0); (d) Ga34MgHiN36(VGa3−/VGa2−/VGa1−/VGa0); (e) Ga35MgHiN35(VN3+/VN1+/VN0); (f) Ga34CaHiN36(VGa3−/VGa2−/VGa1−/VGa0); (g) Ga35CaHiN35(VN3+/VN1+/VN0)

The PDOS distribution of the Ga36N36 system with electron spin-up and spin-down is symmetrical (Fig. 5a), indicating that this system is nonmagnetic. The valence band maximum of the Ga36N36 system is determined by the N–2p state, and the conduction band minimum is determined by the Ga–4 s state. The PDOS distributions of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35 (VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are all asymmetrical, indicating that these systems produce built-in magnetic fields (Fig. 5b–g). All the systems have magnetic moments. In the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems, the magnetism comes from the hybrid coupling double exchange between the 4p electron orbital of Ga and the 2p electron orbital of N near the Fermi surface. Specifically, the electron spin–orbit coupling causes the doped systems to produce magnetism [39, 40]. This condition results in a narrow band gap of the doped systems, which is consistent with the results of the TDOS analyses.

The magnetic source of the doped system can be represented by the net spin density distribution. The net spin density distribution of the Ga34MHiN36(VGa2−) (M = Be/Mg/Ga) system is calculated, as shown in Fig. 6. The yellow portion represents the net spin charge density distribution.

Figure 6
figure 6

Net spin charge density diagram of the Ga34MHiN36(VGa2−) (M = Be/Mg/Ga) system

The total magnetic moment of the Ga34MHiN36(VGa2−) (M = Be/Mg/Ga) system is mainly contributed by the unpaired electrons of the N atom spin polarization and that the doped atom M = Be/Mg/Ga contributes partially to the total magnetic moment (Fig. 6).

The PDOS of the hybrid region of the p–s antibond state formed by the Ga–4 s and N–2p states in the conduction band minimum and the PDOS of the hybrid regions of the p–p bond state formed by the Ga–4p and N–2p states in the valence band maximum of the systems were integrated (Fig. 5b–g). This process was performed to quantitatively explain the band gap narrowing mechanism of the doped systems [38]. Subsequently, the integration results of the p–s antibond states and the p–p bond states were superimposed (Table 5).

Table 5 Number of quantum states before and after doping of the GaN system

Bond states and antibond states affect the movement directions of valence and conduction bands. If the effect of bond states increases, then the valence band maximum moves to a low-energy level; if the effect of antibond states increases, then the conduction band minimum moves to a high-energy level [24].

As shown in Table 5, the number of quantum states of the p–s antibond states at the conduction band minimum of the Ga34MHiN36 (VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems is smaller than that of the Ga36N36 system. This condition shows that the systems exhibit a weakened p–s antibond effect at the conduction band minimum, and their conduction band minimum moves to a low energy level.

The number of p–p bond states at the valence band maximum of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) system is higher than that of the Ga36N36 system. The valence band maximum shifts to a low energy level. However, the amount of the conduction band minimum is greater than that of the valence band maximum. Therefore, the band gap of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) system is narrowed. The number of p–p bond states at the valence band maximum of the Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) system is similar to that of the Ga36N36 system. Thus, the valence band maximum does not change. However, the conduction band minimum of the Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) system moves downward. Hence, the band gap of the Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) system is narrowed. This finding is consistent with the results of band gap analyses [38].

Carrier activity

GaN is an asymmetric structure semiconductor. The existence of point defects produces an electric dipole moment that affects the carrier activity. The addition of point vacancies of different valence states, interstitial H, and doped elements causes the doped systems to generate an internal electric dipole moment. This condition leads to the generation of a built-in electric field, and the carriers migrate under the action of the built-in electric field. The electric dipole moment is proportional to the field strength. \(\mu\) = PV, where \(\mu\) is the electric dipole moment, P is the polarization intensity, and V is the volume of the system. The polarization intensity is \(P = \varepsilon_{o} E(\varepsilon_{r} - 1)\), where \(\varepsilon_{o}\) is the vacuum permittivity, \(\varepsilon_{{\text{r}}}\) is the relative permittivity, and \(E\) is the built-in electric field. \(\mu = \varepsilon_{{\text{o}}} E(\varepsilon_{r} - 1){\text{V}}\) indicates that the stronger the electric dipole moment of the system, the stronger the built-in electric field, the better the carrier migration, and the stronger the carrier activity.

The electric dipole moment \(\mu\) can be calculated by using Debye equation [41], which can be expressed as Eq. (9).

$$ \mu \;{ = }\;n\,e\,R $$
(9)

where \(n\) represents the total number of electrons, \(e\) is the electronic charge, and \(R\) is the distance between the positive and negative charge centers.

The Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35 (VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems have local lattice distortions, and all the doped systems generate electric dipole moments, that is, built-in electric fields, which enhance photocatalytic carrier activity. The electric dipole moments of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems were calculated (Table 6).

Table 6 Electric dipole moment of Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga)

As shown in Table 6, the order of the electric dipole moment magnitude of Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems is as follows: Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) > Ga35MHiN35 (VN3+) (M = Be/Mg/Ga) > Ga35MHiN35 (VN1+) (M = Be/Mg/Ga) > Ga34MHiN36 (VGa2−) (M = Be/Mg/Ga) > Ga34MHiN36 (VGa1−) (M = Be/Mg/Ga) > Ga34MHiN36 (VGa0) (M = Be/Mg/Ga) = Ga35MHiN35(VN0) (M = Be/Mg/Ga). The Ga34CaHiN36 (VGa3−) system has relatively the largest electric dipole moment and the best photocatalytic carrier activity, which will be further verified in absorption spectrum analysis.

Visible-light effect

The photocatalytic performance of the doped system is affected by the visible-light effect. The visible light accounts for 46% of the total solar radiation energy [42]. Thus, the absorption efficiency of visible light by semiconductor materials determines the photocatalytic efficiency. The macroscopic optical properties of semiconductors can be described by using complex dielectric functions: \(\varepsilon \left( \omega \right){ = }\varepsilon_{1} \left( \omega \right){\text{ + i}}\varepsilon_{2} \left( \omega \right)\). The optical constants of semiconductors can be calculated by using the Kramers–Krönig dispersion relation [43, 44]. The absorption spectrum of a semiconductor can be expressed as Eq. (10).

$$ \alpha \left( \omega \right) = \sqrt 2 \omega \left[ {\sqrt {\varepsilon_{1}^{2} \left( \omega \right) + \varepsilon_{2}^{2} \left( \omega \right)} - \varepsilon_{1} (\omega )} \right]^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}}} $$
(10)

where \(\varepsilon_{1} (\omega )\) and \(\varepsilon_{2} (\omega )\) represent the real and imaginary parts of the complex dielectric function.

The absorption spectra of the Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga), and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are depicted in Fig. 7a–c.

Figure 7
figure 7

Absorption spectrum (a) Ga36N36, Ga34CaHiN36(VGa3−/VGa2−/VGa1−/VGa0), and Ga35CaHiN35(VN3+/ VN1+/ VN0); (b) Ga36N36, Ga34MgHiN36(VGa3−/VGa2−/VGa1−/VGa0), and Ga35MgHiN35(VN3+/ VN1+/ VN0); (c) Ga36N36, Ga34BeHiN36(VGa3−/VGa2−/VGa1−/VGa0), and Ga35BeHiN35(VN3+/VN1+/VN0)

The absorption spectra within 350–850 nm of all the doped systems redshift, thereby enhancing the visible-light effect. The redshift of the absorption spectra is consistent with the analysis results of energy band structures (Fig. 7a–c). The absorption spectrum of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) system has a more evident redshift than that of the Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) system. The order of the red shift of the doped systems is as follows: Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) > Ga34MHiN36(VGa0) (M = Be/Mg/Ga) > Ga34MHiN36 (VGa2−) (M = Be/Mg/Ga) > Ga34MHiN36(VGa1−) (M = Be/Mg/Ga) > Ga35MHiN35(VN3+) (M = Be/Mg/Ga) > Ga35MHiN35(VN1+) (M = Be/Mg/Ga) > Ga35MHiN35(VN0) (M = Be/Mg/Ga). The Ga34CaHiN36 (VGa3−) system has the best redshift effect and the intensity is relatively the strongest, and the activity is relatively the best, this is consistent with the results of the electric dipole moment analysis, which is the best utilization of visible light.

Carrier lifetime

Photocatalytic performance is affected by effective mass. The relative rate of photogenerated electrons and holes directly affects the quantum efficiency of photocatalysts. The relative size of the effective mass of electrons and holes determines the separation rate of electrons and holes to a certain extent, thereby affecting carrier lifetime. The effective mass of the hole at the valence band maximum, the effective mass of the electron at the conduction band minimum, the average effective mass and radio, the carrier mobility, and carrier lifetime of Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga), and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are shown in Table 7. Then, we will discuss and analyze the effective carrier mass, average effective mass and ratio, carrier mobility and lifetime of the GaN systems before and after point defects doping with different valence states.

Table 7 Carrier effective mass, average effective mass and ratio, carrier mobility, and carrier lifetime of GaN before and after vacancy doping with different valence states

The effective masses of the holes of undoped Ga36N36 in the G → F and G → Z directions are 0.23 and 0.28, respectively, which is consistent with reference [45], and the average effective mass of holes is 0.25. The effective masses of the electrons of undoped Ga36N36 in the G → F and G → Z directions are 0.21 and 0.26, respectively, and the average effective mass of electrons is 0.24.

Compared with undoped Ga36N36, the effective mass of electrons in all doped systems is similar, and the effective mass of holes is significantly different. The average effective mass of carriers in the same doped system under different valence states of vacancies has small difference. This condition indicates that the change in valence states has minimal effect on the effective mass of carriers in the same doped system.

According to the literature [46], the relationship between effective mass, elastic modulus, deformation potential energy, and carrier mobility in 3D materials [46] is expressed as Eq. (11).

$$\mu ^{{3D}} = \frac{{2^{{3/2}} \pi ^{{1/2}} }}{3}\frac{{c^{{3D}} \hbar ^{4} e}}{{E_{I}^{2} m^{{ * 5/2}} (k_{B} T)^{{3/2}} }},$$
(11)

where the modulus of elasticity \(c^{3D}\) is defined as \((E - E_{0} )/V_{0} = c^{3D} (\Delta l/l_{0} )^{2} /2\), \(E_{0}\) is the initial energy in the transmission direction, \(E\) is the energy in the transmission direction after doping, \(V_{0}\) is the total volume of the material in the equilibrium state, and \(l_{0}\) and \(\Delta l\) are the lattice constant and the corresponding deformation along the transmission direction, respectively [47]. The deformation potential energy \(E_{I}\) is defined as \(E_{I} = \frac{\Delta E}{\delta }\), where \(\Delta E\) is the energy change at the valence band maximum in the transmission direction, \(\delta\) is the internal strain, \(k_{B}\) is the Boltzmann constant [46], and the temperature is set to 300 K. The effective mass of electrons at the conduction band minimum and holes at the valence band maximum can be calculated as \(m^{ * } { = }\hbar^{2} \left( {d^{\;2} E/d\kappa^{2} } \right)^{ - 1}\), where \(\hbar\) is the Planck’s constant, \(\kappa\) is the direction of the wave vector, and \(E\) represents the energy of electrons at wave vector \(\kappa\) in this frequency band. The average effective mass can be calculated as \({1 \mathord{\left/ {\vphantom {1 {\overline{m}^{ * } }}} \right. \kern-\nulldelimiterspace} {\overline{m}^{ * } }} = \left( {1/3} \right)\left( {1/m_{G \to F}^{ * } + 2/m_{G \to Z}^{ * } } \right)\). The effective mass and average effective mass of carriers in the G → F and G → Z directions with high symmetry points were calculated (Fig. 3a–g). Table 7 shows that the calculated results are consistent with the experimental values [45]. Meanwhile, it can be seen from Fig. 3a–g that the energy level of the conduction band minimum is relatively curved, indicating that the slope in the direction of any high symmetry point is relatively low, which can qualitatively determine that the effective mass of electrons is relatively small (light electrons); the energy level of valence band maximum is relatively flat, and the slope of any high symmetry point direction is relatively high, which can qualitatively determine that the hole effective mass is relatively large (heavy holes).

The mobility represents the magnitude of the carrier transport capacity, the relationship between carrier mobility \(\mu\) and carrier lifetime \(\tau\) can be characterized as Eq. (12) [48].

$$ \mu = \frac{q\tau }{{m^{ * } }} $$
(12)

where \(m^{ * }\) is the effective mass and \(q\) is the electron charge. The carrier mobility and lifetime of all doped systems were calculated. The results are shown in Table 7. As shown in Table 7, the electron mobility of all systems is significantly greater than the hole mobility; this finding indicates that the drift speed of electrons is faster than the drift speed of holes, the electron transport capacity is stronger than the hole transport capacity, and the electron lifetime of all doped systems is longer than that of holes.

The velocity of the carrier in a certain wave vector direction is denoted by v, which represents the relationship between the effective mass and the carrier velocity in a certain wave vector direction at the conduction band minimum or the valence band maximum, and it can be obtained by using Formula (13) [46, 49].

$$ v\;{ = }\;\hbar \kappa {/}m^{ * } $$
(13)

where \(m^{ * }\) is the effective mass of the electron or hole, \(\kappa\) is the direction of the wave vector, and \(\hbar\) is the Planck’s constant. In Formula (13), \(m^{ * }\) (effective mass) is inversely proportional to \(v\) (the velocity of the carrier) in a certain \(\kappa\) directions.

The relative ratio of the effective mass of holes and electrons is usually used to compare and express the degrees of separation between the electrons and holes in the GaN systems before and after doping. The relative ratio is calculated by using Formula (14) [50].

$$ D = {\raise0.7ex\hbox{${m_{h}^{ * } }$} \!\mathord{\left/ {\vphantom {{m_{h}^{ * } } {m_{e}^{ * } }}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{${m_{e}^{ * } }$}} $$
(14)

where \(D\) represents the relative ratio of the effective mass of holes and electrons and \(m_{h}^{ * }\) and \(m_{e}^{ * }\) denote the effective masses of holes and electrons, respectively. The calculated \(D\) value of the doped system is shown in Table 7. As shown in Table 7, for all doped systems, the relative ratios \(D\) of the effective mass of hole and electron along the G → F or G → Z direction and the relative ratios \(D\) of average effective mass are greater than 1. Interestingly, the Ga34CaHiN36(VGa3−) system has the largest \(D\) value relatively, and the electron–hole separation is relatively the easiest. This feature is conducive to photocatalysis.

Oxidation reduction reaction

The oxidation reduction reaction has an important effect on the photocatalytic properties of semiconductors. The more negative the conduction band minimum position of the semiconductor, the stronger the reduction of the system, and the more positive the valence band maximum position, the stronger the oxidation of the system [24]. The band edge positions of the Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems calculated herein are shown in Fig. 8a–b.

Figure 8
figure 8

Position distributions of band edges (a) Ga36N36, Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga); (b) Ga36N36, Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga)

As shown in Fig. 8a–b, the Ga36N36 system can decompose water to produce \({\text{O}}_{{2}}\) and \({\text{H}}_{{2}}\), whether the pH is 0 or 7. As shown in Fig. 8a, the conduction band minimum of the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) system moves down, and the valence band maximum moves upward. However, all doped systems can prepare \({\text{H}}_{{2}}\) and \({\text{O}}_{{2}}\) by reducing and oxidizing water. The Ga34CaHiN36(VGa3−) system has the strongest oxidation reduction ability. As shown in Fig. 8b, the conduction band minimum of the Ga35MHiN35 (VN3+/VN1+/VN0) (M = Be/Mg/Ga) system moves up compared with the conduction band minimum of the Ga36N36 system. The reduction ability of Ga35GaHiN35(VN3+) system is relatively the strongest. The valence band maximum of the Ga35MHiN35(VN3+/VN1+/VN0) (M = Be/Mg/Ga) system moves up, but the valence band maximum is lower than the standard oxidation potential of water, all systems can prepare \({\text{H}}_{{2}}\) and \({\text{O}}_{{2}}\) by reducing and oxidizing water. The oxidation reduction ability of Ga35GaHiN35 (VN3+) system is relatively the strongest.

The calculation results show that all doped systems can split water to produce \({\text{O}}_{{2}}\) and \({\text{H}}_{{2}}\). Comprehensive analysis shows that the oxidation reduction capacity of the Ga34MHiN36(VGa3−) (M = Be/Mg/Ga) system is relatively optimal. The Ga34CaHiN36(VGa3−) system has the best oxidation reduction ability. Therefore, the Ga34CaHiN36(VGa3−) system is the best redox agent for decomposing water. These results are useful for designing and preparing novel GaN photocatalysts.

In summary, the four factors affecting the photocatalytic performance of GaN system by codoping of Be/Mg/Ca and VGa/VN with different valence states and interstitial H are as follows: visible-light effect, electric dipole moment, effective mass, and oxidation reduction reaction. The results indicate that the Ga34CaHiN36(VGa3−) system is the best photocatalyst in terms of these factors.

The rationality of the Ga34CaHiN36(VGa3–) system structure, VGa, interstitial H, Ca doping types, and positions are quantified to ensure the dynamic stability of the relevant structure. The molecular dynamics energy change of the Ga34CaHiN36(VGa3–) system and the top view of the structure before and after equilibrium are shown in Fig. 9a–c.

Figure 9
figure 9

Ga34CaHiN36(VGa3–) (a) energy fluctuation diagram before and after balance; (b) top view of the structure before balance; (c) top view of the structure after balance

As shown in Fig. 9a, the relevant data before and after the equilibrium of the Ga34CaHiN36(VGa3–) system have no major fluctuations. This condition indicates that the Ga34CaHiN36(VGa3–) system has stable structure and high dynamic stability. This finding is consistent with the phonon dispersion spectrum and structural stability analysis. As shown in Fig. 9b, c, the structure of the system does not change much before and after the equilibrium, confirming the structural stability of the Ga34CaHiN36(VGa3–) system.

Conclusion

The effects of the different valence states of VGa/VN and interstitial H on the photocatalytic performance of GaN:(Be/Mg/Ca) systems were investigated via the first principles. The results show that the Ga34MHiN36(VGa3−/VGa2−/VGa1−/VGa0) (M = Be/Mg/Ga) and Ga35MHiN35 (VN3+/VN1+/VN0) (M = Be/Mg/Ga) systems are more readily formed and have a more stable structure under N-rich conditions. The Ga34CaHiN36 (VGa3–) system has the lowest formation energy and is the easiest to dope. The binding energy is the lowest, and the system is the most stable. The main factors affecting photocatalytic performance of the doped system, including the visible-light effect, electric dipole moment, effective mass, and oxidation reduction reaction, were calculated and analyzed. The results show that the Ga34CaHiN36(VGa3−) system exhibits the most obvious redshift in the absorption spectrum, largest absorption spectrum intensity, best carrier activity, fastest carrier separation rate, longest carrier lifetime, and strongest oxidation reduction capacity. Therefore, the Ga34CaHiN36(VGa3−) system is the best photocatalyst among the doped systems investigated. The findings provide a certain reference value in designing and preparing novel GaN photocatalysts.