Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9, 1815-1825 2025 Publisher: Learning Gate DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate © 2025 by the authors; licensee Learning Gate History: Received: 14 July 2025; Revised: 25 August 2025; Accepted: 28 August 2025; Published: 26 September 2025 * Correspondence: babapoor@uma.ac.ir Tuning g-C3N4 with Cr, Mo, and W for superior HCN gas detection: A first- principles study on adsorption, electronic structure, and sensing mechanism Fatemeh Madadi-Atmiansofla1, Aziz Babapoor1*, Hadi Basharnavaz2, Seyed Hossein Hashemi3 1Department of Chemical Engineering, University of Mohaghegh Ardabili, Ardabil, Iran; babapoor@uma.ac.ir (A.B.). 2Department of Chemistry, College of Science, Yazd University, Yazd, Iran. 3Energy Systems Engineering, University of Regina, Regina, SK S4S 0A2, Canada. Abstract: This study investigates the adsorption of hydrogen cyanide (HCN) molecules onto both pure and transition metal (TM)-modified graphitic carbon nitride (g-C3N4) using density functional theory (DFT) and first-principles calculations in the solid state. The findings demonstrate that HCN adsorption induces structural changes in both unmodified and TM-doped g-C3N4 surfaces. Specifically, the initially flat structures of these materials transform into curved configurations following interaction with HCN gas. This structural modification correlates with a significant enhancement in electrical conductivity and improvements in electronic properties. Analysis of the partial density of states for TM- doped g-C3N4 and the orbitals of adsorbed HCN molecules reveals that the presence of transition metals and HCN adsorption increase electron density near the Fermi level. The calculated adsorption energies (Eads) for HCN on various surfaces are as follows: -0.281 eV on pure g-C3N4, -2.213 eV on Cr-doped, - 2.326 eV on Mo-doped, and -3.104 eV on W-doped g-C3N4. On the pristine surface, HCN exhibits weak physical interaction, whereas the bonding becomes considerably stronger with the introduction of transition metals. The adsorption energy values suggest that HCN is physically adsorbed on the pure g- C3N4 surface, as the value exceeds -1 eV. Conversely, on TM-modified surfaces, the adsorption indicates chemical bonding, with energy values less than -1 eV. Among the modified systems, W-doped g-C3N4 exhibits the strongest interaction with HCN, with the lowest Eads value of -3.104 eV, surpassing the Cr- and Mo-doped variants. This characteristic makes W-doped g-C3N4 a promising candidate for detecting and capturing HCN molecules from environmental sources. Keywords: Adsorption process, DFT, Electronic properties, Modified g-C3N4, Toxic gases. 1. Introduction One of the most critical and common issues globally is the elimination or reduction of pollution caused by various toxic pollutants and greenhouse gases that threaten the environment and human health. Therefore, rapid and timely detection of these gases has become an important global issue. CO, HCN, SO2, NO2, NO, and H2S are environmental pollutant gas molecules typically generated from oil refineries, vehicle exhaust, and coal liquefaction [1]. These toxic gases are hazardous to humans and animals, even in low concentrations, and can cause high concentrations of death. Hence, detecting these gases has become a major global challenge [1]. The HCN gas is one of the most essential molecules in the production of greenhouse gases. It is dangerous due to its high toxicity in the atmosphere [2]. The appropriate diagnosis with effective gas sensors has become an important issue, and the rapid detection of HCN molecules using high-sensitivity sensors is considered. The detection and control of toxic gases with several adsorbents are well-established methods [3]. The development of new technologies for the removal of HCN gas at low temperatures and the control of pollution caused by this toxic gas is significant [4], and the development of new technologies to control or eliminate toxic gases has attracted the attention of many researchers [5]. As a result, better, more energy-efficient, and 1816 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate environmentally friendly methods are required [6]. In recent decades, scientists have explored four main approaches—adsorption, combustion, catalytic hydrolysis, and catalytic oxidation—to control and reduce harmful gases. Among these techniques, adsorption has gained particular attention because of its ease of use and high effectiveness in eliminating toxic gases. This process is currently one of the most widely used methods [4]. In recent years, the adsorption of HCN molecules on various adsorbents such as graphene, boron nitride nanotubes (BNNT), phosphorus contaminated with numerous metals, silicon carbide nanotubes, and copper oxide nanoparticles have been studied [7]. Among to be the proposed adsorbents, heptazine-based g-C3N4 has been found the best option for HCN adsorbing [8]. The g-C3N4 is a polymeric material composed of a bond of carbon and nitrogen atoms [9]. G-C3N4 possesses several remarkable characteristics, including low cost, a porous framework, non-toxic nature, thermal stability up to 550 °C, and durable physical and chemical behavior—even in acidic environments. It also offers favorable mechanical strength and electronic properties [10]. These features make g-C3N4 an effective adsorbent for capturing harmful gas molecules [11]. To enhance its performance, various approaches have been employed, such as combining it with other semiconductors, modifying its structure, and doping it with metallic or non-metallic elements [12]. Research findings indicate that HCN gas binds strongly to Si2BN with an adsorption energy of -1.59 eV [13]. In Fe-doped g-C3N4, electrons move from the Fe atom to the π* orbital of the HCN molecule during adsorption [14]. Additionally, g-C3N4 modified with osmium (Os) has been proposed as a promising material for detecting and sensing HCN gas [1]. Zhu et al. [15] studied the absorptivity, structure properties, electron states, and charge transfer of HCN on the pristine and Mo-doped g-C3N4 using DFT calculations. The HCN adsorption on the pristine g-C3N4 was weak, while with the embedding of Mo atoms, the adsorption energy was significantly increased. However, Mo-modified g-C3N4 showed a greater affinity for the adsorption of NO molecules than the other toxic gases. Zeng and colleagues [16] investigated how HCN interacts with Al-, Cu-, and Ni-doped boron nitride nanotubes (BNNTs) using density functional theory (DFT). Their findings suggested that these modified BNNTs could function effectively as sensors for HCN detection, with Cu-doped BNNTs showing the highest performance in removing this hazardous gas. In another study, Kuang et al. [5] analyzed the adsorption behavior of HCN on phosphorene doped with Li, Mg, Al, Pt, and Ni through ab-initio methods. The results demonstrated that doped phosphorene structures successfully captured HCN, with the Al-doped variant proving particularly efficient for gas elimination. Basharnavaz and co-authors [10] explored HCN adsorption on both pure and TM-doped g-C3N4. Their research showed that doping with transition metals and subsequent HCN adsorption caused distortion in the originally flat structure of g-C3N4. Among the doped systems, Pt-modified g- C3N4 exhibited strong interaction with HCN, indicating high adsorption energy. Additionally, Pang et al. [17] evaluated graphene-based nanomaterials for HCN adsorption. Their results indicated that these materials offer rapid sensing responses and high sensitivity, making them suitable for use in gas detection applications. Chen et al. [18] studied how HCN gas interacts with WSe2 monolayers that were doped with different metals (Ag, Fe, As, Mo, and Au) using density functional theory (DFT). They identified the most effective doping positions and analyzed the systems using molecular orbitals, density of states (DOS), and charge transfer. Among the various doped materials, only the Mo-doped WSe2 showed chemisorption with HCN, suggesting its strong potential for gas capture. Adsorption also caused noticeable changes in electrical conductivity, making it useful for sensing applications. These results imply that metal-doped WSe2, especially with Ag, Fe, As, Mo, and Au, can be promising materials for detecting HCN gas. In a separate study, the adsorption behavior of several gases including HCN, NH3, NO2, and Cl2 was explored on Mo- and Ag-doped WSe2 monolayers [19]. The findings showed that both doped materials could adsorb these gases effectively. Chemisorption was particularly evident for the gases on Mo-WSe2, supported by changes in molecular structure, charge transfer, and suitable adsorption energies. The research also revealed that Mo-doped WSe2 performed better than Ag-doped WSe2 in adsorbing HCN, NO2, and NH3, while Ag-WSe2 was more effective for Cl2. Among all gases tested, NO2 showed the strongest adsorption on both Mo- and Ag-modified WSe2 layers. 1817 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate Yadav [20] evaluated and compared the gas sensing capabilities of pure and silicon-doped boron nitride nanoplates (Si/BNNs) for detecting various toxic gases. The observed adsorption strength followed the order: O3 > NO > SO2 > CO > NO2 > N2O > HCN > CO2. During gas sensing, atomic charges were calculated to investigate charge transfer. To investigate the sensing process thermodynamics, the energy associated with the sensing gas molecules on the nanoplate was calculated. Due to the additional free electron density on the Si atom, the sensing behavior of BNNs was enhanced. Therefore, this computational insight can be used to design highly efficient sensors regarding selectivity, sensing activity, and stability.Rhrissi, et al. [21] checked the adsorption performance of HCN and H2S gases on WS2 embedded with Nb and Co using DFT. They found that HCN is better adsorbed on Nb-embedded WS2, while H2S has higher adsorption on Co-embedded WS2. The gallium nitride nanosheets (GaNNS) integrated into transition metals (chromium, iron, nickel, and zinc) measured HCN, HNC, and CH3CN. Perdew-Burke-Ernzerhof/Grimme-corrected using binary number plus polarization (PBE/DNP) theory was used for this measurement [22]. The structural parameters, electronic properties, charge transfer, adsorption and band gap energies, and DOS curves were analyzed to find the ability of eight metal-doped GaNNS in sensing and adsorbing HCN, CH3CN, and HNC gases. The adsorption energy was increased after the doping of metals in all eight metal-doped configurations. The adsorption energy in 2-HNC-FeNGaNNS, 2-HCN-FeNGaNNS, and 2-CH3CN-FeNGaNNS was more than others. FeNGaNNS was the best candidate for removing and adsorbing all studied gases. Moreover, FeGaGaNNS had a high potential for sensing HNC and CrNGaNNS for sensing CH3CN and HCN. Al- Fahemi, et al. [23] studied the geometrical structure, thermodynamic properties, absorption energy, magnetic properties, and charge transfer of monolayer diatomic catalyst (Fe2@C2N) and carbon nitride C2N by absorbing NO, CO, HCN, SO2, and CS2 using DFT-D3 and DFT methods. They found that the Fe2@C2N monolayer with high adsorption energy is more efficient. Based on the above discussions, the interaction of SO2 and NO on Fe2@C2N led to more charge transfer and adsorption energy than HCN, CO, and CS2 on Fe2@C2N. The Eads using different adsorbents is tabulated in Table 1 [5, 10, 13, 15, 16, 23, 24]. This table reveals that HCN adsorption on the Mo-decorated g-C3N4 achieves the highest Eads of -2.22 eV [15]. 1818 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate Table 1. Energy of HCN adsorption on various adsorbent materials. Adsorbent type Eads (eV) Software type Phase Year Ref. CNT +0.06 DFT Solid 2015 Srivastava, et al. [25] Beryllium oxide nanotube (BeONT) -0.14 Gaussian 09 Gas 2016 Marvi, et al. [26] Polythiophene -0.10 Gaussian 09 Gas 2016 Shokuhi Rad, et al. [27] Zinc oxide nanotube -0.70 Gaussian 09 Gas 2017 Shahabi and Raissi [28] B36 sheet -1.01 Gaussian 09 Gas 2017 Omidvar [29] Pure graphene -0.03 Gaussian 09 Gas 2018 Tabtimsai, et al. [30] La-doped graphene -086 Sc-doped graphene -1.01 Zr-doped graphene -1.05 Hf-doped graphene -1.19 Nb-doped graphene -1.20 Ti-doped graphene -1.23 V-doped graphene -125 Y-doped graphene -1.48 Ta-doped graphene -1.60 Pure BNNT -0.24 Quantum Espresso Solid 2018 Habibi-Yangjeh and Basharnavaz [31] Pd-doped BNNT -1.20 Ni-doped BNNT -1.39 Pt-doped BNNT -1.54 Pure g-C3N4 -0.29 Quantum Espresso Solid 2018 Basharnavaz, et al. [10] Ni-embedded g-C3N4 -1.84 Pd-embedded g-C3N4 -0.97 Pt-embedded g-C3N4 -1.98 Pure (8,0) BNNT -0.36 DFT Solid 2019 Zeng, et al. [16] Ni-doped (8,0) BNNT -1.40 Cu-doped (8,0) BNNT -1.91 Al-doped (8,0) BNNT -1.58 Al-decorated phosphorene -2.16 DFT Solid 2019 Kuang, et al. [5] Mo-decorated g-C3N4 -2.22 VESTA Solid 2020 Xu, et al. [15] Si2BN -1.59 DFT Solid 2020 Javdani, et al. [13] Ti/SV-N3 graphene -1.23 DFT Solid 2022 Lei, et al. [32] C18 nanocluster -0.61 Gaussian 09 Solid 2022 Vadalkar, et al. [33] Carbon nanocone doped with a gallium -0.68 DFT Solid 2023 Moghaddam, et al. [34] h-BN@Fe/HCN -1.31 DFT Solid 2024 Zhu, et al. [35] Fe2@C2N -1.549 DFT and DFT-D3 Solid 2024 Al-Fahemi, et al. [23] A survey of the literature reveals that the adsorption behavior of HCN on pristine as well as Cr-, Mo-, and W-doped g-C3N4 has not yet been explored. Therefore, this study focuses on investigating the adsorption characteristics of HCN on g-C3N4 modified with these transition metals to identify the most effective material for detecting and capturing this gas. 1.1. Computational procedure In this research, all relaxed calculations are conducted using the Quantum Espresso (QE) simulation package based on DFT computation. The generalized gradient approximation (GGA) based on the exchange-correlation function (PBE) was employed to describe the correlation and exchange effects. The cut-off kinetic energy set equal to 80 (Ry) was selected. In addition, to integrate the Brillouin zone, sampling of k points was performed using a 1×1×7 grid by the Monkhorst-Pack plan for structural optimization. To avoid interaction between the layers, a vacuum gap of 20 Å was introduced between them. 1819 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate The overall adsorption energy (Eads) of HCN on both pristine and metal-modified g-C3N4 was determined according to Equation (1). Eads = EHCN−modified g−C3N4−Emodified g−C3N4 − EHCN (1) Where, EHCN−modified g−C3N4 is the energy of HCN adsorbed on modified g-C3N4, Emodified g−C3N4 and EHCN are the energy of modified g-C3N4 and the total energy of free HCN, respectively [10]. 2. Results and Discussion In this work, the adsorption behavior of HCN on pristine as well as Cr-, Mo-, and W-doped g-C3N4 was investigated through first-principles calculations. Literature review indicates that the heptazine- based form of g-C₃N₄ exhibits greater stability compared to triazine-based variants, which aligns with previous theoretical findings. Figure 1 presents the optimized unit cell structure of g-C3N4, comprising six carbon (C) atoms and eight nitrogen (N) atoms [10]. The carbon atoms are represented by gray spheres, while nitrogen atoms are shown in blue. This 1×1 unit cell contains three distinct nitrogen types: N_edge, N_bridge, and N_inner. Both N_inner and N_bridge coordinate with three carbon atoms, whereas N_edge bonds with two carbon atoms. The structure also includes two categories of carbon atoms C_inner and C_bridge where C_inner connects to N_inner and C_bridge links to N_bridge atoms. From the optimization, the relaxed lattice parameter was calculated as 7.40 Å, which is consistent with both theoretical predictions and experimental data [10]. Figure 1. The energy-minimized unit cell of heptazine-type g-C3N4. Figure 2 illustrates the relaxed configurations of both pristine and Cr-, Mo-, and W-doped g-C3N4 systems before and after HCN adsorption. In the figure, nitrogen and carbon atoms are represented by blue and yellow spheres, respectively. The Mo and W atoms are positioned nearly symmetrically within the cavities of the g-C3N4 structure, whereas the Cr atom induces an asymmetric coordination environment. This behavior can be attributed to atomic size: larger atoms tend to occupy the cavity center, facilitating better electron exchange with neighboring nitrogen atoms. Notably, Mo and W possess larger atomic radii compared to Cr, which affects their placement and interaction within the lattice. The Mo and W elements interact with all N_edge atoms, and located approximately in the center 1820 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate of the g-C3N4 cavity. In contrast, the Cr element is bonded to two N atoms and has less electron exchange with the surrounding N atoms than the other two. The optimized configurations indicate that the adsorption of HCN on modified g-C3N4 leads to notable structural alterations in the material. Importantly, HCN binding through the nitrogen atom is stronger compared to adsorption via the hydrogen atom. Literature reports suggest that the curved form of g-C3N4 exhibits greater stability than its planar counterpart [4, 10, 36]. Among the doped systems, W-modified g-C3N4 demonstrates the highest adsorption energy for HCN, which can be attributed to enhanced orbital overlap and increased electron transfer between the adsorbent and the adsorbate [10, 37, 38]. Figure 2. Optimized structure of pristine and TM-modified g-C3N4 structures before and after adsorption of HCN. The total induced magnetic moment (Mtot), structural parameters, electronic properties, Fermi energy (EF), band gap (Eg), and Lowdin charge analysis for both pristine and transition metal (TM)- doped g-C3N4 before and after HCN adsorption have been computed and are summarized in Table 2. Upon HCN adsorption on the TM-modified g-C3N4, a notable reduction in the magnetic moment is observed. Specifically, the magnetic moment in the W-doped g-C3N4 with adsorbed HCN drops to zero, which is attributed to the strong orbital hybridization between tungsten and the HCN molecule. 1821 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate Furthermore, doping g-C3N4 with transition metals shifts the Fermi level from -1.191 eV in the pristine structure closer to the conduction band edge. Table 2. Structural parameters including EF, Eg, Mtot, Eads, and Lowdin charge for adsorption of HCN in pristine g-C3N4 and Cr-, Mo-, and W-modified g-C3N4. The Eads of HCN on pristine as well as Cr-, Mo-, and W-doped g-C3N4 are calculated to be -0.281, - 2.213, -2.326, and -3.104 eV, respectively. In the case of pristine g-C3N4, HCN exhibits weak physical adsorption, whereas the interaction becomes considerably stronger on TM-modified surfaces. The Edas values for HCN on pristine and TM-doped g-C3N4 are greater than and less than -1 eV, respectively, indicating physical adsorption in the former and chemical adsorption in the latter [10, 37, 38]. Consequently, W-doped g-C3N4 emerges as a promising material for both detecting and removing HCN from the environment (see Table 2). The bond distances between the TM atoms (Cr, Mo, W) and the nitrogen atom of HCN are 1.651, 1.031, and 1.958 Å, respectively. Moreover, the C–N bond length in the HCN molecule adsorbed on W- modified g-C3N4 is longer compared to the Cr- and Mo-modified systems. Specifically, upon adsorption on W-doped g-C3N4, the C–N bond stretches from 1.140 Å (in free HCN) to 1.170 Å. Based on the Lewis structure (H–C≡N:), the nitrogen atom possesses a lone pair of electrons, making it more electronegative than the hydrogen and carbon atoms. This lone pair interacts with the d orbitals of the transition metal dopant. These findings suggest that the interaction between HCN and W-modified g- C3N4 is stronger than that with other TM-doped or pristine variants. The Eg calculated for pristine g-C3N4 equals 1.200 eV, less than the experimental amount (2.70 eV) reported in Zhu, et al. [24]. It is attributed to the exchange performance of PBE correlation which always considers a smaller Eg [10, 17, 39]. As shown in Table 2, the Eg energy of the g-C3N4 structure after embedding Cr, Mo, and W is 0.30, 0.29, and 0.28 eV, respectively. This phenomenon is due to the overlapping between orbitals of g-C3N4 and TM atoms. Furthermore, after the adsorption of HCN, the Eg of the pristine and modified g-C3N4 systems significantly decreases, which leads to an increment in their conductivity. Table 2 summarizes the Lowdin charge analysis of HCN molecules interacting with g-C3N4 systems before and after adsorption to assess the charge transfer between the TM-doped substrates and HCN. It is observed that the carbon and nitrogen atoms in HCN acquire more negative charges following adsorption. Additionally, the nitrogen atoms in g-C3N4 exhibit increased positive charge compared to the pristine structure after HCN binding. This indicates that electrons are transferred from the TM- doped g-C3N4 to the molecular orbitals of HCN during adsorption. The magnetic moments calculated for pristine and Cr-, Mo-, and W-doped g-C3N4, both prior to and following HCN adsorption, are also listed in Table 2. While pristine g-C3N4 shows no magnetism, a slight enhancement in magnetic Property Pristine Cr Mo W Pristine/HCN Cr/HCN Mo/HCN W/HCN EF -1.191 -0.33 -0.23 -0.16 -0.680 -0.20 -0.16 -0.14 Eg 1.200 0.30 0.29 0.28 1.100 0.27 0.25 0.14 Mtot (μB) 0.000 0.25 0.31 0.44 0.000 0.20 0.12 0.00 Eads (eV) - - - - -0.281 -2.213 -2.326 -3.104 Bond Length (Å) D(C-N) - - - - 1.140 1.164 1.167 1.170 Modified-N - - - - - 1.651 2.031 1.958 Cr-Nedge - 1.896 - - - 1.915 - - Mo-Nedge - - 2.242 - - - 2.403 - W-Nedge - - - 2.413 - - - 2.436 Lowdin Charge (esu) H(HCN) +0.265 - - - +0.250 +0.248 +0.261 +0.258 C(HCN) +0.052 - - - +0.021 +0.040 +0.041 +0.018 N(HCN) -0.120 - - - -0.169 -0.367 -0.426 -0.547 Nedge (g- C3N4) -0.339 - - - -0.248 -0.298 -0.261 -0.250 1822 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate properties is noted upon doping with Mo, Cr, and W. Interestingly, the magnetization of W-modified g- C3N4 decreases after HCN adsorption. These results highlight the significant influence of TM doping and HCN adsorption on the magnetic behavior of g-C3N4. Figure 3 displays the electronic band structures of TM-doped g-C3N4 with adsorbed HCN. The level EF, marked by red horizontal lines and set at zero eV, shifts upon doping and gas adsorption. The introduction of Cr, Mo, and W atoms, along with HCN adsorption, generates new energy states near EF, altering the electronic characteristics and enhancing conductivity. Since the conduction and valence bands cross the Fermi level, these modified systems exhibit metallic conductivity. Figure 3. Spin-polarized band structures of pristine and TM-doped g-C3N4 before and after HCN adsorption. The results of Partial density of states (PDOS) for the orbitals of N elements in HCN-adsorbed and TM-modified g-C3N4 systems reveal the details of the interaction between g-C3N4 and HCN molecules (Figure 4). The charge density for the s and p orbitals of the N atoms after adsorption of HCN gas near the EF does not change significantly. It is due to the weak interaction between pristine g-C3N4 system and HCN molecules. Additionally, the simulation results reveal that by embedding TM in the structure of g-C3N4, the interaction between orbitals of TM and g-C3N4 is significantly increased. Therefore, the charge density near the Fermi level for the modified g-C3N4 systems is remarkably enhanced. Furthermore, with the adsorption of HCN, the overlapping between orbitals of HCN and g-C3N4 is boosted, thus the electronic densities adjacent to the Fermi level for HCN-adsorbed is more than in the modified g-C3N4 compounds. According to these results, the electronic conductivity of g-C3N4 is significantly increased by embedding TM elements. 1823 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate Figure 4. PDOS Nedge atoms of pristine and TM-modified g-C3N4 structures. 3. Conclusion In this study, the adsorption behavior of HCN on both pristine and TM-modified heptazine-based g- C3N4 was investigated through DFT employing ab-initio solid-state calculations. Analysis of the relaxed geometries indicated that Mo and W atoms are positioned nearly symmetrically within the g-C3N4 cavities, whereas Cr induces an asymmetric coordination environment. Additionally, the optimized structures demonstrated that HCN adsorption on pristine and TM-doped g-C3N4 causes noticeable structural deformation, transforming the originally planar sheets into curved configurations. Moreover, doping with TM atoms and the adsorption of HCN introduce new electronic states close to the Fermi level, which alter the material’s electronic properties and enhance its conductivity. The PDOS analyses revealed a significant increase in electron density near the Fermi level upon TM incorporation and HCN adsorption. Among the modified systems, the interaction between HCN and W-doped g-C3N4 was strongest, with adsorption energy of -3.104 eV, surpassing those of Cr- and Mo-doped counterparts. 1824 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate These findings suggest that W-modified g-C3N4 is a highly promising material for effective detection and removal of HCN gas from the environment. Transparency: The authors confirm that the manuscript is an honest, accurate, and transparent account of the study; that no vital features of the study have been omitted; and that any discrepancies from the study as planned have been explained. This study followed all ethical practices during writing. Copyright: © 2025 by the authors. This open-access article is distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). References [1] H. Basharnavaz, A. Habibi-Yangjeh, and M. Pirhashemi, "Graphitic carbon nitride as a fascinating adsorbent for toxic gases: a mini-review," Chemical Physics Letters, vol. 754, p. 137676, 2020. [2] L. Wang et al., "Using DFT to explore the sensitivity of WSe2/phosphorene heterostructure toward HCN," Applied Surface Science, p. 157652, 2023. [3] S. F. Rastegar, A. A. Peyghan, and N. L. Hadipour, "Response of Si-and Al-doped graphenes toward HCN: a computational study," Applied surface science, vol. 265, pp. 412-417, 2013. [4] H.-Z. Wu, S. Bandaru, J. Liu, L.-L. Li, and Z. Wang, "Adsorption of H2O, H2, O2, CO, NO, and CO2 on graphene/g- C3N4 nanocomposite investigated by density functional theory," Applied Surface Science, vol. 430, pp. 125-136, 2018. [5] A. Kuang et al., "Adsorption and decomposition of metal decorated phosphorene toward H2S, HCN and NH3 molecules," Applied Surface Science, vol. 473, pp. 242-250, 2019. [6] Q. Wang et al., "Catalytic oxidation and hydrolysis of HCN over LaxCuy/TiO2 catalysts at low temperatures," Microporous and Mesoporous Materials, vol. 282, pp. 260-268, 2019. [7] Q. Zhou et al., "A DFT study of Zr2CO2/MoS2 heterostructures as gas sensors to HCN," Colloids and Surfaces A: Physicochemical and Engineering Aspects, vol. 673, p. 131870, 2023. [8] L. B. Shi, Y. P. Wang, and H. K. Dong, "First-principle study of structural, electronic, vibrational and magnetic properties of HCN adsorbed graphene doped with Cr, Mn and Fe," Applied Surface Science, vol. 329, pp. 330-336, 2015. [9] J. Zhu, P. Xiao, H. Li, and S. A. Carabineiro, "Graphitic carbon nitride: synthesis, properties, and applications in catalysis," ACS applied materials & interfaces, vol. 6, no. 19, pp. 16449-16465, 2014. [10] H. Basharnavaz, A. Habibi-Yangjeh, and M. Mousavi, "Ni, Pd, and Pt-embedded graphitic carbon nitrides as excellent adsorbents for HCN removal: a DFT study," Applied Surface Science, vol. 456, pp. 882-889, 2018. [11] H. Basharnavaz, A. Habibi-Yangjeh, and S. H. Kamali, "Fe, Ru, and Os‒embedded graphitic carbon nitride as a promising candidate for NO gas sensor: A first-principles investigation," Materials Chemistry and Physics, vol. 231, pp. 264-271, 2019. [12] L. Jiang et al., "Doping of graphitic carbon nitride for photocatalysis: a review," Applied Catalysis B: Environmental, vol. 217, pp. 388-406, 2017. [13] Z. Javdani, H. Salehi, and P. Amiri, "Effects of the HCN adsorption on the structural and electronic parameters of the Si2BN: Density functional theory studies," Applied Surface Science, vol. 527, p. 146941, 2020. [14] Y. Tang, Z. Liu, Z. Shen, W. Chen, D. Ma, and X. Dai, "Adsorption sensitivity of metal atom decorated bilayer graphene toward toxic gas molecules (CO, NO, SO2 and HCN)," Sensors and Actuators B: Chemical, vol. 238, pp. 182- 195, 2017. [15] Y. Xu et al., "Adsorption behaviors of HCN, SO2, H2S and NO molecules on graphitic carbon nitride with Mo atom decoration," Applied Surface Science, vol. 501, p. 144199, 2020. [16] B. Zeng, W. Li, H. Chen, and G. Li, "First-principles study on the adsorption of hydrogen cyanide on the metal-doped (8, 0) boron nitride nanotubes," Chemical Physics Letters, vol. 730, pp. 513-520, 2019. [17] J. Pang et al., "DFT coupled with NEGF study of ultra-sensitive HCN and HNC gases detection and distinct I–V response based on phosphorene," Physical Chemistry Chemical Physics, vol. 19, no. 45, pp. 30852-30860, 2017. [18] J. Chen, J. Chen, W. Zeng, and Q. Zhou, "Adsorption of HCN on WSe2 monolayer doped with transition metal (Fe, Ag, Au, As and Mo)," Sensors and Actuators A: Physical, vol. 341, p. 113612, 2022. [19] S. Cheng, J. Chen, W. Zeng, and Q. Zhou, "The adsorption and sensing mechanism of toxic gases HCN, NO2, NH3 and Cl2 on Mo, Ag-modified WSe2 monolayer: insights from the first-principles computations," Materials Today Communications, vol. 35, p. 105906, 2023. [20] A. Yadav, "Silicon-doped boron nitride nanosheets for enhanced toxic gas sensing: an ab initio approach," Silicon, vol. 15, no. 4, pp. 1847-1857, 2023. https://creativecommons.org/licenses/by/4.0/ 1825 Edelweiss Applied Science and Technology ISSN: 2576-8484 Vol. 9, No. 9: 1815-1825, 2025 DOI: 10.55214/2576-8484.v9i9.10220 © 2025 by the authors; licensee Learning Gate [21] I. Rhrissi, A. Bouhmouche, Y. Arba, A. Saeedi, and R. Moubah, "Tailoring gas sensing properties of WS2 monolayer via Nb and Co embedding for highly sensitive and selective detection of HCN and H2S gases: a first principle study," Physica Scripta, vol. 98, no. 12, p. 125973, 2023. [22] M. Yekta, M. A. Zanjanchi, and H. Roohi, "Adsorption of HCN, HNC and CH3CN toxic gases on the M-doped (M= Cr, Fe, Ni and Zn) GaNNS: A DFT-D study," Colloids and Surfaces A: Physicochemical and Engineering Aspects, vol. 684, p. 133120, 2024. [23] J. H. Al-Fahemi, K. A. Soliman, and S. A. Aal, "Insights into different toxic molecular gases on the Fe-dimer anchored at C2N monolayer as potential sorbents and gas sensors: a theoretical approach," Journal of Physics and Chemistry of Solids, vol. 184, p. 111720, 2024. [24] B. Zhu, L. Zhang, B. Cheng, and J. Yu, "First-principle calculation study of tri-s-triazine-based g-C3N4: a review," Applied Catalysis B: Environmental, vol. 224, pp. 983-999, 2018. [25] A. Srivastava, V. Sharma, K. Kaur, M. S. Khan, R. Ahuja, and V. Rao, "Electron transport properties of a single- walled carbon nanotube in the presence of hydrogen cyanide: first-principles analysis," Journal of molecular modeling, vol. 21, pp. 1-7, 2015. [26] M. Marvi, H. Raissi, and H. Ghiassi, "Effects of the HCN adsorption on the structural and electronic parameters of the beryllium oxide nanotube," Structural Chemistry, vol. 27, pp. 557-571, 2016. [27] A. Shokuhi Rad, M. Esfahanian, E. Ganjian, H.-a. Tayebi, and S. B. Novir, "The polythiophene molecular segment as a sensor model for H 2 O, HCN, NH 3, SO 3, and H 2 S: a density functional theory study," Journal of molecular modeling, vol. 22, pp. 1-8, 2016. [28] M. Shahabi and H. Raissi, "Assessment of DFT calculations and molecular dynamics simulation on the application of zinc oxide nanotube as hydrogen cyanide gas sensor," Journal of Inorganic and Organometallic Polymers and Materials, vol. 27, no. 6, pp. 1878-1885, 2017. [29] A. Omidvar, "Borophene: a novel boron sheet with a hexagonal vacancy offering high sensitivity for hydrogen cyanide detection," Computational and Theoretical Chemistry, vol. 1115, pp. 179-184, 2017. [30] C. Tabtimsai, T. Somtua, T. Motongsri, and B. Wanno, "A DFT study of H 2 CO and HCN adsorptions on 3 d, 4 d, and 5 d transition metal-doped graphene nanosheets," Structural Chemistry, vol. 29, pp. 147-157, 2018. [31] A. Habibi-Yangjeh and H. Basharnavaz, "Adsorption of HCN molecules on Ni, Pd and Pt-doped (7, 0) boron nitride nanotube: a DFT study," Molecular Physics, vol. 116, no. 10, pp. 1320-1327, 2018. [32] M. Lei, H. Ren, S. Luo, W. Yang, and Z. Gao, "Analysis of the adsorption characteristics of gasification pollutants (HCl, COS, H2S, NH3 and HCN) on Ti-anchored graphene substrates," Surface Science, vol. 725, p. 122148, 2022. [33] S. Vadalkar, D. Chodvadiya, K. N. Vyas, and P. K. Jha, "Adsorption of HCN on pristine and Al/Si/P decorated C18 nanocluster: a first principles study," Materials Today: Proceedings, vol. 67, pp. 229-237, 2022. [34] F. A. Moghaddam, M. Babazadeh, E. Vessally, E. Ghasemi, and S. A. Shendy, "An efficient HCN gas sensor by functionalized, decorated, and doped carbon nanocone strategy: A theoretical study," Inorganic Chemistry Communications, vol. 156, p. 111118, 2023. [35] P. Zhu, J. Zhao, W. Yu, and Y. Zhu, "First-principles study of CH2O, CH4, Cl2, HCN, and CNCl gas adsorption behavior by h-BN boron site modification," Computational and Theoretical Chemistry, p. 114657, 2024. [36] H.-Z. Wu, L.-M. Liu, and S.-J. Zhao, "The effect of water on the structural, electronic and photocatalytic properties of graphitic carbon nitride," Physical Chemistry Chemical Physics, vol. 16, no. 7, pp. 3299-3304, 2014. [37] G. Imanzadeh, H. Basharnavaz, A. Habibi-Yangjeh, and S. H. Kamali, "Adsorption behavior of H2S on P‒doped, V/P, Nb/P, and Ta/P‒codoped graphitic carbon nitride: A first-principles investigation," Materials Chemistry and Physics, vol. 252, p. 123117, 2020. [38] M. Yousefi, M. Faraji, R. Asgari, and A. Z. Moshfegh, "Effect of boron and phosphorus codoping on the electronic and optical properties of graphitic carbon nitride monolayers: first-principle simulations," Physical Review B, vol. 97, no. 19, p. 195428, 2018. [39] G. Nie, P. Li, J.-X. Liang, and C. Zhu, "Theoretical investigation on the photocatalytic activity of the Au/g-C3N4 monolayer," Journal of Theoretical and Computational Chemistry, vol. 16, no. 02, p. 1750013, 2017.