DFT study of adsorbing SO2, NO2, and NH3 gases based on pristine and carbon-doped Al24N24 nanocages

The adsorption of SO2, NO2, and NH3 toxic gases on Al24N24 and Al24N23C nanocages was investigated by using density functional theory (DFT) calculations. The adsorption energies, frontier orbitals, charge transfer using natural bonding orbital (NBO) analysis, dipole moment, the partial density of states (PDOS), thermodynamic relationships, non-covalent interaction (NCI), and quantum theory of atoms in molecules (QTAIM) were considered. The results reveal that carbon-doped Al24N24 nanocage increases the adsorption energies for SO2 and NO2 gases while decreasing the adsorption energy of NH3 gas. The ΔG for all configurations were negative except the configurations A1 and G2 confirming the weak adsorption of these two complexes. In conclusion, Al24N24 and Al24N23C nanocages are in general promising adsorbents for the removal of SO2, NO2, and NH3 toxic gases. The Al24N24 and Al24N23C nanocages are ideal electronic materials.


Introduction
Sulfur dioxide (SO 2 ), ammonia (NH 3 ), and nitrogen dioxide (NO 2 ) are toxic gases that pollute the environment [1,2]. SO 2 gas is produced by burning petroleum sources and fossil fuels. We can use it in many applications, but it has many problems for human health and causes many diseases such as lung disease, and a high dose of it causes coma or death [3][4][5]. NH 3 is a colorless gas produced naturally from burning fossil fuels and when used in industry such as plastic production and preparation of nitric acid, it causes many problems such as eye and nose irritation, and a high dose of it may lead to death too [6]. NO 2 is a reddish-brown gas produced by engine combustion producing acid rings, and when it reacts with water, it causes problems to the environment such as damaging buildings and many health hazards [7]. Therefore, the search for new materials to use as sensors that can detect and absorb these gases is aimed. There are several nanostructured materials in zero dimensions (0D), 1D, 2D, and 3D such as nanotubes, nanocages, and nanosheets that have been studied as gas sensors to detect these gases . Derdare et al. used C 20 and MC 19 (M = Ru, Ir, and Au) clusters to adsorb and detect NO 2 , N 2 O, and NH 3 gases by using DFT calculations, and their work showed that adsorption of N 2 O and NH 3 on C 20 is physical adsorption while NO 2 is chemical adsorption, but the change of Eg is very low after adsorption indicating that the sensitivity of C 20 to these gases is very low. While the doped form of MC 19 ( RuC 19 and AuC 19 ) sensitivity and stability was increased, the IrC 19 stability decreased. They also found that it is active and can be used as a catalyst in the decomposition of N 2 O gas [29]. Zahedi and Seif [30] show by using DFT calculations that C 48 B 6 N 6 heterofullerene is a good material for use as a gas sensor to detect and adsorb NO 2 and NH 3 gases. Rad e al. [31] used pristine graphene (PG) and N-doped graphene to adsorb and detect SO 2 and SO 3 gases. They used DFT and NBO calculations and showed that adsorption energy in the case of NDG was higher than in pristine graphene; consequently, NDG is suitable and more detectable for these gases than pristine graphene. Basharnavaz et al. [32] used the P-doped and transition metal (TM)/P-codoped graphitic carbon nitride (gCN) systems (TM = Co, Rh, and Ir elements) to adsorb and detect SO 2 gas. This work by using DFT calculations showed that TM/P-codoped gCN systems have adsorption energy higher than that of the pristine gCN. Also, they found that the Ir/P-codoped gCN was a better system for adsorption and detection of the SO 2 gas compared with other systems with a high adsorption energy of − 3.52 eV. Zhang et al. [27] used graphene for the adsorption of SO 2 by using DFT calculations. They showed that there were four structures for graphene, namely, pristine graphene (PG), vacancy-defected graphene (VG), Ti-doped graphene (Ti-G), and Ti-doped graphene with vacancies (Ti-VG). Their results showed that Ti-doped graphene is the best structure for the adsorption of SO 2 gas with the highest adsorption energy. Noei [33] explained the electronic properties of pristine Al 12 N 12 and B 12 N 12 nanoclusters for the adsorption of SO 2 gas. The results show that the two structures are sensitive to adsorb SO 2 gas. Rad and Ayub [34] study the adsorption of O 3 and SO 2 molecules on pristine B 12 N 12 and Ni-decorated B 12 N 12 nanocages. They showed that the Nidecorated B 12 N 12 enhances and increases the adsorption of these gases. Xi et al. [35] examined the adsorption of CO 2 molecules on two stable BiC and Bi2C monolayers promising adsorbents to capture CO 2 gas. Zhao et al. [36] proposed a single metal catalyst on a 2D BC3N2 substrate for the activation of CO 2 and CH 4 gasses into CH 3 COOH. Huo et al. [37] used Fe 36 Co 44 nanostructure to catalyze the hydrolysis reaction of ammonia borane to produce H 2 . Zhang et al. [38] study the removal of COS chemicals by nano-hollow sphere hydrolytic catalyst. Zhao e al. [39] investigated the 2D-InSe with B-doped as bifunctional catalysts to separate CO 2 and CH 4 under the regulation of an external electric field.
In this work, we study the adsorption of three toxic gases on Al 24 N 24 and Al 24 N 23 C nanocages by using DFT calculations to decrease air pollution. The adsorption energies, NBO, PDOS, NCI, and QTAIM were determined.

Computational details
In this study, all the geometries of nanocages and gas molecules before and after adsorption on nanocages were fully optimized based on density functional theory (DFT) without any symmetry constraint. The B3LYP and 6-31 g(d) level of theory were used for NO 2 and SO 2 systems and 6-31 g(d,p) for NH3 systems. The calculations were carried out by Gaussian 09 [40]. The adsorption energy of a gas molecule on the nanocages was obtained from the following equation: where E gas@nanocage, E gas , and E nanocage are the total energy of the gas molecule on the nanocage (Al 24 N 24 and Al 24 N 23 C), the total energy of the gas molecule, and the total energy of the nanocage (Al 24 N 24 and Al 24 N 23 C), respectively.
Thermodynamic parameters at T = 298.15 K and P = 1 atm such as Gibbs-free energy change (ΔG), enthalpy change (ΔH), and entropy change (ΔS) of the adsorption were evaluated.

Geometry analysis
The adsorption capacity, which is one of the most important parameters that determine catalytic activity, indicates the selectivity of a particular substance by comparing it with other materials [41][42][43]. In this work, theoretical methods were used to study the adsorption of three industrial gases NO 2 , SO 2 , and NH 3 based on the adsorbent material Al 24 N 24 nanocage. As evident from Fig. 1, the nanocage of Al 24 N 24 consists of 12 tetragons, 8 hexagons, and 6 octagons. As seen in Fig. 1, in pristine Al 24 N 24 , the bond distances between nitrogen and aluminum that are shared between 6-and 8-membered rings are 1.78 Å, 4-and 8-membered rings are 1.83 Å, and for 4-and 6-membered rings are 1.86 Å. By the replacement of one nitrogen with one carbon atom (Al 24 N 23 C nanocage), the bond distance between the doping atom and aluminum atom increases by 0.11 and 0.12 Å in comparison with pristine Al 24 N 24 .
Electrostatic potential map (ESP) is a useful tool for predicting the reactivity sites for a nucleophilic and electrophilic attack. As shown in Fig. 1, the red and blue colors represent the regions of negative (related to electrophilic reactivity) and positive (related to nucleophilic reactivity) electrostatic potential respectively. The negative regions are localized on the N atom, and the positive regions of ESP are localized on Al and C atoms.

Interaction of NO 2 , SO 2 , and NH 3 with Al 24 N 24 and Al 24 N 23 C nanocages
The optimized geometry configurations of NO 2 on Al 24 N 24 and Al 24 N 23 C nanocages are shown in Fig. 2. The three different configurations of NO 2 on Al 24 N 24 are represented as A1 to C1 and A2 to C2 for Al 24 N 23 C nanocages. Configuration A1 displays a nitrogen atom in a NO 2 molecule interacting with an aluminum atom of pristine AL 24 N 24 nanocage presented in Table 1, by distance 2.12 Å and adsorption energy − 0.19 eV. In complex A2, the NO 2 molecule interacting with the doped carbon Al 24 N 24 nanocage is different from that in configuration A1; the NO 2 molecule interacts through nitrogen with carbon-doped Al 24 N 24 and oxygen with the aluminum atom of Al 24 N 23 C. The additional interaction C of figuration A2 is responsible for strong binding energy by forming a C-N bond with a distance of 1.39 Å and the adsorption energy − 3.65 eV. A comparison between complex A1 and B1 indicates that the oxygen atom in the NO 2 molecule strongly interacts with pristine Al 24 N 24 nanocage as in complex B1, while in complex B2, by carbon-doped Al24N24, the interaction of nitrogen and oxygen atoms in NO 2 is stronger than the two oxygen atoms of NO 2 molecule. As seen in Table 1, the results reveal that adsorption energies are enhanced by carbon doping Al 24 N 24 . As shown in complex C1 and C2 in Fig. 2, the interaction of nitrogen in NO 2 molecule is attracted by nitrogen of pristine Al 24 N 24 and carbon of Al 24 N 23 C leading to the formation of N-N bond in pristine Al 24 N 24 and C-N bond in Al 24 N 23 C nanocage. The bond lengths in both complex C1(N-N) and C2 (C-N) are 1.40 Å and 1.30 Å respectively.
For SO 2 gas adsorbed on the two nanocages Al 24 N 24 and Al 24 N 23 C, the most stable orientations D1 and E1 for Al 24 N 24 , D2, and E2 for Al 24 N 23 C nanocages are depicted in Fig. 3. The adsorption energies for SO 2 molecules in orientations D1 and D2 as shown in Table 2 are − 0.58 eV and − 2.10 eV, respectively. The interactions of the complex D1 and D2 are different like complex B1 and B2 of NO 2 adsorbed on Al 24 N 24 and Al 24 N 23 C. The presence of carbon doped in Al 24 N 24 leads to improving the adsorption energy by about 3.62 times Al 24 N 24 nanocage. The interaction of the sulfur atom in the SO 2 molecule with the nitrogen of Al 24 N 24 and carbon-doped Al 24 N 23 C is stronger as in orientations E1 and E2. The adsorption energies of the complexes E1 and E2 are − 2.58 eV and − 3.10 eV respectively.
The response of carbon-doped Al 24 N 24 nanocage is decreased towards the NH 3 gas molecule. As shown in Fig. 4, there are three configurations for the adsorption of NH 3 gas on Al 24 N 24 and carbon-doped Al 24 N 23 C, the configuration F1, and the NH 3 molecule prefers to lie on the aluminum atom of Al 24 N 24 with adsorption energy − 1.41 eV as in Table 3. In configurations F2 and G2, NH 3 binds with aluminum and carbon of Al 24 N 23 C, and the calculated adsorption energies for the complex F2 and G2 are − 1.36 eV and 0.41 eV showing that the interaction of NH 3 with the carbon of Al 24 N 23 C is physical adsorption.
When the gas is adsorbed physically, we can reuse the substrate, while if a chemical bond is formed between the gas molecule and the substrate; it means that the desorption process is difficult. As presented in Tables 1 and 2, the doped Al 24 N 24 by carbon atom for SO 2 and NO 2 molecules is chemically adsorbed, so this nanocage is not suitable for sensing SO 2 and NO 2 gas molecules. In the case of NH 3 systems, the binding of the NH 3 gas molecule with the aluminum atom as seen in Table 3 configuration F2 is lower in adsorption energy than configuration F1. As revealed from their results, pristine AL 24 N 24 nanocage is sensitive to the three gas molecules while carbon-doped (Al 24 N 23 C) nanocage is sensitive only to NH 3 gas molecule. We propose a diagnostic test for the effect of the basis set by Fig. 1 The optimized geometries and electrostatic potential map (ESP) of Al 24 N 24 and Al 24 N 23 C using cc-PVDZ as a single-energy calculation, as seen in Tables 1, 2, and 3; the calculated adsorption energies show change ranges from 0 to 0.17 eV in the case of NO 2 , from 0.11 to 0.31 eV for SO 2 , and from 0.01 to 0.05 eV for NH 3 as we compare with the basis set used for this study mentioned in computational details.

NBO charges and dipole moment
The dipole moment and the charge transfer for the adsorbed gases on pristine Al 24 N 24 and carbon-doped Al 24 N 23 C nanocages were investigated. As seen in Table 1, the dipole moment of the pristine Al 24 N 24 nanocage is 0.0068 Debye. After doping with carbon, the dipole moment was changed

Thermodynamic parameters and density of states
The analysis of interaction energies is expanded to include enthalpies (H), Gibbs-free energies (G), and entropies (S) of interaction. The thermodynamic parameters for the adsorbed gases SO 2 , NO 2 , and NH 3 such as Gibbs-free energy change (ΔG), enthalpy change (ΔH), and entropy change (ΔS) were determined at T = 298.15 K and P = 1 atm. As seen in Table 4, the negative values of Gibbs-free energies indicate the spontaneous adsorption of gases molecule on the two nanocages. The higher value of ΔG implies a strong interaction between the gas molecule and substrate. The enthalpy change values are higher than the Gibbs-free energy values which indicate that the enthalpy is stabilized.
The ΔG for the configurations A1 and G2 have a positive value confirming weak adsorption for these complexes.
In Tables 1, 2, and 3, the quantum parameters and the electronic properties of the gaseous molecule were evaluated. The HOMO of most complexes is shifted to higher energy. The HOMOs of adsorbed gases were comparable. After the adsorption of this NO 2 , SO 2 , and NH 3 on the Al 24 N 24 and Al 24 N 23 C, the energy gap for all systems decreased.

The PDOS analysis
To characterize the interactions between SO 2 , NO 2 , and NH 3 gases with the study nanocages (Al 24 N 24 and Al 24 N 23 C), the projected density of states (PDOS) was examined.   Figure 6 shows that the Al-3 s and Al-3p orbitals are pushed to lower energies as a result of electron transfer from the Al atoms to the NO 2 and SO 2 molecules, which considerably aids in the adsorption of NO 2 and SO 2 .
By the binding energies indicated in Tables 1 and 2, it is seen that the Al-3p orbitals of C2′s PDOS display increased intensity, indicating that C2 is more significant than both E2 and C1 configurations. Furthermore, from − 6.20 to − 12.70 eV, the N-2sp states of adsorbed NO 2 contribute significantly to the C-2sp (HOMO), indicating that the C atom uses its valence orbitals to interact with the O-2sp, N-2sp, Al-3 s, and Al-3p states of NO 2 as well as the Al 24 N 23 C nanocage. Due to the distribution of S-3sp states in a broad range from − 5.40 to − 14.30 eV (E2) below the Fermi level, the S-3sp orbitals of SO 2 also show a stronger hybridization with the C-2sp, Al-3 s, and Al-3p orbitals of Al 24 N 23 C. Agreeing with their binding energies, the charge-transfer values between the S, N, and C atoms of NO 2 and SO 2 and the Al 24 N 23 C nanocage suggest that   the charge-transfer is more important for the stability of these complexes than the electrostatic interactions. On the other hand, a weak connection between the substrate and the NH 3 molecule results from the soft hybridization of the NH 3 and Al 24 N 23 C′s C-2p orbitals.

Non-covalent interaction (NCI) analysis
To identify non-covalent bonds, such as hydrogen bonds, steric clashes, Van der Waals (vdW), and reduced density gradients, the quantum mechanical electron density has been used (RDG) determined by the following equation: where the value can represent the bond strength, whereas the value of sign( 2 ) × is used to evaluate the nature of the interaction between the SO 2 , NO 2 , and NH 3 gases and the investigated nanocages (Al 24 N 24 and Al 24 N 23 C). 2 is the second-largest eigenvalue of the electron density in the Hessian matrix, where sign( 2 ) × < 0 denotes an attractive interaction and sign( 2 ) × ρ > 0 denotes a repulsive interaction.
To study the non-covalent interactions between the NO 2 , SO 2 , and NH 3 gases and the investigated nanocages, the scatter graphs between the reduced density gradient (RDG) and the electron density ( ) have been shown in Figs. 10 and 11. As seen in Figs. 10 and 11, sign(λ 2 ) ) increases for red areas suggesting high steric repulsions inside the nanocage, whereas sign(λ 2 ) decreases for blue areas indicating strong contacts. The green areas between the complex's elements approaching 0 are Van der Waals interactions, which are weak intermolecular forces. The considerable vdW interaction between the NH 3 and the Al 24 N 23 C (G2) nanocages is visible, as can be seen in Fig. 11. This conclusion is supported by the geometric analysis, which considers weak interactions.
Additionally, blue and green blended spikes were seen at greater electron densities and sign(λ 2 ) < 0, which shows that the C2, E2, and F1 complexes have developed partial covalent connections. The blue and green patches between the gas molecule and the nanocages, as well as the intermolecular contact, were visible in the partial covalent bond as shown in Figs. 10 and 11. Higher interaction intensity was seen for C2 and E2 configurations due to the partial covalent contact between the SO 2 and NO 2 molecules with the Al 24 N 23 C nanocage in the RDG versus sign( 2 ) × ρ graph.

Quantum theory of atoms in molecules (QTAIM)
A well-known method for examining the topology of interactions is QTAIM (covalent or non-covalent). For the most stable configuration of C2, E2, and F1 complexes, measurements of several topological parameters, including electron density (ρ r ), Laplacian ( ∇ 2 ρ r ), and total electron energy density (H r ) at the bond critical points (BCP), have been made in order to characterize the strength and type of bond (Table 5). Shared shell interactions (covalent bonds) exist when the ρ r is larger than 0.20 a.u., is higher than 0.20 a.u, and the Laplacian is higher but negative. Al24N23C nanocage's Al-to-carbon bond is demonstrated to be partially covalent in the presence of ∇ 2 ρ r > 0 and Hr < 0 [44]. However, ρ r < 0.1 a.u [45] indicates closed-shell interactions (ionic, hydrogen bonding, or van  der Waals interactions). Figure 12 displays the BCP between the atoms of the complexes under investigation. As shown in Table 5, the results for the C2 complex indicate that the N-C bond should be regarded as a strong polar covalent bond because its ρ r value is 0.326 a.u, which is somewhat higher than the S-C in E2. According to the binding energies, the Al-C (Al 24 N 23 C) bond in the C2 complex has a higher ρ r value for BCP than the same bond in the E2 configuration.
A weaker association between NH 3 and nanocages is also indicated by the fact that F1′s electron density (0.050 a.u.) is lower than that of C2 and E2. The low values of ρ r < 0.1 for Al-C, Al1-O, Al2-O, and Al-N bonds of SO 2 , NO 2 , and NH 3 at Al 24 N 24 and Al 24 N 23 C nanocages show that the charge dissipates in the distance between the two nuclei and that the interactions can be categorized as a closed-shell type, which is related to strong non-covalent interactions [46,47].

Conclusion
In this paper, the aim was to investigate the use of Al 24 N 24 and Al 24 N 23 C nanocages toward three harmful gases (NO 2 , SO 2 , and NH 3 ). The adsorption properties were determined through adsorption energies, charge transfer, dipole moment, thermodynamic parameters, PDOS, NCI, and QTAIM, and the following results are obtained: -Introducing carbon-doped increases the adsorption energies for NO 2 and SO 2 gases, while decreasing for NH 3 gas -The charge is transferred from the NH 3 gas molecule to the nanocage, while for NO 2 and SO 2 systems, the charge transfers from the nanocage to the SO 2 and NO 2 gas molecules except configurations C1 and D1. -The directions of dipole moment vectors for the NH 3 system point forward to this group, while dipole moment vectors of the SO 2 and NO 2 adsorbed on Al 24 N 24 and Al 24 N 23 C nanocages point away from these two groups except configuration D1.
-The Gibbs-free energy change (ΔG) for all configurations is negative except that A1 and G2 have a positive value confirming weak adsorption for these complexes. -The energy gaps decreased after adsorping NO 2 , SO 2 , and NH 3 on Al 24 N 24 and Al 24 N 23 C nanocages. -Higher interaction intensity was observed for C2 and E2 configurations due to the partial covalent contact between the SO 2 and NO 2 molecules with the Al 24 N 23 C nanocage. -The results obtained from QTAIM for the C2 complex indicate that the N-C bond should be regarded as a strong polar covalent bond because its ρ r value is 0.326 a.u and a weaker association between NH 3 and Al 24 N 24 nanocages is indicated by electron density (0.050 a.u.) that is lower than that of configuration C2 and E2.
These results confirm that Al 24 N 24 and Al 24 N 23 C nanocages were used as promising materials for the removal of NO 2 , SO 2 , and NH 3 toxic gases.

Data and code availability
The authors confirm that the data supporting the findings of this study are available within the article.
Code used for calculated data and analysis is commercial, and the authors have a license to the software.

Declarations
Competing interests The authors declare no competing interests.

Ethical statement
We certify that we participated in the design of this work as well as the writing of the manuscript and to assume public responsibility for it. We have reviewed the final version of the manuscript, and we have agreed to publish this manuscript. This manuscript has not been published elsewhere. All the authors are aware and agree to transmission, and no part of the manuscript has previously been published in another journal.