Introduction

In the field of quantum information technologies, precision metrology, and imaging applications, 2D materials with semiconducting properties have emerged as a new class of optical sources offering the potential for high photon yield, excellent spectral purity, and controllable emission of coherent photons1,2,3,4,5. Among them, monolayers (MLs) of WS2, a transition-metal dichalcogenide (TMD), stand out as particularly appealing, thanks to their semiconducting character with a direct band gap in the visible range ( ≈ 2 eV)6. Furthermore, WS2 MLs can be synthesized in large flakes using common growth techniques, such as molecular beam epitaxy (MBE) or, more frequently, chemical vapor deposition (CVD)7,8,9.

WS2 MLs generally display an n-type character10 and, due to the large surface-to-volume ratio, their optoelectronic properties are strongly affected by the surrounding environment, undergoing significant modifications upon exposure to the ambient atmosphere11,12,13. Among the different gases in air, molecular oxygen has been identified as having the largest impact on WS2 properties14,15, decreasing the material conductivity16,17,18 and altering the photoluminescence (PL) emission spectra19,20,21. Notably, the PL yield of WS2 MLs experiences a significant enhancement when measurements are conducted in air as opposed to a vacuum environment14,22,23. This phenomenon has been attributed to the electron withdrawal from the material by adsorbed O2 molecules. As a result, the free electron density in the intrinsically n-type samples is reduced, promoting the formation and subsequent radiative recombination of neutral excitons, while suppressing the intensity of the negative trion peak14,20,21.

Several experiments have investigated the chemisorption of O2 on WS2 MLs22,23,24. However, being an energy-activated process, the impact of chemisorption on the PL becomes significant only at high laser power density and/or long irradiation time. Consequently, the primary contribution to the PL enhancement in air has been attributed to the spontaneous O2 physisorption on the basal plane of the material20,25. It is commonly supposed that O2 withdraws electrons when physisorbed on the pristine ML. The majority of theoretical analyses of molecular adsorption on 2D materials are performed considering pristine surfaces16,25,26,27. However, it is well-established that synthesized 2D materials exhibit a diverse array of defects. Extensive characterization efforts have been undertaken to assess the impact of these defects on the electronic28,29,30,31,32 and catalytic properties33,34,35 of WS2. The enhanced reactivity of defect sites towards a wide range of chemical species, such as H2, O2, CO2, and NO235 clearly proves the importance of defects in the adsorption process. Consequently, when describing O2 adsorption on WS2, it is crucial to include in the analysis also common defects, such as sulfur vacancies (VS) 36.

Although the role of O2 adsorption in the observed variations of the optical response of WS2 has been established, the most effective adsorption site and the proposed electron transfer mechanism at the core of this phenomenon still require a detailed elucidation. In this regard, while ab initio simulations have been considered a powerful tool for understanding molecular adsorption and electron transfer, most theoretical works on WS2 MLs have so far relied on charge population analysis (CPA), without explicitly considering the intrinsic n-doping of the MLs14,16,37. Moreover, results are rarely correlated with the analysis of band diagrams and frequently suggest carrier transfers even when the band occupation of the ML is not affected by molecular adsorption. Indeed, calculations based on CPA often highlight the transfer of negligible electron fractions, whose values strongly depend on the specific partition scheme adopted and cannot be easily converted into reasonable variations of carrier concentrations. This calls for an alternative, general, and physically sound approach to the problem, in which the intrinsic n-type of WS2, a variable defect density, and the presence of various adsorbed species at different coverages are taken into account. The outcome would be compatible with an evident change in the band occupancy and would forecast measurable variations of the electronic and optical properties.

In this work, by means of ab initio simulations based on Density Functional Theory (DFT), we propose an effective approach for the analysis of the electron transfer mechanism underlying the PL enhancement in WS2 MLs exposed to air. Firstly, the presence of S vacancies and, above all, the intrinsic n-type character of WS2 are explicitly considered in the adsorption process, improving on previous works. Secondly, we apply the formalism commonly adopted for charged defects in semiconductors38,39 to jointly describe the process of molecular adsorption and electron transfer in n-type samples. This way, the electron transfer from the ML conduction band (CB) to extrinsic surface states introduced by adsorbed molecules can be solidly determined from the variations of the Fermi level of the material. We find that the adsorption of O2 on the pristine surface of WS2 MLs is unable to mediate an electron transfer toward the molecule. Only when O2 is physisorbed on VS and the ML is n-doped, it is possible to have a charge transfer able to modify the WS2 electronic properties.

This work offers a more accurate picture of molecular physisorption and charge transfer on WS2 MLs, elucidating the behavior of ML samples exposed to air, while providing an effective and general method to evaluate the variations of the carrier concentrations in nanomaterials with adsorbed molecules.

Results

The impact of O2 on the electronic and optical properties of WS2 MLs has been attributed to the variation of the free electron concentration in the material upon molecular physisorption. Given the n-type nature of WS2 MLs, the most commonly invoked mechanism involves the transfer of electrons from the CB of WS2 to localized O2 electronic states, leading to a depletion of free electrons in the material40.

Fundamentally, the process of charge transfer between the electronic bands of the 2D material and the surface states introduced by the adsorbed molecules closely mimics the ionization of dopants in semiconductors. Similarly to the in-gap defect states of a dopant that can acquire/release carriers from/to the bands of the host material, adsorbed molecules can be responsible for in-gap extrinsic surface states whose occupancy changes upon charge transfer with the bands of the 2D material. At equilibrium, the final free electron concentration in the monolayer results from the interplay between the density of states of the pristine material and the occupancy of all possible defect states and/or molecular surface states. The Fermi level of the system is obtained by imposing the charge neutrality condition between the monolayer and all possible dopants and adsorbed species, as detailed in the “Methods” section. In this framework, the occupancy of the in-gap states naturally emerges from the balance between the free energies of formation of dopants/adsorbed species in their neutral and charged states38,39.

Configurations and Gibbs free energies of formation in neutral and charged states

We apply the discussed framework to the problem of charge modulation by molecular adsorption on WS2 MLs. We consider the presence of S vacancies, the most abundant defects in WS2 41,42,43,44,45,46,47, and different molecules (i.e., O2 and N2) adsorbed either on the pristine surface,  , or on VS, in their neutral and negatively charged states since they generate acceptor states16,29. The bare VS and the adsorbed molecules are modeled in a unified approach as point defects capable of generating in-gap states. Their ability to trap free electrons is then explored.

The list of considered systems, generically labeled as configurations, is reported in Table 1. The stability of each configuration, C, in either the neutral or charged state, as a function of the Fermi level of the host material, EF , is obtained from the corresponding charge transition level48, as described in the “Methods” section. Since the in-gap states observed in all configurations have acceptor nature, we focus on charge transition levels ϵ0/−1[C]: the neutral state of configuration C is more stable (i.e., the in-gap states do not tend to trap extra electrons) for EF < ϵ0/−1[C], while the negative state is the most stable (i.e., the in-gap states acquire one additional electron) for EF > ϵ0/−1[C]. We reference the values of EF and ϵ0/−1[C] to the valence band maximum, EVBM , of pristine WS2 ML.

Table 1 Charge transition levels ϵ0/−1 between neutral and negatively charged states and molecular adsorption energies Eads (when applicable)

O2 physisorption is initially investigated on the pristine basal plane (C =  + O2 ). Similarly to other works16,25, the most stable adsorption site on the pristine basal plane is above the W atom, with the O2 molecule almost parallel to the surface. The detailed description of the adsorption geometry is reported in Supplementary Note 1 in the Supplementary Information and the complete geometrical structures are available at49. The adsorption energy in the neutral configuration is ~−100 meV. On the contrary, the negatively charged configuration does not yield stable results (i.e., positive adsorption energy, as reported in Table 1), indicating that O2 adsorbed on the pristine basal plane cannot be regarded as a negatively charged point defect. In other words, in this arrangement, O2 cannot effectively capture free electrons from the material CB and localize them in surface states arising from the adsorbed molecule, rendering it ineffective in influencing the optoelectronic properties of WS2 MLs. This evidence is confirmed by the charge transition level of O2 adsorbed on pristine, ϵ0/−1[  + O2 ] = 2.15 eV, that falls above the conduction band minimum ECBm = 1.89 eV, referenced to EVBM . Hence, in the following analysis, we will solely focus on the configurations that involve VS.

We consider the configurations C = VS, VS + M, with M = O2 , N2 , in the neutral, C0, and negatively charged, C, states. More details about the adsorption geometries of O2 and N2 molecules on VS site are reported in Supplementary Note 1 in the Supplementary Information. The charge transition levels ϵ0/−1[C] and the Gibbs free energies of formation ΔGf[Cq] referenced to the formation of the neutral vacancy, \({{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}\) (see “Methods” section), are reported in Fig. 1a. Noticeably, \({{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{-}\) undergoes a Jahn-Teller distortion with the breaking of the D3h symmetry (i.e., the three W atoms surrounding the defect site are no more equivalent and equally spaced, as better shown in Supplementary Note 1 in the Supplementary Information), that further stabilizes the defect, as identified by Tan et al.50. As reported in the “Methods” section, here N2 and O2 gases are assumed at room temperature and with partial pressures \({p}_{{{{{\rm{N}}}}}_{2}}=0.8\) atm and \({p}_{{{{{\rm{O}}}}}_{2}}=0.2\) atm, as measured in air at standard conditions. ΔGf is higher for (VS +N2)0 and (VS +O2)0 than \({{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}\). Despite the slightly stronger adsorption of O2 than N2 on \({{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}\), as shown in Table 1, the larger entropy loss in O2 adsorption results in \({{\Delta }}{G}^{{{{\rm{f}}}}}[{({{{{\rm{V}}}}}_{{{{\rm{S}}}}}+{{{{\rm{O}}}}}_{2})}^{0}] \,> {{\Delta }}{G}^{{{{\rm{f}}}}}[{({{{{\rm{V}}}}}_{{{{\rm{S}}}}}+{{{{\rm{N}}}}}_{2})}^{0}]\,\gtrsim\, {{\Delta }}{G}^{{{{\rm{f}}}}}[{{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}]\). However, for q = − 1 we have \({{\Delta }}{G}^{{{{\rm{f}}}}}[{({{{{\rm{V}}}}}_{{{{\rm{S}}}}}+{{{{\rm{N}}}}}_{2})}^{-}]\,\gtrsim\, {{\Delta }}{G}^{{{{\rm{f}}}}}[{{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{-}] > {{\Delta }}{G}^{{{{\rm{f}}}}}[{({{{{\rm{V}}}}}_{{{{\rm{S}}}}}+{{{{\rm{O}}}}}_{2})}^{-}]\) for all values of EF. The variation in the stability ordering in passing from q = 0 to q = − 1 reflects the more negative adsorption energy of O2 adsorption on \({{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{-}\), as shown in Table 1. It is important to notice that, while the adsorption of O2 on VS is stronger in the negative state, the adsorption energy of N2 on VS remains nearly the same for both q = 0 and q = − 1, (see Table 1). Consequently, the charge transition levels of the bare VS and VS + N2 are almost coincident. On the contrary, due to the stronger interaction between O2 and VS in the negatively charged state, ϵ0/−1[VS + O2 ] is shifted by approximately 80 meV below the charge transition levels ϵ0/−1[VS + N2 ] ϵ0/−1[VS]. As a result, while N2 on VS is unable to trap more electrons than the bare VS, the O2 interaction with VS favors the negatively charged state over the neutral one and promotes the trapping of free electrons.

Fig. 1: Gibbs free energies and associated cumulative fraction sites of VS for the different configurations.
figure 1

a Gibbs free energies of formation in the neutral (solid lines) and negatively charged (dashed lines) states of bare VS (green), (VS + N2) (blue) and (VS + O2) (red). The respective charge transition levels ϵ0/−1 are marked by vertical segments. bd cumulative fraction of VS sites in neutral, θ0 (solid black line) or negatively charged, θ (dashed black line) state, in different environmental conditions. b vacuum, c inert N2 atmosphere, d air (N2 + O2) atmosphere. The relative contributions of bare VS, (VS + N2) and (VS + O2) to the cumulative fraction of VS are shown by green, blue, and red areas, respectively.

From ΔGf, we can derive the fraction θ of vacancy sites covered with O2 or N2, in neutral and charged state, as a function of EF, see “Methods” section. In Fig. 1b,c, and d, respectively, we distinguish the cases in which WS2 is in a vacuum, in an N2 environment (\({p}_{{{{{\rm{N}}}}}_{2}}=1\) atm) and in air (\({p}_{{{{{\rm{N}}}}}_{2}}=0.8\) atm, \({p}_{{{{{\rm{O}}}}}_{2}}=0.2\) atm). Notably, in Fig. 1b,c, the cumulative fraction of VS (with and without adsorbates) in the q = 0 state, θ0 (solid black line), and in the q = − 1 state, θ (dashed black line), cross each other almost exactly at the same value EFϵ0/−1[VS]. In contrast, in Fig. 1d (air environment), the intersection is shifted to lower values of EF. In intrinsic samples, where EFEgap/2 ϵ0/−1[VS], all configurations are found in their neutral state, θ0 = 100%, independently of the surrounding environment. In this condition, no transfer of electrons to surface-localized electronic states occurs. However, as EF increases, θ grows faster in samples exposed to air. This implies that, with increasing n-doping, WS2 MLs in an air environment exhibit a greater ability than those in a vacuum or in N2 to trap free electrons in localized states, thanks to O2 adsorption on VS.

Modulations in electron concentration and their impact on photoluminescence

To confirm that a decrease in the free electron concentration, ne, specifically occurs in n-doped samples from the trapping of free electrons in localized surface states induced by O2 adsorption, we compute the equilibrium Fermi levels of n-doped MLs in different environments. As reported in the “Methods” section, we take into account the n-doped nature of WS2 MLs by explicitly including in the charge balance an electron density source, ρ. We also account for the presence of a certain surface density of VS, \({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}\), which is typically introduced in the ML during the synthesis process29. The charge balance condition, Eq. (5) in the “Methods” section, is then solved in controlled environments: in a vacuum, in N2 atmosphere and in air (N2 + O2) at standard conditions, as commonly performed in experiments14,18,19. Our model relies then on two free parameters, \({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}\) and ρ, which are varied within reasonable ranges (1010÷ 1013 cm−2), extrapolated from experimental results in the literature22,51,52,53,54,55. From the equilibrium Fermi level, obtained from the solution of the charge balance constraint at various (\({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}},\rho\)) in each environment, we derive the corresponding free electron density in the sample.

In Fig. 2a,b, we report the ratio of the electron density of WS2 MLs in a gas atmosphere, \({n}_{e}^{{{{\rm{gas}}}}}\), to the electron density in a vacuum, \({n}_{e}^{{{{\rm{vac}}}}}\). In Fig. 2a the gas is air (N2 + O2), while in Fig. 2b it is N2. We can notice that in air the free electron density can be reduced by up to a factor of two. The largest impact occurs in systems with high vacancy concentration and relatively milder doping (top-left side of the map). Indeed, \({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}\gg \rho\) ensures that a sizeable fraction of free electrons can be trapped in localized surface states, thus effectively reducing ne. Conversely, a substantial intrinsic electron concentration, as seen on the right side of the map, results in a less noticeable reduction of ne due to O2 adsorption on VS. This is because high ρ values make the bare S vacancy an effective acceptor defect, capable of trapping electrons on its own. In an N2 atmosphere, as shown in Fig. 2b, ne remains largely unchanged compared to the vacuum case.

Fig. 2: Relative variations in electron concentration and PL peak intensity in different “gas” environment.
figure 2

Upper panels Ratios \({n}_{e}^{{{{\rm{gas}}}}}/{n}_{e}^{{{{\rm{vac}}}}}\) where “gas” is air in a and inert N2 in b. Lower panels Relative enhancement of the X0 peak with respect to X between a gas atmosphere and the vacuum. Air in c and N2 in d.

Given that the majority of the experimental evidence on the impact of air on the optoelectronic properties of WS2 MLs comes from PL measurements, it is convenient to display the obtained results in terms of the ratio between the intensities of the peaks corresponding to the neutral exciton, X0, and the negative trion, X, in the PL spectrum. Indeed, as explained in the “Methods” section, the intensity ratio \({r}_{{X}^{0}/{X}^{-}}^{{{{\rm{env}}}}}\), in a certain environment, is inversely proportional to the corresponding free electron density weighed by the Fermi level. It is then possible to define a function \({R}_{{{{\rm{gas/vac}}}}}={r}_{{X}^{0}/{X}^{-}}^{{{{\rm{gas}}}}}/{r}_{{X}^{0}/{X}^{-}}^{{{{\rm{vac}}}}}\) that provides us with the relative enhancement of the X0 peak with respect to X between a gas atmosphere and the vacuum. The parametric analyses of Rgas/vac on \(({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}},\rho)\) in air and in the inert N2 atmosphere are reported in Fig. 2c, d, respectively.

From Fig. 2c we notice that, in the presence of O2, the neutral exciton peak is up to about 3.5 times more intense, with respect to the negative trion one, than in the vacuum case. This is in good agreement with the experimental results18,21, which show similar enhancements of the neutral exciton peaks in samples exposed to air. As in Fig. 2a,b, the largest effect occurs in samples with high densities of VS. This outcome is also in line with the experimental data showing that MLs in which additional VS are created are more responsive to the presence of oxygen14,20. It is crucial to emphasize that the enhancement of X0 is exclusively observed in the presence of air. In an inert atmosphere such as N2 gas, Fig. 2d, the maximum enhancement is approximately Rgas/vac 1.1, proving that the key to the modulation of the electronic properties of WS2 MLs is O2 physisorption on VS. We can therefore conclude that, by stabilizing the negatively charged state, it is the physisorption of O2 on VS in n-doped WS2 MLs that induces an electron transfer from the CB of WS2 to localized surface states and the corresponding reduction of the free electron density, with sizeable impact on the optoelectronic properties of the material.

Analysis of the electronic properties

The electron transfer mechanism can be further investigated by studying the electronic properties of the different configurations of O2 physisorption. For reference, the band diagrams and the Partial Densities of States (PDOS) of the bare VS, in neutral and negative charged states, are reported in Fig. 3a,b, respectively. The electronic signature of VS is a couple of energetically degenerate empty in-gap states. Upon addition of an electron, a defect state turns to be occupied (acceptor nature), removing the degeneracy of the energy levels.

Fig. 3: Band diagrams and PDOS of bare VS and different configurations of O2 on WS2 ML in a 6 × 6 supercell.
figure 3

a bare VS in the neutral ML, b bare VS in the negative charged ML, c O2 on the pristine neutral ML, d O2 on the pristine negative charged ML, e O2 on the neutral VS, f O2 on the negatively charged VS. Red and blue colors represent spin up and spin down states, respectively. Solid and dotted lines in the PDOS panels represent O2 and WS2 contributions, respectively. Energies are referred to the valence band maximum (EVBM). The Fermi level EF is reported as a black dashed line.

The analysis of the electronic band structure of O2 adsorbed on pristine neutral ML, as depicted in Fig. 3c, shows a spin-down, anti-bonding state associated with O2 (solid blue peak in the PDOS panel), which corresponds to the LUMO of the isolated molecule. This state lies within the electronic gap of WS2, in agreement with findings reported elsewhere16, and remains completely unoccupied, despite the interaction with the ML. Hence, when O2 is physisorbed on the pristine basal plane of intrinsic WS2 MLs, no electron transfer from the TMD to the molecule occurs. This result contradicts the conclusions drawn in other studies16,25. In the negatively charged state, Fig. 3d, the anti-bonding state of O2 upshifts to higher energies inside the CB. The shift of the Fermi level causes the partial occupation of the lowest states of the CB of WS2 (dotted red and blue lines in the PDOS panel), but the anti-bonding state of the O2 molecule still remains unoccupied. Consistently with the conclusion drawn from the positive adsorption energy and the analysis of the charge transition level in Table 1, the adsorption of O2 on the pristine basal plane does not facilitate the electron transfer from the ML to the molecule and does not lead to a reduction in the free electron density.

The presence of sulphur vacancies alters this picture. O2 adsorbs more strongly on neutral VS than on the pristine basal plane, see Table 1. When WS2 is intrinsic, Fig. 3e, the anti-bonding state of O2 (solid blue peak in the PDOS panel) is located inside the gap region, empty and disjointed from the defect states of VS (dotted red and blue peaks in the PDOS). The energy levels of VS states are almost unaltered with respect to the configuration reported in Fig. 3a. Indeed, the PDOS shows that there is almost no contribution of the O species to the electron density peaks related to the VS electronic states. On the contrary, when an extra electron is added to the system, Fig. 3f, a complete rearrangement of the in-gap states occurs. As in Fig. 3b, the lowest in-gap state is occupied and primarily associated to WS2, but now it also exhibits a significant contribution from O2, as evident from the PDOS. The extra charge occupies an electronic state that has a contribution from oxygen orbitals, proving that O2 acquires a partial negative charge. A more detailed analysis of the PDOS, projecting the electronic states onto the different O atomic orbitals (Supplementary Fig. 3 in the Supplementary Information), reveals that the oxygen contribution to the lowest-energy vacancy state is provided by pz orbitals with spin-down. This confirms that in (VS + O2) a charge transfer from the CB to localized in-gap states occurs as a redistribution of the charge density between O2 and WS2. This is also supported by the analysis of the square modulus of the wave-function of the lowest-energy electronic state induced by VS (spin-down component), reported in Fig. 4. When no extra electrons are present (intrinsic semiconductor), the vacancy state is localized in the ML, Fig. 4a. On the contrary, when an extra electron is added, Fig. 4b, the wave-function of the same electronic state is delocalized towards O2, pointing at an electron transfer towards the molecule.

Fig. 4: Isosurfaces of the square modulus of the wave-function for the lowest VS in-gap state (spin down contribution) for different cases in WS2 ML.
figure 4

a (VS + O2)0, and b \({({{{{\rm{V}}}}}_{{{{\rm{S}}}}}+{{{{\rm{O}}}}}_{2})}^{-1}\). Black, gray, and red spheres represent W, S, and O atoms, respectively.

The evidence that the extra electron tends to be delocalized between the VS site and the O2 molecule can be also identified from the average position of the extra charge (Supplementary Table 2 in the Supplementary Information), as computed within the the correction scheme applied to charged supercells (see “Methods” section and Supplementary Note 2 in the Supplementary Information). In contrast to the cases of bare VS and N2 on VS, the charge distribution seems to extend beyond the ML plane and toward the O2 molecule.

Similar analyses, reported in the Supplementary Information, confirm that no electron delocalization can be identified in N2 adsorption on VS. VS is able to enhance N2 adsorption, as highlighted by the adsorption energies in Table 1. However, the interaction does not change when the material has extra electrons. The PDOS (Supplementary Fig. 4 in the Supplementary Information) also shows that there is no N contribution to the vacancy states both in the neutral and in the negative charged states. This further proves that VS selectively enhances the interaction with O2, while it is insensitive to inert molecules such as N2.

Comparison with the results from charge population analysis

Finally, we provide some evidence of the shortcomings of conventional CPA, mentioned in the Introduction. CPA aims to assign a partial charge to each atom by employing various methods for partitioning the charge density obtained from ab initio calculations56. Commonly, charge transfer in adsorption processes is assessed by comparing the partial charge assigned to the molecule before and after the adsorption, exclusively focusing on the surface of the intrinsic material (i.e., neutral supercells) and considering a single molecule at once16,25. The same analysis is hardly ever performed considering the n-doped nature of WS2 MLs (i.e., in negatively charged systems). Moreover, the inclusion of realistic elements, such as a variable intrinsic electron concentration and the co-presence of different gas species, is not a trivial task in the framework of the CPA approach.

As reference, the outcomes of CPA, considering neutral as well as negatively charged systems, are reported in Supplementary Note 6 of the Supplementary Information. Limiting the analysis to the neutral systems, as commonly performed in the literature, results in comparable charge variations on O2 and N2, when adsorbed on the same site (both  and VS). This fails to distinctly differentiate between active and inert molecules.

The inclusion of an additional electron in the supercell, to mimic n-doping, enables the CPA to identify a clear charge transfer in the (VS + O2) case, in agreement with our proposed method. However, the CPA does not rule out the possibility of small, yet non-negligible, charge transfers in the other configurations. Due to the challenge of associating the assessed charge populations with directly measurable quantities, it remains uncertain if all identified charge transfers significantly affect the optoelectronic properties of WS2.

Discussion

This study offers a thorough insight into the mechanism governing the modification of the optoelectronic properties of WS2 MLs when exposed to air. This is achieved through a detailed investigation of molecular adsorption on the ML surface using ab initio simulations. Unlike previous studies, our approach takes into explicit consideration the intrinsic n-type nature of WS2 MLs. This allows for a precise description of how adsorbed molecules can trap electrons in a system that is naturally electron-rich and offers a robust elucidation of the charge transfer mechanism. Going beyond conventional charge population analysis, our methodology adopts the charge balance formalism commonly used in semiconductors with dopants. Our findings reveal that no electron transfer to physisorbed molecules occurs when WS2 ML is an intrinsic semiconductor. Even in the case of n-doped WS2, we find that O2 adsorption on the pristine basal plane is ineffective at reducing the free electron concentration. Instead, sulphur vacancies serve as the key O2 adsorption sites that allow for an effective decrease of the free electron density. These results are supported by consistent analysis of band diagrams and charge densities. The validity of the method is supported by the analysis of the adsorption of an inert molecule, such as N2, which shows no impact on the WS2 electron density.

In conclusion, this study not only elucidates the intricate mechanism of O2 physisorption on WS2 monolayers, but also provides an effective approach to evaluate the effects of carrier modulation by molecular adsorption, which can be extended to other materials. These findings serve as a promising basis for interpreting experimental variations in the properties of samples when exposed to air or to controlled environments and have significant implications for the advancement of optoelectronic and gas-sensing technologies based on 2D materials.

Methods

Details of DFT calculations

Calculations are based on spin-polarized DFT, as implemented in Quantum Espresso57,58. Norm-conserving pseudopotentials are employed to describe the electron-ion interaction. The adopted exchange-correlation functional is the van der Waals density functional proposed by Hamada (rev-vdW-DF2)59, based on a Generalized Gradient Approximation (GGA) exchange functional, and able to effectively describe the dispersion forces that characterize physisorption processes. Electronic wave-functions are expanded in plane waves with a cutoff energy of 75 Ry. The Brillouin zone is sampled employing a (5 5 1) Monkhorst-Pack mesh60 in the case of the WS2 ML unit cell and consistently reduced for the supercells. The inter-layer spacing between periodic replicas is set to 20 Å. This setting allows to guarantee an effective separation between the adsorbed molecules and the opposite side of the periodic ML image of about 15 Å.

The role of VS and the adsorption of different molecules are studied considering large supercells (i.e., from 5 × 5 to 7 × 7 repetitions of the unit cell) and including a single defect and/or adsorbed molecule. The n-type nature of WS2 MLs is reproduced in the simulations by explicitly adding extra electrons to the supercells, following the treatment proposed in Ref. 18. The full list of simulation parameters can be retrieved from the calculation input files, freely available at49.

Adsorption energy and Gibbs free energy of formation for neutral and charged states

We compute the electronic adsorption energy of molecule M = O2 , N2 on the adsorption site * =  (pristine) or * = VS (sulphur vacancy), in the charge states q = 0, − 1 as

$${E}_{{{{\rm{ads}}}}}\left[* +M,q\right]={E}_{{{{\rm{tot}}}}}\left[* +M,q\right]-{E}_{{{{\rm{tot}}}}}\left[*,q\right]-{E}_{M}+{{\Delta }}{E}_{{{{\rm{corr}}}}}^{q},$$
(1)

where \({E}_{{{{\rm{tot}}}}}\left[* +M,q\right]\) is the energy of the supercell with molecule M adsorbed on site * in the charge state q, \({E}_{{{{\rm{tot}}}}}\left[*,q\right]\) is the total energy of the supercell containing the adsorption site * in the charge state q, and EM is the energy of the isolated molecule M. \({{\Delta }}{E}_{{{{\rm{corr}}}}}^{q}\) is an energy correction term, evaluated according to Ref. 61. More details on the procedure adopted to evaluate these corrections are reported in Supplementary Note 2 of the Supplementary Information.

Extending the approach in refs. 62,63,64, each configuration C (c.f. Table 1) in the charge state q, is then studied in terms of Gibbs free energy of formation as a function of the Fermi level EF of the material. The Gibbs free energies of formation are referenced to the formation of neutral VS as

$$\begin{array}{ll}{{\Delta }}{G}^{{{{\rm{f}}}}}\left[{C}^{q}\right]({E}_{{{{\rm{F}}}}}\,,{p}_{M})=&{G}_{{{{\rm{tot}}}}}\left[{C}^{q}\right]-{G}_{{{{\rm{tot}}}}}\left[{{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}\right]-{\mu }_{M}({p}_{M})\\ &+\,q({E}_{{{{\rm{F}}}}}\,+{E}_{{{{\rm{VBM}}}}})+{{\Delta }}{E}_{{{{\rm{corr}}}}}^{q},\end{array}$$
(2)

where room temperature T = 298 K is assumed. \({G}_{{{{\rm{tot}}}}}\left[{C}^{q}\right]\) is the total Gibbs free energy of configuration C, in the charge state q. \({G}_{{{{\rm{tot}}}}}\left[{{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}\right]\) is the total Gibbs free energy of neutral VS, without any adsorbate, used as reference. The term μM(pM) is the chemical potential of molecule M in the gas phase, at partial pressure pM, and appears in Eq. (2) only if molecule M is present in configuration C. μM(pM) is obtained from the total DFT energy, EM, and the enthalpy and entropy contributions reported in thermochemical tables65. EF is referenced to the valence band maximum EVBM of pristine WS2 ML. From the Gibbs free energies of formation with q = 0, − 1, it is possible to obtain the charge transition levels ϵ0/−1[C] of each configuration and identify the Fermi level range in which each charged state is the most stable39.

The term Gtot[Cq] of the configurations including an adsorbed molecule are obtained from DFT total energies combined with the enthalpic and entropic contributions of the adsorbed molecule. To more accurately describe the physisorption process, the translational degrees of freedom of the physisorbed molecule are computed within the hindered translator model66,67. More details are reported in Supplementary Note 3 of the Supplementary Information.

From the Gibbs free energies of formation, computed in Eq. (2), we obtain the fraction of vacancy sites in configuration C = VS, VS + M and charge states q = 0, − 1 as

$$\theta [{C}^{q}]=\frac{1}{Z}{e}^{-\beta {{\Delta }}{G}^{{{{\rm{f}}}}}\left[{C}^{q}\right]},$$
(3)

where β = 1/kBT, with the Boltzmann constant kB. Z is the partition function including all possible configurations in their different states

$$Z=1+{e}^{-\beta {{\Delta }}{G}^{{{{\rm{f}}}}}\left[{{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{-}\right]}+\mathop{\sum}\limits_{M,q}{e}^{-\beta {{\Delta }}{G}^{{{{\rm{f}}}}}\left[{({{{{\rm{V}}}}}_{{{{\rm{S}}}}}+M)}^{q}\right]},$$
(4)

considering that all ΔGf are referenced to the formation of the neutral VS (\({{\Delta }}{G}^{{{{\rm{f}}}}}[{{{{\rm{V}}}}}_{{{{\rm{S}}}}}^{0}]=0\)).

It is known that GGA functionals tend to yield underestimated values of the energy gap, particularly in low-dimensional materials. More advanced exchange-correlation functionals, such as hybrid functionals, can mitigate this problem, albeit at a high computational cost. Yet, the adoption of a more advanced theoretical framework is not essential for the methodology and the results outlined in this study. By employing the HSE06 hybrid functional68, Singh et al. in Ref. 29 report an ϵ0/−1[VS] value in WS2 ML equal to 1.86 eV, within an energy gap of 2.1 eV. Therefore, ϵ0/−1[VS] and, consequently, the other considered charge transition levels computed with the HSE06 functional still lie within the bandgap, as predicted at the GGA level. The distance between the transition levels and the CBm does not impact our results, since the present analysis relies on the relative energy separations between the charge transition levels associated with the various configurations. The spacing between transition levels of localized defects is minimally affected by the band-gap problem and has been shown to be correctly reproduced already at the GGA level69,70,71. Hence, it reasonable to assume that the conclusions of this work will not change if a more accurate description of the band structure is employed.

Charge balance

The variation of free electron concentration, ne, in WS2 MLs due to molecular adsorption is evaluated by imposing the charge balance condition, as commonly performed to determine the equilibrium Fermi level in semiconductors with different charged defects39. Specifically, the charge balance for a system with a surface density \({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}\) of sulphur vacancies in the possible configurations C = VS, VS + M and charge states q = 0, − 1, can be written as

$$\begin{array}{ll}\rho +{n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}&\mathop{\sum}\limits_{C,q}q\frac{1}{Z}{e}^{-\beta {{\Delta }}{G}^{{{{\rm{f}}}}}\left[{C}^{q}\right]({E}_{{{{\rm{F}}}}})}=\\ &\int\nolimits_{{E}_{{{{\rm{CBm}}}}}\,}^{+\infty }g(E){f}_{{{{\rm{FD}}}}}(E,{E}_{{{{\rm{F}}}}}\,)dE-\int\nolimits_{-\infty }^{{E}_{{{{\rm{VBM}}}}}\,}g(E)[1-{f}_{{{{\rm{FD}}}}}(E,{E}_{{{{\rm{F}}}}}\,)]dE.\end{array}$$
(5)

\({{\Delta }}{G}^{{{{\rm{f}}}}}\left[{C}^{q}\right]({E}_{{{{\rm{F}}}}}\,)\) is the Gibbs free energy of formation as defined in Eq. (2), g(E) is the density of states of the pristine WS2 ML and fFD is the Fermi-Dirac distribution. Values of \({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}\) for WS2 MLs can be retrieved from experimental data22,51,52. Depending on the different synthesis conditions, they typically range from 1010 to 1013 cm−2.

Since the origin of the intrinsic n-type character of WS2 samples is still debated, and might be associated with electron transfer processes from the substrate10,72,73, donor defects are not explicitly considered in the charge balance, as performed elsewhere38. Instead, we introduce in Eq. (5) a source term of free electron density, ρ, that mimics the n-type of WS2 samples. Typical values of ρ can be obtained from experimental data in the literature and vary between 1010 and 1013 cm−2 (refs. 22,53,54,55).

PL peak intensities

The free electron density in the ML influences the PL of the material, altering the ratio between the intensity of the PL peak associated to the negative trion I(X) and the intensity I(X0) of the neutral exciton peak. Indeed, we have74,75

$${r}_{{X}^{0}/{X}^{-}}^{{{{\rm{}}}}}=\frac{I({X}^{0})}{I({X}^{-})}\propto \frac{{e}^{-\beta {E}_{{{{\rm{b}}}}}}}{{n}_{e}}\propto \frac{{e}^{-\beta {E}_{{{{\rm{F}}}}}}}{{n}_{e}},$$
(6)

where Eb is the trion binding energy, proportional to the Fermi level EF76. Hence, the PL in a gas atmosphere can be compared to that in a vacuum through the ratio

$${R}_{{{{\rm{gas}}}}/{{{\rm{vac}}}}}\equiv \frac{{r}_{{X}^{0}/{X}^{-}}^{{{{\rm{gas}}}}}}{{r}_{{X}^{0}/{X}^{-}}^{{{{\rm{vac}}}}}}=\frac{{e}^{-\beta {E}_{{{{\rm{F}}}}}^{{{{\rm{gas}}}}}}}{{n}_{e}^{{{{\rm{gas}}}}}}\frac{{n}_{e}^{{{{\rm{vac}}}}}}{{e}^{-\beta {E}_{{{{\rm{F}}}}}^{{{{\rm{vac}}}}}}}=\frac{{n}_{e}^{{{{\rm{vac}}}}}}{{n}_{e}^{{{{\rm{gas}}}}}}{e}^{\beta ({E}_{{{{\rm{F}}}}}^{{{{\rm{vac}}}}}-{E}_{{{{\rm{F}}}}}^{{{{\rm{gas}}}}})},$$
(7)

where the label gas can be either air or N2. The dependence of ne and EF on ρ and \({n}_{{{{{\rm{V}}}}}_{{{{\rm{S}}}}}}\) is implied.