## Introduction

In recent decades, chemosensors and biosensors have been studied intensely due to the increasing importance of safety precautions and environmental protections. Sensors have been used in many industries for the detection of harmful compounds. Nitrogen dioxide (NO2) with a biting odor is considered as one of the most vital noxious gases in terms of air pollution. Also, it is used for the commercial production of nitric acid. Hence, modern society has a strong motivation to explore more sensitive NO2 detectors for controlling its impact on the environment and protection of human health and safety1. Various types of sensors are actively studied for this purpose. Some well-established classes of detectors including solid electrolytes, electrochemical sensors, graphene-based systems, as well as metal oxides have been introduced2.

Novel nanostructured and two-dimensional (2D) materials are actively pursued toward different optical and sensing applications3,4,5,6,7,8,9,10,11. Investigations of black phosphorus structures have been carried out by many researchers after its successful fabrication for different optical, biomedical, and environmental applications12,13,14,15,16,17. These 2D nanomaterials have outstanding heat as well as electron conductivities due to their great anisotropic properties18,19,20,21. Moreover, black phosphorus possess appropriate chemical and fire resistance22,23.

With regard to NO2, efficient detectors have been introduced, which have been reviewed elsewhere1. The research on such sensors is of great interest in different research groups exploring the properties of 2D materials18,24,25,26,27. Black phosphorus itself has provided physisorption capabilities for several gases, such as NO218,28. However, BP has been recorded to outperform molybdenum disulfide (MoS2) for the nitrogen dioxide analysis in terms of the sensitivity threshold and quick regeneration29. An increased conductance sensitivity down to 5 ppb of nitrogen dioxide has been recorded for the multilayer BP detector30. In another study of nitrogen dioxide adsorption capabilities, Si embedding into graphene was quite effectual31. another study has shown that graphene/NiO heterostructures were helpful for NO2 sensing32. Similarly, the NiO-decorated BP slab has shown (116 times) stronger adsorption relative to the pristine layer for nitrogen dioxide capture and catalysis18. Aluminum decoration of BP has also shown useful for the capture of this toxic molecule with the adsorption energy of 3.96 eV33. Recently, the SnO monolayer slab has been presented to be auspicious for nitrogen dioxide capture and monitoring34. Among 2D nanomaterials, gallium nitride demonstrated significant bandgap alterations of 1.65 eV after the exposure to nitrogen dioxide35. Recently, the effectiveness of defect and ZnO species incorporation into the BP monolayer was shown for the NO2 monitoring and removal, respectively19.

Doping is a useful tool for the modulation of the anisotropic characteristics of the 2D materials for the sensing applications. For instance, Zhou et al. have found that the embedding of transition metals, particularly Ti and Au, can significantly enhance the chemical reactivity of graphene, thus leading to activation of the NO2 molecule for the graphene-based catalysis applications36. One may reasonably postulate that the effective doping of black phosphorus can enhance its capabilities toward the adsorption of NO2 molecule. In spite of the intriguing characteristics of black phosphorus, still little is known about the possible effects of such modifications on either the adsorption strength or sensitivity. In the same line, we explored the effects of alkali metal (Li, Na, and K) doping of BP monolayer on the sensitivity to the NO2 molecule. The nitrogen dioxide detection using black phosphorene has not been studied conclusively. The current research study deals with investigation of different BP structures in terms of the electronic as well as energetic properties for nitrogen dioxide adsorption.

As will be shown in the following, the suggested modifications can make substantial improvements in both the adsorption and sensing of NO2 on black phosphorene depending on the alkali metal employed. In a broader sense, the reported data would help supply a deeper understanding for the rational development of novel phosphorene-based nanomaterials for the adsorption and sensing of gaseous pollutants.

## Results and discussion

Several BP-based sensors have been inspected here, which include the pristine (BP) and alkali-doped M-BP nanomaterials (M = Li, Na, K). The methodology for the construction of the sensors is given in the Supplementary Information. Several modifiers, including transition metal (TM) elements, have been examined in the phosphorene functionalization and doping, as reviewed elsewhere13. Here, we have chosen the lightest members of the alkali metals, being among the ten most abundant elements in Earth crust37. As such, the modifications at hand would be less expensive and environmentally benign.

The sensors with optimized geometries at the rest and operating conditions are shown in Fig. 1. From Fig. 1, we observe that the nitrogen dioxide molecule interacted through its two O atoms with the P atoms of the unmodified pristine layer while stabilizing in the armchair orientation with the O–N–O plane (P1). The stabilization of the NO2 molecule on the M-doped sensors was different. Notably, the related structure with Li-BP was the most different such that the molecule preferred a vertical arrangement with respect to the surface while interacting through an O atom (P2). This observation is in correspondence with the absence of the 3d orbitals in lithium and the lower protrusion of the Li atom compared to the other dopants (vide infra). The NO2 molecule on both Na-BP and K-BP was optimized more similarly to P1 except that the O–N–O angle was stabilized in the zigzag direction, with one of the oxygen atoms tending to approach the dopant center (P3 and P4). In both cases, the adsorption of NO2 molecule also led to the more projection of the metal atom away from the surface (vide infra); but, the solid matrix integrity was not lost in either case owing to the small distortions.

The formation energy values for the M-BP materials were calculated as follows:21,38

$$E_{{{\text{form}}}} = \, (E_{{{\text{M}} - {\text{BP}}}} + \mu_{{\text{P}}} ) \, {-} \, (E_{{{\text{BP}}}} + \mu_{{\text{M}}} ).$$
(1)

Here, EBP and EM-BP denote the total energies of the unmodified and alkali-doped BP slabs.; the symbol µP denotes the chemical potential of phosphorus. The pure phosphorene chemical potential was considered in this study. The symbol µM refers to the chemical potential of the M dopant. The energetics of the nitrogen dioxide molecule on various phosphorene-based structures was determined as follows:21,39,40,41

$$\Delta E_{{{\text{ads}}}} = E_{{{\text{op}}}} {-} \, \left( {E_{{{\text{gas}}}} + E_{{{\text{sensor}}}} } \right)$$
(2)

in which the subscript op refers to the adsorption configuration (the operating device), and gas denotes the nitrogen dioxide molecule.

The energetic data have been supplied in Table 1. The formation energy for the incorporation of alkali metal was predicted to be negative in all cases indicating that the incorporation of these metal elements into the structure would be highly favorable, and high doping concentrations are plausible thermodynamically. The sequence of Na-BP < K-BP < Li-BP was found for the energetic favorability of the modification. In spite of the fact that the adsorption of nitrogen dioxide on the pristine layer was weak, the gaseous molecule was almost tightly chemisorbed on the alkali-modified sensor, and the adsorption strength was sequenced as BP < Li-BP < K-BP < Na-BP (up to − 24.36 kcal/mol at HSE06/TZVP). The equilibrium distance for the NO2 molecule varied in the range of 0.31–2.79 Å, inversely correlating with the adsorption strength (Table 1). It was concluded that the NO2 adsorption strength had been increased 54 times upon sodium doping. Such enhancement implies that the alkali-doping is a useful means of increasing the capability of black phosphorene for NO2 capture.

One can see from the geometrical data that the average distance for the M–P bonds increased in the order of Li-BP < Na-BP < K-BP (Table 2). Furthermore, the adsorption of NO2 led to an elongation of the r(M–P) values by 7.1%, 16.2%, and 13.4%, correlating with the adsorption strength. In the same line, the r(N–O) values increased slightly from 1.20 Å for the free molecule to 1.21, 1.23, 1.25, and 1.24 Å in P1, P2, P3, and P4, respectively. The geometrical features demonstrate that the stronger the adsorption, the shorter the adsorption distance, and the longer the M–P and N–O bonds at the adsorption site.

The induced magnetic moment in the operating mode was found to be 1.0 µB due to the stabilization of the nitrogen dioxide molecule on the surface. The spin moment (µs) contribution from nitrogen dioxide was sequenced as P3 (0.03 µB) < P4 (0.27 µB) < P2 (0.63 µB) < P1 (0.93 µB). The charge gaps of the non-magnetic structures were determined as follows:

$$E_{{\text{g}}} = E_{{{\text{LUCO}}}} {-}E_{{{\text{HOCO}}}} ,$$
(3)

where ELUCO refers to the lowest unoccupied crystal orbital (LUCO) energy level with the unit of eV. Also, EHOCO denotes the highest occupied crystal orbital (HOCO) energy level (eV). Similarly, the spin-conserving gaps for both up and down spin channels could be determined using the following equations:15

$$E_{{{\text{g}} \uparrow }} = E_{{{\text{LUCO}} \uparrow }} {-}E_{{{\text{SOCO}} \uparrow }}$$
(4)

and

$$E_{{{\text{g}} \downarrow }} = E_{{{\text{LUCO}} \downarrow }} {-}E_{{{\text{SOCO}} \downarrow }}$$
(5)

in which ESOCO denotes the single occupied crystal orbital (SOCO) energy level (eV). The nanosensor signal is determined by the alteration in the electrical conductance defined as follows:15,42,43

$${ }\sigma = {{AT}}^{{3/2}} {\text{exp}}\left( {\frac{{{{{-}E}}_{{\text{g}}} }}{{{\text{2}{k}}_{{\text{B}}} {{T}}}}} \right)$$
(6)

in which T signifies the working temperature (K), kB signifies the Boltzmann constant (eV K–1), and A represents the constant of proportionality (in electrons m–3 K–3/2). The sensors bandgaps at the off state as well as during operation are provided in Fig. 2. As evinced by these charts, all sensors kept their semiconducting nature through modification and operation, and no half-metallic behavior was induced. The bandgap of the pristine layer was obtained as 1.46 eV, which indicates that there is a great agreement between the obtained value and the experimental range (1.0–1.5 eV) for the single-layer BP nanodevice44. This observation confirms the suitability of the method applied here15,38.

The original bandgap (BP) was slightly expanded after lithium doping, but it was slightly shrunk after sodium and potassium doping (Fig. 2). However, it should be pointed out that the amount of bandgap in the up-spin channel was enlarged with the NO2 sensitivity, while it was decreased in the down-spin gap after the interaction of the analyte for all sensors. A huge variation in the bandgap was observed in the case of Li doping compared to the other cases, which implied the higher sensitivity of this sensor to the NO2 molecule. The electronic band structures of the sensors are presented in Fig. 3. The determined band structure for the pristine phosphorene was fully consistent with the Brillouin zone (BZ) data reported in the literature45, indicating the existence of a direct bandgap at the Γ point of the BZ15. A similar type of (direct) bandgap was obtained in the case of Li-BP and Na-BP. Nonetheless, the electronic band structure for the K-BP nanodevice exhibited an indirect X → Y nature. In terms of band alignment, the energy levels of the conduction band minimum (CBM) and the valence band maximum (VBM) both shifted upward upon alkali doping with the magnitude of the changes following the sequence of Li-BP < Na-BP < K-BP. The relative energy position of the Fermi level is discussed under the work function (vide infra). When the type of semiconduction was concerned, almost all metal impurities were neutral, thus retaining the intrinsic behavior of the original BP material intact. However, the analyte behaved as an acceptor and led to a p-type semiconductor in all operating cases.

The detector quality or efficiency was evaluated from the relative alterations of the bandgap:18

$$\varepsilon = { 100}\left( {\frac{{\left| {E_{g} {-}E_{0} } \right|}}{{E_{g} }}} \right)$$
(7)

in which ε represents the detector efficiency, while the initial state of the sensor was indicated by 0 and the symbol Eg is the bandgap at the operating conditions18. Based on this definition, the amount of Eg is negative when there is a shortening bandgap due to the interactions with the nitrogen dioxide. Table 2 reports the central operating data for the unmodified and alkali-doped sensors for the NO2 molecule analysis19. The absolute efficiency changed in the order of Na-BP < BP < K-BP < Li-BP, indicating the efficiency changes relative to the unmodified BP of + 95.2, − 44.6, and + 7.4% with the Li, Na, and K doping, respectively. Therefore, the Li-doped sensor has registered the highest efficiency (79.1%) for NO2 detection. So, it could be concluded that the pristine phosphorene became more capable of NO2 monitoring and removal with the incorporation of K and Li in its structure. On the basis of the intermediate adsorption energy (− 9.68 kcal/mol) released on Li-BP, it would be an ideal choice for NO2 detection (vide infra).

The sensors reusability is one of the most critical parameters in order to appraise its performance. Conventional transition state theory (TST) was applied to the calculation of the recovery time using the amount of adsorption energy:43,46

$$\tau = \nu_{0}^{{{-}1}} {\text{exp}}\left( {\frac{{{-}\Delta {{E}}_{{{\text{ads}}}} }}{{{{k}}_{{\text{B}}} {{T}}}}} \right)$$
(8)

in which ΔEads shows the adsorption energy (kcal/mol) determined from Eq. (2), and ν0 refers to the attempt frequency (s−1)18. The calculated data provided in Table 2 delineate the speed of regeneration. Although BP provided the lowest recovery time (19.3 fs), it should be mentioned that the obtained recovery period was extremely short for stable monitoring. Furthermore, the alkali-doped sensors were capable of being regenerated under visible radiation at 343 K. Interestingly, the most sensitive sensor (Li-BP) had a recovery time of 14.8 ns at these conditions. Even the calculated recovery time in the slowest case (33.2 s for Na-BP) was quite reasonable compared to the performance of novel tellurene and borophene materials47,48. Therefore, the findings point to the conclusion that the alkali doping can adjust the electronic properties of the phosphorene layer to be a sensitive and reusable sensor for nitrogen dioxide detection and monitoring. In addition, the Na-doped material would be more appropriate for NO2 removal and catalysis owing to the relatively high retention time and the stronger adsorption. Moreover, the K-BP material would be considered as an ultrasensitive sensor with reasonable reusability at mild conditions.

Table 2 shows more indicators for the evaluation of the sensors in terms of reactivity of the structures. The indicators were selected based on Koopman’s theorem43,49,50. The chemical potential is the first indicator, and can be expressed as follows:15

$$\mu = \, {-}\chi ,$$
(9)
$$\chi = \, \left( {I + A} \right)/{2} \approx {-}\left( {E_{{{\text{HOCO}}}} + E_{{{\text{LUCO}}}} } \right)/{2}$$
(10)

in which I represents the ionization potential, χ is the electronegativity, and A signifies the electron affinity. Another expression can be given for the magnetic complexes:18,51,52

$$\chi = \, {-}[(E_{{{\text{SOCO}} \uparrow }} + E_{{{\text{LUCO}} \uparrow }} ) \, + \, (E_{{{\text{SOCO}} \downarrow }} + E_{{{\text{LUCO}} \downarrow }} )]/{4}{\text{.}}$$
(11)

Also, the following equations were used for the estimation of the global hardness (Eq. 12), the spin potential at zero net spin transfer (Eq. 13), and the electrophilicity (Eq. 14):18

$$\eta = \, \left( {E_{{{\text{LUCO}}}} {-}E_{{{\text{HOCO}}}} } \right)/{2,}$$
(12)
$$\eta = \, [(E_{{{\text{LUCO}} \uparrow }} + E_{{{\text{LUCO}} \downarrow }} ) \, {-} \, (E_{{{\text{SOCO}} \uparrow }} + E_{{{\text{SOCO}} \downarrow }} )]/{4,}$$
(13)
$$\omega = \mu^{{2}} /\left( {{2}\eta } \right).$$
(14)

Table 2 contains such indicators for the four sensors at the HSE06/TZVP computational level15. The data showed that the chemical potential and electrophilicity values increased with the adsorption of the NO2 molecule. As indicated, the sensor efficiency correlated well with the electrophilicity of the operating sensor.

Another consideration is that the adsorption of nitrogen dioxide may alter the work function of the chemiresistive nanodevice. In such cases, the material would be a work function detector. Equation (15) was used for the evaluation of the changes in the work function during the detection process:19

$$\varphi = E_{{{\text{vac}}}} - E_{{\text{F}}} ,$$
(15)

where EF denotes the Fermi energy level, and Evac is the vacuum energy (the electrostatic potential in the vacuum)15. The obtained magnitudes are shown in Fig. 4. The base-case work function was 5.14 eV at the HSE06/TZVP level of theory, which was in excellent agreement with the theoretical magnitude of 5.03 eV53 and the experimental measurement of 5.30 eV54 for a single-layer phosphorene. The work function of the sensor itself was decreased in the order of K-BP < Na-BP < Li-BP < BP. Moreover, the adsorption of NO2 resulted in an enhancement in the work function of all sensors. These changes were sequenced as BP (10.4%) < Li-BP (30.5%) < Na-BP (35.6%) < K-BP (55.4%), indicating that the K-BP sensor would be an excellent work function sensor (5.3 times better than the pristine BP at the HSE06/TZVP) for the NO2 detection. Meanwhile, we note that the Na-BP has shown quite high work function sensitivity to NO2 while requiring higher temperatures for a fast recovery. Higher sensitivity and obvious reusability for nitrogen dioxide detection were obtained with the Li-doped phosphorene sensor.

The frontier molecular orbital (FMO) dispersions of the adsorption adducts are illustrated in Fig. 5. The alkali doping changed the orbital distribution, while the density localization did not occur precisely at the dopant center. Specifically, the HOCO densities of the Li-BP and K-BP sensors were changed substantially. The nitrogen dioxide molecule was involved mostly in the LUCO of P1; however, a negligible contribution in HOCO could be found for the analyte. Over the alkali-modified sensors, the NO2 molecule showed the lowest contribution to the FMO with the Li-BP surface (P2). In terms of Na-BP performance (P3), the amount of HOCO electron density located on the analyte was more significant, which also exhibited an apparent LUCO involvement by this fragment. Finally, the nitrogen dioxide adsorption on K-BP directed to a weak delocalization of LUCO toward this fragment with almost no density localization in the case of HOCO. These observations qualitatively confirm the sequence of adsorption energies explained above.

The alkali-doped phosphorene structures can be discussed in terms of the projected (PDOS) and total (TDOS) density of states, as shown in Fig. 6 for the four sensors after the exposure to nitrogen dioxide. Also shown in Fig. 6 are the overlap population (OPDOS) curves of the NO2 molecule at the surface. As one can see in these plots, the partial density plots of the NO2 molecule were almost the same in the P1 and P2 configurations, due mainly to the relatively small involvement of the (NO2) analyte in the FMO distributions (vide supra). In the P3 and P4 structures, however, the corresponding PDOS pattern upshifted by ca. 1.3 eV, thus leading to a more pronounced contribution to the lower edge of the bandgap. This observation further supports our discussion of the FMO distributions. Further in the same line, the OPDOS curve in P2 indicated the non-bonding nature over an almost wide energy range around the Fermi level. Moving to P3, however, we observed anti-bonding behavior near the Fermi level. The orbitals of nitrogen dioxide molecule and phosphorus atoms were slightly hybridized at − 8.0 eV in the bonding regions of P2. Similar behavior was observed at − 8.2 and − 19.0 eV in the case of P1. Such observation was not the case for the rest of the sensors. Overall, these explanations describe how the most sensitive sensors behave differently for NO2 detection.

## Conclusion

In summary, this article studied for the first time the comparative influence of alkali metal doping of the pristine BP layer on its performance in terms of elimination and detection of nitrogen dioxide with the aid of periodic quantum-chemical calculations. While nitrogen dioxide was stabilized in a horizontal configuration aligned in the black phosphorene armchair direction and the zigzag directions of Na-BP and K-BP, the lowest-energy configuration on Li-BP was different such that the molecule preferred a vertical arrangement with an oxygen atom pointing to the surface. The formation energies indicated the feasibility of alkali doping at high concentrations following the order of Na-BP < K-BP < Li-BP. However, the Na-BP displayed the strongest analyte chemisorption (− 24.36 kcal/mol at HSE06/TZVP). Significant correlations were found between the adsorption distance and the M–P and N–O bond length alterations with the adsorption strength. For all nanosensors investigated here, the bandgap changed oppositely depending on the spin channel. While the type of bandgap was retained after Li and Na doping, an indirect X → Y transfer preference was observed in the K-BP band structure. The Li-doped phosphorene material showed the highest sensitivity (79.1%) toward the NO2 molecule (increased by 95.2% compared to the pristine BP). Interestingly, the most sensitive material in this series (Li-BP) had an optimal recovery time of 14.8 ns at 343 K. Meanwhile, the Na-BP material was found to be more appropriate for nitrogen dioxide capture and catalysis. On the grounds of the global indicators, a connection could be established between the responsivity and the electrophilicity at the working conditions. While BP was the least effective for NO2 removal, the K-doped material was applicable for nitrogen dioxide removal and detection, while also turning out to provide the highest work function sensitivity (55.4%) for the NO2 detection. In summary, we may conclude that the Li-doped monolayer can be considered as an ultrasensitive and recoverable NO2 chemosensor. Furthermore, the potassium embedding in the BP pristine layer can transform it into a dual-purpose device for both nitrogen dioxide removal/catalysis and sensing.

## Methods

Periodic DFT computations were conducted19 in the environments of CP2K55, NWChem 6.556, Multiwfn 3.3.857, and Burai 1.3 software58. The pictorial outputs were obtained with Mercury 3.659 and Avogadro 1.2.0.60. Further details of the computational approach are given in the Supplementary Information.