Mg12O12 and Be12O12 Nanocages as Sorbents and Sensors for H2S and SO2 Gases: A Theoretical Approach

Theoretical calculations based on the Density Functional Theory (DFT) have been performed to investigate the interaction of H2S as well SO2 gaseous molecules at the surfaces of Be12O12 and Mg12O12 nano-cages. The results show that a Mg12O12 nano-cage is a better sorbent than a Be12O12 nano-cage for the considered gases. Moreover, the ability of SO2 gas to be adsorbed is higher than that of H2S gas. The HOMO–LUMO gap (Eg) of Be12O12 nano-cage is more sensitive to SO2 than H2S adsorption, while the Eg value of Mg12O12 nano-cage reveals higher sensitivity to H2S than SO2 adsorption. The molecular dynamic calculations show that the H2S molecule cannot be retained at the surface of a Be12O12 nano-cage within 300–700 K and cannot be retained on a Mg12O12 nano-cage at 700 K, while the SO2 molecule can be retained at the surfaces of Be12O12 and Mg12O12 nano-cages up to 700 K. Moreover, the thermodynamic calculations indicate that the reactions between H2S as well SO2 with Be12O12 and Mg12O12 nano-cages are exothermic. Our results suggest that we can use Be12O12 and Mg12O12 nano-cages as sorbents as well as sensors for H2S and SO2 gases.


Introduction
Recently, great efforts have been made to develop novel gas sensors and detectors as well as gas-removing materials. This is to control the pollutant gases broadly produced from industrial activities and burning fuel, etc. The toxic H 2 S and SO 2 gases are produced as byproducts from SF6 decomposition, which is widely used as an insulating gas in high-voltage transformers and circuit breakers [1][2][3][4]. H 2 S is mostly found in crude petroleum, natural gas, and coal gasification. In addition, some organic materials decompose, releasing H 2 S [5][6][7]. H 2 S is also released in many industries such as the paper industry and biomass fermenters [7,8]. The combustion of sulfur-containing fossil fuels releases SO 2 into the air, and SO 2 is naturally released as a byproduct of volcanic activity [9,10]. The H 2 S as well SO 2 gases pose several hazards to the environment and human health. H 2 S exposure leads to coughing, eye irritation, and a runny nose, harms the nervous system by killing the neurons and may cause death [11,12]. Moreover, H 2 S is a corrosive gas and has devastating impacts on industrial catalysts [7,8]. SO 2 interacts with the air resulting in acidic rain which causes the corrosion of metals and disintegration of buildings [9,10]. Furthermore, SO 2 causes skin burning, eye irritation and respiratory system inflammation, and may cause death [7,[13][14][15]. Therefore, several attempts have been made to utilize many materials as sorbents and detectors for H 2 S and SO 2 gases, such as fullerene-like gallium nitride [16], CuO(111) surface [17], pristine graphene and graphene oxide [18], NH-decorated graphene [8], activated carbon, [19,20], pillared clays [21], zeolites [22], p-CuO/n-ZnO Heterojunction [23], Cu (100) and Au (100) surfaces [24,25], Cu

Methods
To investigate the adsorption characteristics of H 2 S and SO 2 molecules onto Be 12 O 12 and Mg 12 O 12 nano-cages, DFT and DFT-D3 methods [48] are used at the B3LYP/6-31G(d,p) level. D3 is a version of Grimme's dispersion [49]. B3 is Becke's three-parameter exchange functional [50] and LYP is the correlation functional of Lee, Yang and Parr [51,52]. A geometrical optimization without any restriction is performed for the free gaseous molecules, bare nano-cages and gas/nano-cage complexes. The ionization potential (IP) is calculated as [10,37]: (1) where E nano−cage + is the energy of the nano-cage with one electron lost at the same geometrical structure of the neutrally charged nano-cage. The chemical potential (µ), hardness (η) and electrophilicity (ω) are calculated as [53,54]: Molecular dynamic simulations via the Atom Centered Density Matrix Propagation molecular dynamics model (ADMP) as implemented in Gaussian 09 package are achieved for the investigated nano-cages and gas/nano-cage complexes.
The adsorption energy (E ads ) and the corrected adsorption energy (E corr ads ) with basis set superposition error (BSSE) have been estimated as [55]: E ads = E gas/nano−cage − E gas + E nano−cage (5) E corr ads = E ads + E BSSE (6)  where E gas/nano−cage , E gas , and E nano−cage are the energies of gas/nano-cage complexes, free gas molecules, and bare nano-cages, respectively. The charge density difference (∆ρ) for the complexes is computed as: ∆ρ = ρ gas/nano−cage − ρ gas + ρ nano−cage (7) where ρ gas/nano−cage , ρ gas , and ρ nano−cage are the charge densities for gas/nano-cage complexes, free gas molecules, and bare nano-cages, respectively. Thermodynamic calculations are performed via vibrational calculations to predict enthalpies as well free energies for the considered gases, nano-cages, and gas-cages complexes. Enthalpy difference (∆H) and free energy difference (∆G) for gas/nano-cage complexes are evaluated as [56]: ∆H = H gas/nano−cage − H gas + H nano−cage (8) where H gas/nano−cage , H nano−cage , and H gas are the enthalpies for gas/nano-cage complexes, bare nano-cages and free gas molecules, respectively.
where G gas/nano−cage , G nano−cage , and G gas are the free energies for gas/nano-cage complexes, bare nano-cages , and free gas molecules, respectively. All the calculations have been carried out by Gaussian 09 program package [57]. GaussSum3.0 program is used to visualize the densities of states (DOS) [58]. Atomic charges are calculated for the considered structures via full natural bond orbital (NBO) analyses by using NBO version 3.1 [59].  [10,29]. Be12O12, as well Mg12O12 nano-cages are constructed of eight hexagonal and six tetragonal rings. It is noticed that all the metallic (Be and Mg) and O sites are identical. These nano-cages have two metaloxygen bond types. They are denoted as d1 and d2 in Figure 1, where d1 shares a hexagon ring and a tetragon ring while d2 shares two hexagon rings. The d1 values are 1.58 and 1.95 Å, whereas the d2 values are 1.52 and 1.90 Å for Be12O12 and Mg12O12, respectively, match well with the previous studies [39,[60][61][62][63]. Table 1 represents the electronic properties of Be12O12 and Mg12O12 nano-cages. It is clear that the S atom is surrounded by negative and positive electrostatic potentials for H 2 S and SO 2 molecules, respectively. Furthermore, the MESP around the SO 2 molecule is extended in space more than that of the H 2 S molecule.  [57] −6.59 −6.58 [57], −6.57 [58], −6.60 [38], −6.58 [59], −6.74 [30,31], −6.53 [ For Be 12 O 12 and Mg 12 O 12 nano-cages, the O atoms and the metallic atoms are surrounded by negative and positive electrostatic potentials, respectively. In addition, the MESP of Mg 12 O 12 is more extended around the nano-cage than that of the Be 12 O 12 nanocage. This is due to the higher charge polarization of Mg 12 O 12 . Therefore, it is expected that the S atoms of H 2 S and SO 2 tend to be attracted to the metallic sites and oxygen sites of the nano-cages, respectively. Furthermore, the electric dipole moment (D) of Be 12 O 12 and Mg 12 O 12 nano-cages are 0.001 and 0.010 Debye, respectively. The low D values are owing to the uniform charge distribution on the nano-cages.

Results and Discussions
Molecular dynamic (MD) simulations examine the stability of the considered nanocages at 300, 500, 700 K for a total time of 500 fs. Figure 3 depicts the fluctuation of the potential energy versus the time and the nano-cage geometric configuration at the end of the period. It is clear that the S atom is surrounded by negative and positive electrostatic potentials for H2S and SO2 molecules, respectively. Furthermore, the MESP around the SO2 molecule is extended in space more than that of the H2S molecule.
For Be12O12 and Mg12O12 nano-cages, the O atoms and the metallic atoms are surrounded by negative and positive electrostatic potentials, respectively. In addition, the MESP of Mg12O12 is more extended around the nano-cage than that of the Be12O12 nanocage. This is due to the higher charge polarization of Mg12O12. Therefore, it is expected that the S atoms of H2S and SO2 tend to be attracted to the metallic sites and oxygen sites of the nano-cages, respectively. Furthermore, the electric dipole moment (D) of Be12O12 and Mg12O12 nano-cages are 0.001 and 0.010 Debye, respectively. The low D values are owing to the uniform charge distribution on the nano-cages.
Molecular dynamic (MD) simulations examine the stability of the considered nanocages at 300, 500, 700 K for a total time of 500 fs. Figure 3 depicts the fluctuation of the It is obvious the potential energy trivially varies and no considerable distortion is observed for the nano-cages; this emphasizes the stability of Be 12 O 12 and Mg 12 O 12 . In addition, the optimized geometries of discussed nano-cages were verified as true minima on the potential energy surfaces by the absence of imaginary frequencies [68][69][70][71].

Adsorption of H 2 S and SO 2 Gases
DFT as well DFT-D3 calculations were performed to investigate the adsorption characteristics of the adsorbed gases H 2 S and SO 2 at the surfaces of Be 12 O 12 , as well Mg 12 O 12 , nano-cages. Four complexes are investigated-H 2 S/Be 12 O 12 , H 2 S/Mg 12 O 12 , SO 2 /Be 12 O 12 , and SO 2 /Mg 12 O 12 . There are several possibilities of the gas interaction with the nano-cage, therefore eight adsorption modes for each complex have been fully optimized without any restrictions. Tables S1 and S2 in the Supplementary Data show the examined adsorption modes for H 2 S interaction with Be 12 O 12 and Mg 12 O 12 , respectively. We found that the H 2 S prefers to interact via its S atom toward the metallic atom Be or Mg of the nano-cage. Tables S3 and S4 in the Supplementary Data show the examined adsorption modes for SO 2 interaction with Be 12 O 12 and Mg 12 O 12 , respectively. One can observe that SO 2 prefers to interact via its S and O atoms toward the O sites and the metallic atoms, respectively, of the nano-cages. The differences in total electronic energies (∆E) for the examined orientations are shown in Figure 4. tion modes for H2S interaction with Be12O12 and Mg12O12, respectively. We found that the H2S prefers to interact via its S atom toward the metallic atom Be or Mg of the nano-cage. Tables S3 and S4 in the Supplementary Data show the examined adsorption modes for SO2 interaction with Be12O12 and Mg12O12, respectively. One can observe that SO2 prefers to interact via its S and O atoms toward the O sites and the metallic atoms, respectively, of the nano-cages. The differences in total electronic energies (ΔE) for the examined orientations are shown in Figure 4.  DFT and DFT-D3 calculations show that modes 1, 6, 8, and 1 for H 2 S/Be 12 O 12 , H 2 S/Mg 12 O 12 , SO 2 /Be 12 O 12 , and SO 2 /Mg 12 O 12 , respectively, are the most energetically stable adsorption modes. Figure 5 presents the most energetically stable adsorption modes that have more negative adsorption energy for each complex.
Nanomaterials 2022, 12, x FOR PEER REVIEW 9 of 25 adsorption modes. Figure 5 presents the most energetically stable adsorption modes that have more negative adsorption energy for each complex.  Table 2 list the adsorption properties of H2S and SO2. Notably, the DFT-D3 calculations give more negative adsorption energy values than DFT calculations.    15.97% and 2.60%, respectively. Therefore, one can say that the E g of the Be 12 O 12 nano-cage is more sensitive to the SO 2 than H 2 S adsorption while the E g of the Mg 12 O 12 nano-cage reveals higher sensitivity to H 2 S than SO 2 adsorption.
The electrical conductivity (σ) and recovery time (τ) are important aspects of sensing applications. σ depends on E g according to the following equation [72][73][74][75][76][77]: where A is a constant, k is Boltzmann's constant, and T is the temperature. Therefore, the increase of σ value of the Be 12 O 12 nano-cage in the presence of SO 2 gas is higher than in the presence of H 2 S gas, while the increase of σ value of the Mg 12 O 12 nano-cage in the presence of H 2 S gas is higher than in the presence of SO 2 gas. The τ is related to the E ads as in Equation (11) [78,79]: where ν o is the attempt frequency. In other words, as E ads increases (more negative) the longer τ becomes. To illuminate the features of the interaction between the considered gases and the sorbent nano-cages, our results will be discussed related to the following: (i) NBO atomic charges as well charge density difference analysis (∆ρ), (ii) bond analysis, and (iii) PDOS analysis.

NBO and Charge Density Difference Analysis
To shed light on the mechanism of H 2 S and SO 2 interaction with the considered nanocages, NBO analysis, as well as charge density difference (∆ρ) analysis, has been performed. Table 3 lists the atomic NBO charges, as well the electronic configuration of the atoms, for the free H 2 S, Be 12 O 12 , Mg 12 O 12 , H 2 S/Be 12 O 12 , and H 2 S/Mg 12 O 12 . The numbering of atoms as shown in Figure 5 is used.
For the H 2 S/Be 12 O 12 structure, it is clear that due to the interaction, the 1s orbital of the H26 and H27 atoms loses charges of 0.03 and 0.02 e while the 3s and 3p orbitals of the S atom lose charges of 0.03 and 0.14 e, respectively. On the other hand, the 2s and 2p orbitals of the Be1 atom gain charges of 0.14 and 0.04 e while for the O2, O4, and O6 the 2s orbital loses a charge of 0.01e whereas the 2p orbital gains a charge of 0.01 e. This explains why a total charge of 0.226 e, as shown in Table 2, has been transferred from H 2 S to the Be 12 O 12 nano-cage and the major of the charge transfer has occurred from the S atom of H 2 S to the Be1 atom of the Be 12 O 12 nano-cage.
This means the major mechanism of the interaction is the charge transfer mechanism. In addition, a slight loss and gain of charges are observed simultaneously for the O2, O4, and O6; therefore, one can suggest another minor mechanism which is the donation-back donation mechanism. Figure 6a demonstrates ∆ρ for H 2 S/Be 12 O 12 complex. For the H2S/Be12O12 structure, it is clear that due to the interaction, the 1s orbital of the H26 and H27 atoms loses charges of 0.03 and 0.02 e while the 3s and 3p orbitals of the S atom lose charges of 0.03 and 0.14 e, respectively. On the other hand, the 2s and 2p orbitals of the Be1 atom gain charges of 0.14 and 0.04 e while for the O2, O4, and O6 the 2s orbital loses a charge of 0.01e whereas the 2p orbital gains a charge of 0.01 e. This explains why a total charge of 0.226 e, as shown in Table 2, has been transferred from H2S to the Be12O12 nano-cage and the major of the charge transfer has occurred from the S atom of H2S to the Be1 atom of the Be12O12 nano-cage.
This means the major mechanism of the interaction is the charge transfer mechanism. In addition, a slight loss and gain of charges are observed simultaneously for the O2, O4, and O6; therefore, one can suggest another minor mechanism which is the donation-back donation mechanism. Figure 6a demonstrates Δ for H2S/Be12O12 complex.  The H and S atoms of the H 2 S molecule are surrounded by positive ∆ρ values (blue color), which confirms the charge transfer from the H 2 S molecule to the nano-cage. In addition, the positive (blue color) and negative (red color) ∆ρ values around each of the O2, O4, O6, and S atoms confirm the donation-back donation mechanism. For H 2 S/Mg 12 O 12 structure, the interaction between H 2 S and Mg 12 O 12 leads to the following: the 1s orbital of the H26 loses a charge of 0.37 e whereas the 2s and 2p of the O4 atom lose a charge of 0.07 and 0.13 e, respectively. Furthermore, the H27 atom has no change, the 3s and 3p orbitals of the S atom gain charges of 0.05 and 0.49 e, and the 3s and 3p of the Mg gain charges of 0.06 and 0.06 e, respectively. This confirms the dissociation of the H 2 S molecule into H + and SH − . Then, the H + is attached to the O4 atom, while the SH − is attached to the Mg1 atom. Figure 6b shows ∆ρ for the H 2 S/Mg 12 O 12 complex. The H26 is surrounded by positive ∆ρ values (blue color) while the S atom is surrounded by negative (red color) ∆ρ values which agree with the above discussion.  For SO 2 /Be 12 O 12 structure, one can observe, that the 2s of the O27 and the 3s and 3p of the S atom lose charges of 0.08, 0.07, and 0.10 e, respectively, while the 2p of the O26 and O27 atoms gain charges of 0.11 and 0.32 e, respectively. Therefore, the positive charge of the S atom and the negative charge of the O27 atom increase; consequently, they are attached to the O2 negative and Mg1 positive sites of the nano-cage, respectively. Moreover, for the Be1 atom, the 2s gains a charge of 0.01 e while the 2p loses a charge of 0.04 e, whereas for the O2 atom, the 2s gains a charge of 0.06 e while the 2p orbital loses a charge of 0.13 e. Therefore, one can say that there is a charge transfer from the Be 12 O 12 nano-cage to the SO 2 molecule greater than the charge transferred from the SO 2 molecule to the Be 12 O 12 nano-cage. This explains why SO 2 has a total charge of −0.127 e, as shown in Table 2. ∆ρ for the SO 2 /Be 12 O 12 complex is demonstrated in Figure 6c. It is clear that both the adsorbed SO 2 molecule and the sorbent Be 12 O 12 nano-cage are surrounded by positive and negative ∆ρ values (blue and red colors) which confirms the donation-back donation mechanism for the interaction. For the SO 2 /Mg 12 O 12 structure, one can notice that the 2s of the O26 and O27 loses charges of 0.02 and 0.03 e while the 2p gains charges of 0.28 and 0.34 e, respectively. Moreover, the 3s and 3p of the S atom lose charges of 0.11 and 0.06 e, respectively. Therefore, the net atomic charges of the O atoms of the SO 2 become more negative while the S atom becomes more positive, consequently, the O26 and O27 are attracted to the Mg7 and Mg3 positive sites while the S atom is attracted to the O2 negative site of the Mg 12 O 12 nano-cage, whereas for the Mg 12 O 12 , the 2s and 2p of the O2 atom lose charges of 0.02 and 0.28 e while the rest atoms of the nano-cage have little gains and loss of charges. ∆ρ for the SO 2 /Mg 12 O 12 complex is illustrated in Figure 6d. It is clear that the adsorbed SO 2 molecule is surrounded by negative ∆ρ values greater than the positive ∆ρ values, which confirm the donation-back donation mechanism for the interaction.

Bond Analysis
Bond order and overlap population are estimated for the free adsorbed gasses as well gas/nano-cage complexes. As the overlap value decreases, the interaction between the two atoms decreases and vice versa whereas the values close to zero mean no interaction while overlapping positive and negative values indicate the bonding and anti-bonding states, respectively [71,75,80].  For H 2 S/Be 12 O 12, the overlap population and bond order values of the S-H26 and S-H27 bonds are slightly changed with respect to the free H 2 S molecule, while overlapping population and bond order values of 0.074 and 0.279, respectively, are observed for the S-Be1 bond. This indicates the formation of a weak bond between the H 2 S molecule and the B 12 O 12 nano-cage. On the other hand, for H 2 S/Mg 12 O 12 , the low overlap population and bond order values for the S-H26 bond indicate the dissociation of the H 2 S molecule. In addition, high overlapping population and bond order values for S-Mg1 and O4-H26 indicate bond formation between the S atom and the Mg1 atom and between the H26 atom and the O4 atom. Furthermore, the overlapping population and the bond order values for the Mg1-O4 are decreased to 0.035 and 0.106 rather than 0.183 and 0.520 for the bare nano-cage, respectively, indicating a bond weakness has occurred. This reveals the strong interaction between the H 2 S molecule and the Mg 12 O 12 nano-cage. Table 6 is interested in the free SO 2 molecule, SO 2 /Be 12 O 12 , and SO 2 /Mg 12 O 12 complexes.
For SO 2 /Be 12 O 12 , the S-O27 and Be1-O2 bonds are weakened as indicated by the low values of the overlap population and bond order, while the high overlap population and bond order values for the Be1-O27 bond indicate bond formation. On the other hand, for SO 2 /Mg 12 O 12 , the decrease in the S-O26, S-O27, and Mg3-O2 overlapping population and bond order values indicates the weakness of these bonds while the bond order of 0.892, 0.464, and 0.495 for the S-O2, Mg-O27, and Mg-O26, respectively, confirms the formation of these bonds. In other words, one bond is formed between the SO 2 and the nano-cage for the SO 2 /Be 12 O 12 complex, whereas three bonds are formed for the SO 2 /Mg 12 O 12 complex. This explains the higher adsorption energy for SO 2 /Mg 12 O 12 than SO 2 /Be 12 O 12 .

Molecular Dynamic Simulations
To examine the impact of the temperature on the adsorption process of the investigated gases, molecular dynamic (MD) simulations at 300, 500, and 700 K for a total time of 500 fs are performed for H 2 S/Be 12 O 12 , H 2 S/Mg 12 O 12 , SO 2 /Be 12 O 12 , and SO 2 /Mg 12 O 12 complexes. MD simulations are carried out via the ADMP model. Figure 9a,b illustrates the potential energy fluctuations for H 2 S/Be 12 O 12 and H 2 S/Mg 12 O 12 , respectively, as well as the atomic configuration after 500 fs at the inspected temperatures.
turn, narrowing the HOMO-LUMO gap by 1.25 eV. Comparing Figure 8a,d,e, one can observe that adsorption of the SO2 molecule on the Mg12O12 nano-cage leads to intense changes in the states of the SO2 as well as the states of the Mg12O12, which confirms the occurrence of a strong interaction. Moreover, the HOMO of the nano-cage increases by 0.04 while the LUMO decreases by 0.08 eV; consequently, the HOMO-LUMO gap is slightly decreased by 0.12 eV.

Molecular Dynamic Simulations
To examine the impact of the temperature on the adsorption process of the investigated gases, molecular dynamic (MD) simulations at 300, 500, and 700 K for a total time of 500 fs are performed for H2S/Be12O12, H2S/Mg12O12, SO2/Be12O12, and SO2/Mg12O12 complexes. MD simulations are carried out via the ADMP model. Figure 9a,b illustrates the potential energy fluctuations for H2S/Be12O12 and H2S/Mg12O12, respectively, as well as the atomic configuration after 500 fs at the inspected temperatures.  nano-cage preserves the dissociated H 2 S molecule on its surface with no significant changes in the geometrical structure of the complex, while at the temperatures of 500 and 700 K, a high fluctuation of the potential energy is observed until 120-130 fs, when the fluctuation decreases. In addition, the dissociation of the H 2 S molecule is diminished. At the end of the time, at 500 K, the H 2 S is retained on the Mg 12 O 12 nano-cage at a distance of 2.65 Å while at 700 K the d 1-25 increases to 6.79 Å. Furthermore, Figure 10a,b demonstrates the potential energy fluctuations for SO 2 /Be 12 O 12 and SO 2 /Mg 12 O 12 , respectively, as well as the atomic configuration after 500 fs at the inspected temperatures.
For H2S/Be12O12, Figure 9a, although the fluctuation of the potential energy is small, the distance (d1-25) between H2S and Be12O12 nano-cage increased with time. As well as the temperature increases, the increment in the distance increases, where the d1-25 values at the end of the time increase to 3.32, 7.38, and 9.55 Å for temperatures 300, 500, and 700 K, respectively. Therefore, one suggests that the Be12O12 nano-cage cannot retain H2S on its surface, especially at high temperatures. For H2S/Mg12O12, Figure 9b, at the temperature of 300 K, the fluctuation of the potential energy is small, and the Mg12O12 nano-cage preserves the dissociated H2S molecule on its surface with no significant changes in the geometrical structure of the complex, while at the temperatures of 500 and 700 K, a high fluctuation of the potential energy is observed until 120-130 fs, when the fluctuation decreases. In addition, the dissociation of the H2S molecule is diminished. At the end of the time, at 500 K, the H2S is retained on the Mg12O12 nano-cage at a distance of 2.65 Å while at 700 K the d1-25 increases to 6.79 Å. Furthermore, Figure 10a,b demonstrates the potential energy fluctuations for SO2/Be12O12 and SO2/Mg12O12, respectively, as well as the atomic configuration after 500 fs at the inspected temperatures.  It is clear that no significant fluctuation of the potential energy is observed. Moreover, at the end of the time, there is a trivial deformation in the geometrical structure of the SO 2 /Be 12 O 12 and SO 2 /Mg 12 O 12 complexes. Therefore, one proposes that Be 12 O 12 and Mg 12 O 12 nano-cages can retain the SO 2 molecule on their surface at temperatures up to 700 K.

Thermodynamic Properties
For gas adsorption, enthalpy difference (∆H) and free energy difference (∆G) are imperative thermodynamic parameters for determining the strength and the spontaneity of the reaction. Therefore, thermodynamic calculations for H 2 S/Be 12 O 12 , H 2 S/Mg 12 O 12 , SO 2 /Be 12 O 12 , and SO 2 /Mg 12 O 12 complexes have been performed in the temperature range 300-700 K. Figure 11a signifies ∆H for the investigated complexes.
It is clear that no significant fluctuation of the potential energy is observed. Moreover, at the end of the time, there is a trivial deformation in the geometrical structure of the SO2/Be12O12 and SO2/Mg12O12 complexes. Therefore, one proposes that Be12O12 and Mg12O12 nano-cages can retain the SO2 molecule on their surface at temperatures up to 700 K.

Thermodynamic Properties
For gas adsorption, enthalpy difference (ΔH) and free energy difference (ΔG) are imperative thermodynamic parameters for determining the strength and the spontaneity of the reaction. Therefore, thermodynamic calculations for H2S/Be12O12, H2S/Mg12O12, SO2/Be12O12, and SO2/Mg12O12 complexes have been performed in the temperature range 300-700 K. Figure 11a signifies ΔH for the investigated complexes.  ∆H values for all considered complexes are negative, which specifies the reactions between H 2 S as well SO 2 with Be 12 O 12 and Mg 12 O 12 nano-cages are exothermic. Furthermore, as the temperature increases, the negative ∆H values decrease, which indicates the reactions are stronger at lower temperatures. In addition, for the same gas, ∆H values are more negative for the Mg 12 O 12 nano-cage than the Be 12 O 12 nano-cage, while for the same nano-cage, ∆H values are more negative for SO 2 gas than H 2 S gas. This confirms the above discussion of the high ability of the Mg 12 O 12 nano-cage to absorb the investigated gases and the high ability of the SO 2 gas to attach to the considered nano-cages. Figure 11b shows ∆G for the examined complexes. Spontaneous and non-spontaneous reactions are characterized by negative and positive ∆G values, respectively, while low negative ∆G values indicate the capability to reverse the reaction [46,[66][67][68]. For the H 2 S/Be 12 O 12 complex in the temperature range, ∆G values are positive, which indicates a non-spontaneous reaction, while for the SO 2 /Be 12 O 12 complex, the reaction is spontaneous at low temperatures, and beyond T = 400 K, the reaction turns into a non-spontaneous reaction. Furthermore, for the H 2 S/Mg 12 O 12 and SO 2 /Mg 12 O 12 complexes in the temperature range, ∆G values are negative, which indicates a spontaneous reaction. In addition, the reaction is capable of being reversed in the H 2 S/Mg 12 O 12 complex easier than in the SO 2 /Mg 12 O 12 complex.

Conclusions
Structural and electronic properties of the considered Be 12 O 12 and Mg 12 O 12 nanocages as well their stability are scrutinized. Mg 12 O 12 exhibits lower E g , IP, η, and higher ω values than those for Be 12 O 12; therefore, Mg 12 O 12 is more reactive than the Be 12 O 12 nano-cage. Molecular dynamics calculations emphasize the stability of the investigated nano-cages. In addition, the interaction of H 2 S and SO 2 gases at the surfaces of the inspected nano-cages have been studied, and the features of the interaction are examined in the point of the NBO atomic charges, charge density difference analysis (∆ρ), bond analysis, and PDOS. E corr ads values show that the ability of the Mg 12 O 12 nano-cage to adsorb the considered gases is higher than that of the Be 12 O 12 nano-cage. Furthermore, the ability of SO 2 gas to be adsorbed is higher than that of H 2 S gas. Furthermore, H 2 S gas dissociates at the Mg 12 O 12 surface. In addition, adsorption of H 2 S leads to a decrease in the HOMO-LUMO gap (E g ) values of Be 12 O 12 and Mg 12 O 12 by 3.84% and 17.54%, respectively, whereas the adsorption of SO 2 leads to a decrease in E g values by 15.97% and 2.60%, respectively. At high temperatures, MD calculations declare that the Be 12 O 12 and Mg 12 O 12 nano-cages do not retain the H 2 S on their surfaces, while SO 2 is retained at low and high temperatures. Moreover, the thermodynamic calculations show that the reactions between H 2 S and SO 2 with Be 12 O 12 and Mg 12 O 12 nano-cages are exothermic. Furthermore, at the temperature range of 300-700 K, the H 2 S reaction with Mg 12 O 12 and Be 12 O 12 is spontaneous and nonspontaneous, respectively, while the SO 2 reaction with Mg 12 O 12 is spontaneous, whereas the SO 2 reaction with Be 12 O 12 is spontaneous at temperatures up to 400 K. In addition, the reaction is capable to be reversed in the H 2 S/Mg 12 O 12 complex easier than in the SO 2 /Mg 12 O 12 complex.