Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Spatial defects nanoengineering for bipolar conductivity in MoS2

## Abstract

Understanding the atomistic origin of defects in two-dimensional transition metal dichalcogenides, their impact on the electronic properties, and how to control them is critical for future electronics and optoelectronics. Here, we demonstrate the integration of thermochemical scanning probe lithography (tc-SPL) with a flow-through reactive gas cell to achieve nanoscale control of defects in monolayer MoS2. The tc-SPL produced defects can present either p- or n-type doping on demand, depending on the used gasses, allowing the realization of field effect transistors, and p-n junctions with precise sub-μm spatial control, and a rectification ratio of over 104. Doping and defects formation are elucidated by means of X-Ray photoelectron spectroscopy, scanning transmission electron microscopy, and density functional theory. We find that p-type doping in HCl/H2O atmosphere is related to the rearrangement of sulfur atoms, and the formation of protruding covalent S-S bonds on the surface. Alternatively, local heating MoS2 in N2 produces n-character.

## Introduction

Transition metal dichalcogenides (TMDCs) with formula MX2 (M = metal and X = chalcogen) have emerged as an interesting class of two-dimensional (2D) materials, and have been employed as active components in various miniaturized electronic and optoelectronic devices1. Being able to control the 2D crystalline order and to spatially vary composition and structure2 is of fundamental importance to tune their electronic properties. Examples include bandgap engineering in TMDCs alloys3, substitutional doping at defects sites4, spatial control of thickness5 or of crystalline phases6, and the growth of different laterally or vertically aligned TMDCs to form heterojunctions7. However, most of these methods are not scalable and it remains challenging to pattern with sub-μm resolution both n-type and p-type character within the same 2D material8,9,10.

Various direct patterning methods have been demonstrated in literature, by using localized electric fields, electron radiation, or laser writing. Scanning tunneling microscopy (STM) has been used to characterize single defects in monolayer 2D materials, and to induce defects by local electrochemical reactions11,12,13,14,15,16. Oxidation-scanning probe lithography was recently applied to pattern-insulating barriers on MoS2 flakes17. Electron-beam radiation is also known to generate chalcogen vacancies in 2D materials18,19. Recently, an electron-beam-induced technique has been demonstrated to p- and n-dope encapsulated graphene and MoS2 heterostructures20. Finally, laser writing has been used for local oxidation, thinning, or patterning of monolayer TMDCs21,22,23.

Defects engineering has been proposed as a viable way to induce n-character in MoS2, in particular sulfur vacancies (S-vacancies) can produce n-type conduction in MoS210. However, aside from S-vacancies, very little is known about other types of defects in monolayer MoS2, including their atomistic characteristics, their formation mechanisms, and their impact on electronic properties14,24. A comprehensive understanding of defects would also be beneficial to find strategies to heal their detrimental effects25, and to postpone defect-induced sample degradation over time26.

Here, we propose an approach to control defects and doping in monolayer MoS2 which is scalable, does not require alignment marks, and allows for both n-type and p-type doping. By integrating thermochemical scanning probe lithography (tc-SPL)27,28,29,30,31,32,33,34 with a flow-through reactive-gas cell, we spatially and thermally activate different types of defects in 2D MoS2, presenting either p- or n-type doping on demand with nanoscale resolution. These patterned defective regions are clearly observed in Kelvin Probe Force Microscopy (KPFM). Specifically, when the hot tc-SPL nanoprobe heats the surface of MoS2 in HCl/H2O atmosphere, it produces local p-type doping, whereas local tc-SPL heating in an inert N2 atmosphere produces n-type doping. The electronic properties of the patterned areas are then investigated by using tc-SPL for the complete fabrication of field-effect transistors (FET) and channel doping. The nature and structure of the here-formed defects are studied at the atomic level by scanning transmission electron microscopy (STEM), X-ray photoelectron spectroscopy (XPS), and density-functional theory (DFT). The p-character of locally heated MoS2 in HCl/H2O atmosphere is found to be related to the rearrangement of sulfur (S) atoms and the formation of new protruding covalent S–S bonds on the surface, whereas local heating of MoS2 in N2 atmosphere produces S-vacancies and consequently n-type character. Finally, an electronic p–n junction in monolayer MoS2 has been realized by tc-SPL p-type and n-type doping with precise spatial control, demonstrating a state-of-the-art current rectifying capability, with a rectification ratio of over 104. This approach, being based on direct writing with tc-SPL, offers unique features including in situ imaging of monolayer MoS2, no need of physical masks and alignment marks, nanoscale-patterning resolution, and potential for scalability.

## Results

### HCl/H2O–tc-SPL of p-type defects

Mechanical exfoliation is considered the best method to produce single-crystal TMDCs, such as MoS2, with the highest structural quality and environmental stability26 for high-performing electronic devices35. On the other hand, chemical vapor deposition (CVD) allows producing extended TMDCs monolayers with acceptable crystallinity36, and tens of micrometer size at controlled positions on substrates37. In general, exfoliated mono- and multilayer MoS2 contain intrinsic defects, such as S-vacancies38,39, missing MoS2 layers, charge traps, and scattering centers. The most common intrinsic point defects in CVD MoS2 are S-vacancies37, because of their low activation energy, ~2 eV40, while Mo vacancies alone are unlikely to exist41. This fact is reflected in the CVD MoS2 stoichiometry, where the S/Mo ratio appears to be often lower than 242. S-vacancies can be also generated in MoS2 during post-exfoliation or post-growth processes, for example by thermal treatments43, plasma exposure44, sample characterization and imaging45, or environmental exposure26.

In this work, we thermally induce different types of localized defects in exfoliated and CVD monolayer and multilayer MoS2 by integrating tc-SPL with a flow-through gas cell, which allows for environmental control during tc-SPL patterning. Initially, through an inert N2 stream, vapors from a diluted HCl solution are flowed inside the gas cell where an exfoliated MoS2 sample is located (Fig. 1a). The gas cell contains HCl/H2O vapors and N2 from the inert gas carrier. High-temperature scans are performed by tc-SPL on different areas of the MoS2 flakes at different scan rates, while keeping a constant N2 flow, HCl concentration, and heater temperature. The induced defects in the patterned regions are investigated by KPFM and Raman spectroscopy (Fig. 1). XPS, DFT, and STEM are used to understand the atomistic structure of these defects, as explained in the following paragraphs.

HCl/H2O–tc-SPL patterns and the unheated region of the same flakes are characterized by KPFM (Fig. 1b). We observe a strong contrast between the tc-SPL patterns and the nonpatterned regions in KPFM, where the tc-SPL heated areas always exhibit a lower contact potential difference (CPD) value (top inset of Fig. 1b). The tc-SPL pattern, a rectangular area of 1.2 × 0.3 µm2, shows a CPD 80 mV lower compared with the surrounding unheated flake. The thickness fluctuations after the tc-SPL treatment are identified to be ~0.1 nm, corresponding to <5% of the total thickness of the used three-layer MoS2 flake (top inset of Fig. 1b). The corresponding AFM topographical image of the pristine sample is also shown in the bottom inset of Fig. 1b. The observed CPD contrast can be interpreted as a Fermi energy46 shift toward the valence band, which locally increases the work function (Φ) of the HCl/H2O–tc-SPL heated areas compared with the nonpatterned areas. In Fig. 1c, we report ΔΦKPFM (=Φpattern–Φnon-patterned) vs. the inverse scan rate (1/v). ΔΦKPFM increases (more p-type) with increasing 1/v (decreasing scan rate), consistent with a thermally activated Arrhenius process34. In Fig. 1c, the data are fitted according to a first-order kinetic reaction equation developed for the case of a hot tip sliding on a thermally reactive polymer surface47 (Supplementary Note 1 and Supplementary Fig. 1). Fitting is performed assuming that the local thermochemical reaction, i.e., the production of defects with doping nature, is proportional to the observed ΔΦ, according to the following equation48:

$$\Delta {\mathrm{\Phi }} = \Delta {\mathrm{\Phi }}_{{\mathrm{pattern}}} - \Delta {\mathrm{\Phi }}_{{\mathrm{non}} - {\mathrm{pattern}}} = \Delta {\mathrm{\Phi }}_0 \cdot \left(1 - {\mathrm{e}}^{ - \frac{{{\mathrm{A}} \cdot {\mathrm{r}}}}{{\mathrm{v}}} \cdot {\mathrm{e}}^{ - \frac{{{\mathrm{E}}_{\mathrm{a}}}}{{{\mathrm{RT}}}}}}\right),$$
(1)

where ΔΦ0 is the maximum work-function difference, and A, r, Ea, R, and T are, respectively, the Arrhenius constant, the tip-surface diameter, the activation energy, the gas constant, and the absolute temperature47. For a fixed temperature, T = 823 K, and R = 70 nm, the fitting procedure gives A = 1012 s−1, Ea = 2.03 eV, and ΔΦ0 = 131.7 meV (Supplementary Fig. 2). The obtained value of A is in agreement with the transition-state theory48, where A is given by kBT/h (kB and h are the Boltzmann constant and Planck constant, respectively). This frequency represents the number of collisions with the correct molecular orientation of converting the reactants to the product and should be ~1012 s−1 at room temperature. Furthermore, the obtained value of Ea is similar to the formation energy of S-vacancies40, which are involved in the rearrangement of S on the surface and formation of S–S bonds giving p-character to the tc-SPL-activated areas, as explained later by DFT calculations (see below). Figure 1d shows the Raman spectra inside (data in light blue) and outside (data in black) a HCl/H2O–tc-SPL pattern on an exfoliated monolayer MoS2 flake. The energy difference between the two Raman modes (A1g − E12g) is in agreement with the monolayer nature of the flake (19 cm−1)49. A blue shift of ~2 cm−1 is observed for the A1g peak in the tc-SPL-heated region, while the E12g peaks remains approximately the same position. Previously, blue/red shifts of the A1g peak have been observed in case of chemical doping of MoS2 and are attributed to p/n doping, respectively43,50. Therefore, the here observed blue shift of the A1g Raman peak indicates local p-character in the HCl/H2Otc-SPL-patterned MoS2 samples and is consistent with the work-function increase found in KPFM. The smallest pattern we achieved by tc-SPL (width: 70 nm) is shown in Supplementary Fig. 3.

### Mechanism of HCl/H2O–heat activated p-type defects

The mechanism behind the HCl/H2Otc-SPL p-type defects in MoS2 is elucidated by XPS, DFT calculations, and STEM imaging. Because the minimal XPS beam spot size is 200 μm, in order to extract meaningful information, XPS experiments have been conducted on samples macroscopically heated in the same atmospheric conditions used in the tc-SPL experiments (see “Methods”). As shown in Fig. 2, the stoichiometry of exfoliated MoS2 is obtained through XPS elemental analysis for globally heated exfoliated MoS2 samples in pristine conditions (data in black) and after heating at 573 K (data in blue) and 673 K (data in cyan) in a HCl/H2O-rich environment. XPS elemental analysis of the Cl 2p core levels indicates the absence of chlorine (Cl) in all MoS2 samples treated in HCl/H2O atmosphere. The S/Mo total area ratio (Fig. 2a), obtained from the fit of the Mo 3d and S 2p core-level spectra, is slightly higher than 2 for the pristine and heated samples, indicating that exfoliated MoS2 is a sulfur-rich (or molybdenum-deficient) material. The valence band (VB) spectra (Fig. 2b) show a shift toward the lower binding energies with increasing temperature. The same shift is observed for both Mo 3d (Fig. 2c) and S 2p (Fig. 2d) core-level spectra, indicating that the whole XPS spectra undergo a rigid shift toward the Fermi level (zero binding energy) at high temperatures (the corresponding survey scans of the valence band of MoS2 and of the SiO2 substrate are shown in Supplementary Fig. 4). The valence band maximum (VBM, inset of Fig. 2b), extrapolated from the leading edge of the VB (Fig. 2b), shifts toward lower binding energy with increasing temperature. Since in XPS the binding energies are obtained with respect to the Fermi level, the decreased energy difference between the VBM and the Fermi level could be related to a Fermi level shift toward the VB51, see Supplementary Note 2 and Supplementary Fig. 5. This finding is in agreement with the observed work-function increase in KPFM (Fig. 1b, c) due to an induced p-type character in MoS2 when heated in HCl/H2O atmosphere. However, the S/Mo ratio does not significantly change with the incubation temperature (see the blue and cyan data points in Fig. 2a), indicating that the main reason for the induced p-type character cannot be the sample stoichiometry variation14.

Moreover, the S 2p core-level spectra appear clearly broadened after heating at 673 K (Fig. 2d, see also Supplementary Fig. 6). Indeed, while the S 2p core levels of the pristine and the 573 K heated samples are fitted using a single 2p3/2 and 2p1/2 spin–orbit doublet, the fitting of the S 2p spectra of the 673-K heated sample requires additional spin–orbit doublets (Fig. 2e). As discussed later in the DFT section, an excellent fitting of the 673 K S 2p peak has been obtained with three spin–orbit doublets (Fig. 2e). The additional components, related to covalent S–S bonds52, have a relative area of ~8.9% of the total spectrum area. The fitting shows that 8.9% of sulfur atoms exhibit a higher binding energy shift (+0.65 eV), while 8.9% of sulfur atoms have a lower binding energy shift (−0.48 eV) with respect to the regular sulfur atoms in the MoS2 lattice. This indicates that the chemical bonds in exfoliated MoS2 are modified after heating in HCl/H2O atmosphere, and the induced p-type character of HCl/H2O-tc-SPL-treated MoS2 is clearly related to this modified chemical bonds, which will be discussed more in detail with the aid of DFT calculations and STEM measurements. We propose that both the XPS core-level energy shifts and the resulting p-type character are due to the formation of surface-protruding S–S covalent bonds, occurring through a redistribution of adsorbed S atoms on the MoS2 surface, and/or through the relocation of S atoms on the MoS2 surface after vacancies formation. Therefore, two structural models are adopted here, namely, rearrangement of already existing extra S atoms on the surface of MoS2, and/or redistribution of new S atoms from S-vacancies creation, with both scenarios producing covalent S–S bonds without changing significantly the sample stoichiometry. These two scenarios are also corroborated by the XPS observation that pristine exfoliated MoS2 samples have a S/Mo ratio slightly higher than 2 (Fig. 2a), and there is no signature of other foreign elements. We remark that Mo vacancies can hardly form in MoS241.

The DFT calculations on surface-protruding S–S covalent bond models demonstrate that top sites of S atom in the MoS2 matrix are the most stable adsorption-positions of extra S atoms (Supplementary Fig. 7). The projected density of states (PDOS) of MoS2 with one S vacancy and an increasing number of protruding surface S atoms are calculated and shown in Fig. 3a (one protruding surface S atom, Sv–1Sd), Fig. 3b (two protruding surface S atoms, Sv–2Sd), and Fig. 3c (three protruding surface S atoms, Sv–3Sd), where the energy levels of the states are calculated with respect to the vacuum level. The corresponding MoS2 structures used in PDOS calculations are shown in Fig. 3d. It is evident that the protruding surface S atoms are the major contributors to the VBMDFT shift toward higher energy levels with respect to pristine MoS2 (see also Supplementary Fig. 8). The shift of VBMDFT, calculated from the vacuum level, has been correlated with XPS and KPFM results, and a good agreement has been achieved (Supplementary Note 2). Moreover, we demonstrate that Mo vacancies do not produce p-type doping in MoS2 (Supplementary Fig. 9). Considering also their large formation energy, we exclude that Mo vacancies are present in our experiments.

Core-level binding energy of S atoms in MoS2 is calculated by DFT and used as a reference to obtain the energy shifts of other possible S states on the MoS2 surface, such as S–S protruding bonds (Supplementary Fig. 10). It is observed that there is a large variation on the core-level energy shift of S atoms under different lattice environments. The process shown in Fig. 3e, where a surface S atom chemisorbs on the top site of MoS2 and creates a stable S–S bonding configuration by leaving behind a vacancy in monolayer MoS2, is in agreement with the almost constant S/Mo ratio observed by XPS (Fig. 2a) when heating at different temperatures in HCl/H2O atmosphere. The projected DOS of monolayer MoS2 shows that the 3p states of S–S bonding atoms induce a p-type character in MoS2 (Supplementary Fig. 11). When considering S atoms in the bottom- and top-site positions within the protruding S–S bonds, DFT calculations give positive (+1.5 eV) and negative (−0.7 eV) binding energy shift, respectively (Fig. 3e). These shifts are in agreement with those observed in XPS, namely, a positive shift of +0.65 eV, and a negative shift of −0.48 eV, for the two additional doublet components used to fit the XPS 673 K S 2p peak (Fig. 2e). We notice that DFT also predicts a shift of −0.17 eV for the S atom below the S vacancy with respect to the regular S atom in the perfect MoS2 monolayer crystal (Fig. 3e). However, such binding energy shift is smaller than the full width at half-maximum (FWHM) of the main doublet peaks, which therefore include both the main lattice and the below-vacancy S atoms. It should be noted that in our DFT calculations, various models have been proposed and calculated for defective MoS2. The shifts obtained by XPS and DFT are compared in Fig. 3f. While the agreement between the DFT and XPS shifts is qualitatively good, it has some limitations due to the restrictions of this comparison. For example, XPS measurements have been performed on multilayer MoS2, since flakes with different numbers of layers are present within the beam radius, while DFT calculations have been performed on a monolayer. Thus, we expect some differences between the ideal MoS2 monolayers simulated in DFT, and the experimental exfoliated multilayers structures.

High-angle annular dark-field (HAADF) STEM images of MoS2 samples are collected to reveal the atomic structure of the defects formed when heating MoS2 in HCl/H2O atmosphere. The atomic resolution STEM images of individual defects in monolayer CVD and exfoliated MoS2 are shown in Fig. 4. The mass contrast behavior of HAADF imaging, where the contrast is proportional to Z2 with Z = atomic number, reveals a noticeable intensity rise at a chalcogen lattice site, which cannot be seen in the untreated pristine samples. This increased intensity indicates the presence of an additional S atom on top of a surface S atom in MoS2 (this type of defect is hereafter called S3 dopant), confirming a rearrangement of S atoms and the formation of protruding covalent S–S bonds on the surface (see model in Fig. 3e). By averaging over multiple STEM images, we obtain a S3 defect density of roughly 2–4% of the total chalcogen sites, which corresponds to ~2.4 × 1013 to 4.7 × 1013 defects·cm−2.

### N2–tc-SPL of n-type defects

The tc-SPL method can also achieve or increase the n-type character of MoS2. Indeed, when tc-SPL experiments are performed in an inert environment, i.e., flowing only N2 inside the gas cell, the tc-SPL patterns always show higher CPD (smaller work function) compared with the unheated regions of the same MoS2 flakes. This is the opposite KPFM contrast as compared with that observed for the HCl/H2O–tc-SPL doping. To understand the evolution of the work-function variation in N2-tc-SPL doping, we investigate ΔΦKPFM for CVD monolayer MoS2 as a function of the absolute tc-SPL heater temperature (Fig. 5a, for scan rate = 0.2 µm s−1), which is then fitted according to Eq. (1). At low temperatures, the work function inside the locally heated areas is similar to the nonpatterned flake (ΔΦKPFM ≈0). Starting from THeater = 900–1000 K, the work function starts to decrease significantly and stabilizes around −60 meV. We note that the effective temperature at the tip-sample contact is lower than the heater temperature (Supplementary Note 1)31. This ΔΦKPFM evolution is consistent with a thermally activated process34,47. The fitting analysis gives a maximum change in work function of ΔΦ0 = −57.9 meV, an activation energy of Ea = 2.40 eV, and Arrhenius constant of A = 1012 s−1, when using as fixed fitting parameters R = 70 nm, and v = 0.2 µm s−1. We remark that the values of activation energy and collision frequency A are similar to the ones found in the HCl/H2O case, and consistent with S-vacancy formation and transition-state theory, respectively.

### XPS of N2–heat-activated n-type defects

In order to explain the temperature-induced decrease of work function in N2 atmosphere, we perform XPS on globally heated CVD MoS2 samples (Fig. 5b, c) and Raman spectroscopy (Fig. 5d) inside and outside locally heated N2–tc-SPL patterns. Elemental analysis from XPS (Fig. 5b) shows that the S/Mo ratio in monocrystalline single-layer CVD MoS2 is lower than 2 and decreases with the temperature. This decrease is associated with S-vacancies, which increase for the samples heated at higher temperatures14 (T = 623 K and 773 K). The XPS VB spectra and the VBM values as measured with respect to the Fermi level show a shift toward higher binding energies (the Fermi level moves away from the VB) with the increase of temperature (Fig. 5c), in agreement with the decreased ΔΦ measured by KPFM (Fig. 5a). This indicates a higher n-type character induced by local heating in N2 atmosphere. Raman spectra collected inside (data in red) and outside (data in black) a 2 × 2 µm2 tc-SPL-patterned area in N2 atmosphere (Fig. 5d) also confirm the presence of n-type defects in N2–tc-SPL patterns. In this case, we do not observe any shift of the A1g peak, while the E12g peak shows a slight red shift of 0.7 cm−1. Furthermore, both A1g and E12g peaks have lower intensities compared with the unheated flake. Red shift of the E12g Raman peak accompanied by lower peak intensity and peak widening of the A1g and E12g peaks have been observed in electron irradiated MoS2 samples and attributed to the formation of S-vacancies and lattice deformation45,50. We also notice that the extracted energy difference between A1g and E12g peaks is 20 cm−1, as expected for a monolayer CVD sample53.

XPS elemental analysis also shows an increase in the content of oxygen with the temperature (Supplementary Fig. 12), which may indicate a thermally induced substitution of S by oxygen43. While oxygen incorporation in 2D MoS2 has been linked to p-type conduction54, S-vacancies in MoS2 have been identified as a source of n-doping in MoS2 by several studies10. In particular, S-vacancies have been shown to introduce defects in the MoS2 bandgap55, a fact that pins the Fermi energy closer to the conduction band56 and makes MoS2 a n-type semiconductor42. However, recently, two independent STM investigations revealed a slow oxygen-substitution reaction, during which individual sulfur atoms are replaced one by one by oxygen, giving rise to a solid-solution-type 2D MoS2−xOx11,57. One of these studies showed that this process, obtained either in air at room temperature, or at 400 K, gives rise to MoS2−xOx samples with n-character. However, they have not been able to determine whether this n-character was due to the oxygen substitutions, since the same n-character was already present in the pristine MoS2 samples, therefore reaching no clear conclusions11,57. In particular, the authors of Ref. 57 indicate that substitutional O can be incorporated in MoS2 also while annealing in vacuum, because previously adsorbed oxygen molecules on vacancy sites could split and leave the O behind. Our MoS2 samples are flowed with N2 before starting the tc-SPL experiments, and the surface is imaged by AFM in contact mode, likely removing H2O, O2, or CO2 adsorbed on the surface. During the tc-SPL process, the cell is filled with N2, and we therefore argue that we create S-vacancies, producing n-type doping in the sample. However, we remark that prolonged exposure of the patterned/doped samples in air produces unstable levels of n-type doping, possibly due to the formation of oxygen substitutional defects11. Furthermore, n-type doping is dramatically influenced by the state of the as-grown MoS2 sample, e.g., by the number of vacancies present at the time of the doping procedure, which are strongly dependent on the local humidity. On the other hand, tc-SPL p-type doping is more reproducible and stable (see “Methods”).

### Electrical characterization of tc-SPL-doped FETs

We fabricate three different types of FETs, namely, a FET with a fully n-type doped channel by N2-tc-SPL, a FET with a fully p-type doped channel by HCl/H2O-tc-SPL, and a FET in which half-channel is p-type doped and the other half is n-type doped, obtaining a lateral p–n junction. The electrodes of these FETs are also fabricated by using thermal probes, as previously reported58 (see “Methods”). The electrical characterization of these FETs is performed before and after tc-SPL doping.

After fabrication of a four-probe FET on a monolayer CVD MoS2, we dope the entire active area/channel by using tc-SPL in N2 (see inset of Fig. 6a). The transfer curves before and after n-type doping are plotted in Fig. 6a in black (as-grown) and red (N2-tc-SPL), respectively. A threshold voltage of −32 V is extracted for the as-grown FET before N2-tc-SPL n-type doping, by using both the constant current method in logarithmic scale (left axis), and the linear extrapolation method in linear scale (right axis)59. After N2-tc-SPL doping of the active region, the threshold voltage shifts from −32 V to −52 V, confirming an induced n-type doping.

Next, we perform KPFM measurements on this FET before and after the n-type doping. From these measurements, we obtain a work-function variation (ΔΦKPFM = Φn-type–Φas-grown) of −18 ± 5 meV, in agreement with the data reported in Fig. 5a, when the tc-SPL heater temperature is 1000 K. Here, we define “±” representing the standard deviation on KPFM data within the area of analysis out of five repetitions of KPFM measurements. Note that the substrate is grounded during the KPFM measurements.

To correlate the electrical FET measurements with the KPFM results, we use the following equation for approximating the work-function variation (ΔΦFET) of a non-degenerate semiconductor as a function of its carrier density60:

$$\Delta \Phi _{{\mathrm{FET}}} = \Phi _{{\mathrm{n}} - {\mathrm{type}}} - \Phi _{{\mathrm{as}} - {\mathrm{grown}}} = 1{\mathrm{n}}\left(\frac{{{\mathrm{n}}_{{\mathrm{as}} - {\mathrm{grown}}}}}{{{\mathrm{n}}_{{\mathrm{n}} - {\mathrm{type}}}}}\right),$$
(2)

where Φas-grown and Φn-type are the work functions of the as-grown and n-doped MoS2, respectively; nas-grown and nn-type are the gate-bias-dependent carrier densities of the as-grown and n-doped MoS2, extracted from the FET electrical measurements. In particular, we approximate the bias-dependent carrier density in the channel region of the MoS2 FET in strong inversion (i.e., at gate bias beyond the threshold voltage) using61:

$${\mathrm{n}} = {\mathrm{C}}_{{\mathrm{ox}}}\left( {{\mathrm{V}}_{\mathrm{g}} - {\mathrm{V}}_{{\mathrm{th}}}} \right),$$
(3)

where Cox is the gate capacitance, Vg is the back-gate voltage, and Vth is the threshold voltage. From Eq. (2) and using the bias-dependent carrier density before and after the n-doping (Supplementary Fig. 13), we estimate a work-function shift (ΔΦFET) of −12 meV at Vg = 0 V (Supplementary Fig. 14). This result is consistent with the KPFM data.

To study the electrical properties of p-type doped MoS2 by HCl/H2-tc-SPL, we fabricate a second type of four-probe FET on a monolayer CVD MoS2. We dope the entire active area/channel using HCl/H2-tc-SPL (inset of Fig. 6b). The transfer curves before and after p-type doping are plotted in Fig. 6b in black (as-grown) and blue (p-type), respectively. The threshold voltage shifts from −32 V (as-grown) to −1 V after HCl/H2-tc-SPL p-type doping. This positive shift of Vth is consistent with the p-type doping of MoS2.

We then study the work-function shift in the channel region of the MoS2 device before and after the p-doping. We use the same analysis applied to the n-type devices earlier. In particular, the work function change obtained from KPFM is ΔΦKPFM = Φp-type–Φas-grown = +90 ± 6 meV. In comparison, the work-function change estimated from the FET data at Vg = 0 V is ΔΦFET = Φp-type–Φas-grown = +90 meV (Supplementary Figs. 15, 16), in good agreement with the KPFM data.

Finally, we fabricate a lateral p–n junction by doping the channel with the tc-SPL method. We start by n-doping the entire channel of a FET using N2-tc-SPL, and then convert the doping type in one half of the channel region to p-doping by HCl/H2-tc-SPL. Figure 6c shows the KPFM image of the final device, indicating the formation of a lateral p–n junction. By using the KPFM image of as-grown MoS2 as a reference (Fig. 6c top), it is possible to identify the p-doped and n-doped regions of the lateral p–n junction (Fig. 6c bottom), where the darker CPD area (marked with a blue dashed box) corresponds to the p-doped region and the brighter CPD area (marked in red dashed box) corresponds to the n-doped region.

The output characteristic curves of the FET after the initial n-type doping of the entire channel confirms the absence of a diode-like characteristic behavior for all the measured gate voltages (Supplementary Figs. 17, 18). This is evident from the symmetric output characteristic curves of the FET. After half-channel HCl/H2-tc-SPL p-doping, however, the device shows a gate-bias-dependent rectification behavior. In particular, the device achieves a maximum rectification ratio, defined as the ratio of forward current (ON) over reverse current (OFF) of the p–n junction, over 104 at Vg = −32 V (Fig. 6d). The rectification ratio decreases when further increasing the gate bias, approaching 1 (Supplementary Fig. 18). The transition from a diode-like behavior at low gate bias to a unipolar device characteristic curve at high gate biases (Supplementary Figs. 17, 18) is due to the gradual increase in the density of gate-bias-induced electron charge carriers relative to the tc-SPL-induced p-type carriers. These gate-bias-dependent characteristic curves are consistent with previous reports on lateral p–n junctions62. The strong rectification behavior of the lateral tc-SPL fabricated p–n junction provides further evidence of the ability of tc-SPL in altering the doping type and doping level at precise locations of a MoS2 device on demand.

## Discussion

We show that tc-SPL patterning is a strategy for the design with precise size and spatial control of electronic p–n junctions in monolayer MoS2, where a current rectifying ratio of over 104 is observed. We remark that environmental tc-SPL can be employed for MoS2 patterning in optoelectronics, flexible electronics, and energy-harvesting applications, which require complementary devices with regions of different polarity. This has been particularly challenging to realize in MoS2 because of its natural propensity for unipolar n-type transport42,44. Here, the rectifying junction is produced by direct imaging and writing in a one-step fabrication approach, without the necessity of additional fabrication steps for markers, mask deposition, or resist development. Our approach and understanding of thermally activated defects formation in MoS2 constitute a way to introduce functionalities in 2D materials through defects nanoengineering, and could find wide applications in semiconducting TMDCs, for example to engineer metal–2D semiconductor electrical contacts, reducing the Schottky barrier height, and as a doping strategy for electronic and optoelectronic devices.

Finally, it is important to underline that here we have demonstrated that the entire FET can be fabricated by tc-SPL, from electrodes patterning58 to bipolar doping, offering features which include in situ imaging of monolayer MoS2, no need of physical masks or markers, nanoscale-patterning resolution, and potential for scalability. Current tc-SPL throughput is similar to EBL29, but it can be further improved by multiplexing with thermal nano-probes arrays28,63, paving the way for integrated 2D electronic devices.

## Methods

### Materials

To test different types of MoS2 materials, we use either mechanically exfoliated monolayer and few-layer (1–3 layers) MoS2, or monocrystalline monolayer MoS2 grown by CVD (from 2d layer). All samples are deposited on a 285-nm-thick SiO2 film on highly doped silicon substrates (from Nova Electronic Materials). Flakes thickness is confirmed by Raman spectroscopy, AFM, and optical microscopy before experiments.

### tc-SPL nanopatterning

In tc-SPL27,28,29,30,31,32,33 heatable conical nano-probes (radius ~35 nm) are used to induce chemical reactions on the surface of thermally responsive materials and thin films with nanoscale resolution. Highly doped silicon cantilevers with an integrated heater, i.e., a region at lower doping levels located at the tip position, are used to control the thermal writing parameters. tc-SPL heaters are switched-on through a DC voltage, and the current flowing in the highly doped cantilever legs resistively raises the tip temperature, as high as 800–1000 °C. Writing is achieved by scanning the tc-SPL hot nanoprobe on the sample surface. Here, we integrate tc-SPL with a flow-through reactive-gas cell. In particular, to produce the HCl/H2O atmosphere during the tc-SPL process, a solution of HCl is prepared in milli-Q water at a concentration of 2.4 N starting from a 10 N solution (Fisher). A sealed glass flask containing 50 mL of the solution is connected through plastic tubes to a N2 gas line and to the inlet of the tc-SPL gas cell, where the sample is placed. The reactive gas is sealed in the gas cell between the sample holder and the scanning head of an atomic force microscope (AFM, 5500 model from Keysight), which has been designed to hold the cantilevers with integrated heater for tc-SPL. Another tube is connected to the outlet of the gas cell to a hood for vapor exhaust. In this way, N2 flows from the main line through the HCl solution carrying HCl/H2O vapors inside the AFM gas cell. The HCl gas from a 2.4 M solution was passed through a NaOH solution for 20 min. The change in pH was monitored to calculate the HCl gas concentration. We obtained the 74 micromoles per liter of gas. To quantify the HCl gas concentration in the gas cell, HCl from a 2.4 M solution was passed through a NaOH solution for 20 min. The change in pH was monitored to calculate the HCl gas concentration, obtaining 74 micromoles·L−1. Before tc-SPL patterning, AFM images are collected in contact mode with unheated tc-SPL probes in order to find the appropriate flake. Then, N2 is passed through the HCl solution at a flow rate of 60 mL min−1, which is compatible with good images and patterning quality and preserves the flakes integrity. The N2 flow is also controlled during the measurements by recording the rate of bubbles formation when the gas enters the HCl/H2O solution (6 bubbles s−1). We observe that very high N2 flow lead to flakes disruption and produces noise in the AFM images. In Fig. 1c, different patterns are produced on each flake at different scan rates from 0.02 to 0.12 µm s−1, keeping constant the other experimental parameters, i.e., probe temperature, gas flow, and load. Calibration of the tip temperature during the experiments is performed before starting the N2 flow and far from contact64. In the case of tc-SPL patterning in pure N2 atmosphere, N2 is directly flown inside the gas cell at a rate of 40 mL min−1 for 30 min, while performing images and patterning of the flake in contact mode. Then the tc-SPL experiment is performed under N2 flow, by scanning equally spaced 1 × 0.2 µm2 rectangular areas of the same flake at increasing temperature and constant load, and scan rate = 0.2 µm s−1.

### tc-SPL parameter optimization

To achieve tc-SPL doping, a wide range of parameters have been studied and optimized in order to achieve the most reproducible doping of MoS2. These parameters include: (1) the concentration of the HCl solution; (2) the gas flow rate; (3) the gas pre-flow duration; (4) the set-point load of the thermal cantilever; (5) the number of scanned lines along the slow axis (y axis); (6) the scan rate; and (7) the temperature of the heater. We have performed over 500 p-type doping experiments to evaluate the influence of the seven parameters on the HCl/H2O-tc-SPL doping of MoS2 in terms of doping level, uniformity, doping speed, flake damage, and reproducibility. After the optimization, we have fabricated in total 30 p-type doping devices and observed consistent work-function change for 28 of these devices (yield ~93%). It should be noted that the successful n- and p-doping level of the devices depends also on the type of MoS2 samples, e.g., exfoliated flakes vs. CVD flakes. Regarding n-type doping, the results are less reproducible because they strongly depend on the original samples, and how the samples are stored. Figures 1c and 5a present the results of some of the p- and n-doping experiments, where the doping level is measured as a function of scan rate and temperature after all the other parameters have been optimized.

### KPFM measurements

Room temperature amplitude and frequency modulation KPFM (AM-KPFM and FM-KPFM) is performed using a Bruker Multimode AFM (Santa Barbara, CA), with PPP-EFM tips (Nanosensors). Lift scan height of 20 nm and ac bias voltage of 2 V are used during measurements. The sample is grounded during the measurements. For data analysis, contact potential difference values (average and standard deviation) are extracted from same size areas inside and outside the tc-SPL patterns for different samples.

### Raman measurements

Raman spectra are collected using a Horiba LabRAM HR800 system coupled with an Olympus BX41 inverted optical microscope, and using a laser source with excitation wavelength of 532 nm. The laser power is adjusted to avoid sample damage, or any sample modification, as observed by optical microscopy. Spectra are acquired between 100–900 cm−1 with 1 s exposure time and as an average of ten different measurements. The peak at 521 cm−1 from the silicon substrate is used as a reference.

### XPS measurements

For the XPS characterization, mechanically exfoliated a few-layer-thick MoS2 samples and single-layer CVD MoS2 samples with crystal size of the order of 50–100 µm are globally heated at different temperatures in different atmospheric conditions. For heating exfoliated samples in HCl/H2O atmosphere, a hot plate is used. A small Büchner flask (total volume: 25 mL) with a gas inlet is put upside down on top of exfoliated MoS2 samples lying on an aluminum foil, and then the foil is wrapped around the flask. N2 gas is flown through an aqueous HCl solution (2.4 N, 50 mL) inside the flask for 30 min at room temperature (RT), and the rate of bubbles formation inside the HCl solution is checked to be equal to that occurring during tc-SPL experiments (6 bubbles s−1). Then the flask with the sample is transferred to the hot plate, keeping the N2 flow. Two samples are heated, one at 573 K for 5 min, and the other one at 673 K for 10 min. The actual temperature on the hot plate is checked using a thermocouple. We use a pristine MoS2 sample, a sample kept for 190 min in HCl/H2O atmosphere at room temperature, and a sample heated in humid air (RH = 50%) at 673 K for 10 min as control samples in the XPS measurements (Supplementary Figs. 6, 12). For such samples, we do not find any difference in the XPS S 2p core-level spectra of MoS2 compared with the pristine sample. To mimic tc-SPL experiments in atmosphere of pure N2, CVD MoS2 samples are put in a furnace filled with nitrogen gas (N2 flow = 10 SPLM). Temperature is raised in 20 s to the set-point value and then kept constant for 10 min. Then it is reduced back to the RT value in 300 s. Two experiments are performed using different set-point temperatures (623 K and 773 K). No changes are observed by optical microscopy after thermal treatments on both exfoliated and CVD samples. XPS spectra are collected using a Versaprobe II XPS (Physical Electronics) using Al Kα radiation (1486.6 eV). We collect Mo 3d, S 2p core-level spectra and valence band (VB) spectra using the following conditions: pass energy = 23.5 eV (Mo 3d and S 2p) and 46.95 eV (VB), beam size = 200 µm, time per step = 200 s, resolution = 0.025 eV step−1. Samples are mounted on a steel sample holder, and grounded and measurements are performed at a pressure <10−6 Pa. Binding energy calibration is performed with reference to the Si 2p peak from the SiO2. For the fitting, a Shirley function is assumed for background subtraction and we use a multicomponent deconvolution procedure, using mixed Gaussian and Lorentzian line shapes. For the Mo 3d, we use the 3d5/2 and 3d3/2 spin–orbit splitting fixed at 3.14 eV and the degeneracy ratio at 2:3 for the spin–orbit area ratio. For the S 2p, we use the 2p3/2 and 2p1/2 spin–orbit splitting fixed at 1.2 eV and the degeneracy ratio is 1:2 for the spin–orbit area ratio. The FWHM is a free parameter, but is kept as the same value for the components of each doublet. The S/Mo stoichiometry ratio is obtained from the Mo 3d and S 2p peak areas weighted with the relative sensitivity factors (9.5 and 1.67 for Mo 3d and S 2p core levels, respectively).

### DFT calculations

DFT calculations are carried out with the QUANTUM-Espresso software65. In particular, norm-conserving pseudopotentials66 are adopted to describe electron–ion interactions, and the Perdew–Burke–Ernzerho (PBE) functional67 is used to give electron–electron exchange and correlation effects. The plane wave energy cutoff is set to 100 Ry to get accurate charge density, and with these DFT schemes, the lattice constant of MoS2 is 3.255 Å in agreement with experiments68. Large rectangular monolayer MoS2 are roots to analyze possible existing states of sulfur clusters on MoS2 and corresponding electronic structures. In all simulations, 16.27 Å × 16.91 Å supercells are applied to exclude the interaction between defects with their periodic images, and a 15-Å vacuum size along the z direction is applied to remove MoS2 layer–layer interplay with its mirror duplicates. The corresponding Brillouin zone is sampled by a 2 × 2 × 1 mesh using the Monkhorst–Pack scheme69 in the supercell optimizations. For DOS calculations, a large 4 × 4 × 1 mesh is used. All the structures are fully relaxed within the force threshold of 1 × 10−3 Ry bohr−1. The Methfessel–Paxton smearing technique70 with the width of 0.02 Ry is applied to speed up the convergence. The core-excited pseudopotential methods are used to calculate core-level binding energies of 2p states of S atoms. Norm-conserving pseudopotentials are generated for photo-excited ions, including a hole in the 2p subshell of S atoms. These pseudopotentials are derived from scalar-relativistic all electron density-functional calculations, in which spin–orbit coupling terms are averaged within each state. Therefore, our calculated S 2p core-level binding energies correspond to an average binding energy for the entity.

### STEM measurements

HAADF STEM images of MoS2 samples were collected at Lehigh University to confirm the formation of protruding covalent S–S bonds on the surface of MoS2 when heating MoS2 in HCl/H2O atmosphere. Monolayer CVD-grown flakes (2d-layer supplies) and multilayer exfoliated flakes from bulk MoS2 crystals (SPI supplies) on Si/SiO2 were used. Doping was performed under N2 previously flown through HCl solution (2.4 N) at exactly the same condition as for the XPS measurements. STEM measurements were obtained using a spherical aberration-corrected JEOL 200ARM-CF with an acceleration voltage of 80 kV. Images were taken with a high-angle annular dark-field (HAADF) detector with a detection range of 54–220 mrad and 10-cm camera length while electron radiation damage was minimized by using a low electron probe current (11 pA).

### FET fabrication and characterization

All FETs are fabricated by thermal scanning probe lithography (t-SPL) method, which gives rise to high-quality metal contacts with vanishing Schottky barriers. First, a solution of pure PMGI (polymethylglutarimide, Sigma) is spin-coated on the samples surface (2000 r.p.m., 35 s) followed by a quick baking. For device fabrication, this step is repeated three times; then, a PPA (polyphthalaldehyde, Sigma) solution (1.3 wt% in anisole) is spin-coated on PMGI (conditions: 2000 r.p.m. at 500 r.p.m. for 4 s and then 3,000 r.p.m. at 500 r.p.m. for 35 s) followed by a quick baking. With these conditions, a 20-nm-thick PPA film on top of a 210-nm-thick PMGI film is deposited on the sample surface. Patterning of PPA is performed using a commercial NanoFrazor t-SPL tool (SwissLitho AG), and FET geometries, e.g., the four-probe configuration, have been defined precisely. For the chemical etching of PMGI after patterning, samples are immersed in a solution of TMAH in deionized water (tetramethylammonium hydroxide AZ726 MIF, MicroChemicals) (0.17 mol l−1) for 400 s, then rinsed with deionized water (30 s) and IPrOH (30 s), and finally dried with N2. Metal deposition of Cr/Au (10 nm/20 nm) is performed using an AJA Orion 8E e-beam evaporator (pressure 10−8 torr, evaporation rate: 1 Å s−1). Finally, metal/resist lift-off is performed by dipping samples in Remover PG (MicroChem) for a few hours, followed by rinsing (IPrOH) and drying (N2).

Electrical characterization of FETs is carried out using a parameter analyzer (Agilent 4155C) and a home-built shielded probe station working in vacuum (10−4 torr) with six micro-manipulated probes. A LabVIEW program has been developed to perform multistep measurements automatically, e.g., transfer curve, output curves, diode rectification, and parameter sweeping. The carrier mobilities of the as-grown, tc-SPL n-doped, and p-doped FETs are shown in Supplementary Figs. 19, 20.

## Data availability

The data that support the findings of this study are available from the corresponding authors on reasonable request.

## References

1. 1.

Wang, Q. H., Kalantar-Zadeh, K., Kis, A., Coleman, J. N. & Strano, M. S. Electronics and optoelectronics of two-dimensional transition metal dichalcogenides. Nat. Nanotechnol. 7, 699–712 (2012).

2. 2.

Chhowalla, M. et al. The chemistry of two-dimensional layered transition metal dichalcogenide nanosheets. Nat. Chem. 5, 263–275 (2013).

3. 3.

Gong, Y. et al. Band gap engineering and layer-by-layer mapping of selenium-doped molybdenum disulfide. Nano Lett. 14, 442–449 (2014).

4. 4.

Suh, J. et al. Reconfiguring crystal and electronic structures of MoS2 by substitutional doping. Nat. Commun. 9, 199 (2018).

5. 5.

Das, S., Prakash, A., Salazar, R. & Appenzeller, J. Toward low-power electronics: tunneling phenomena in transition metal dichalcogenides. ACS Nano 8, 1681–1689 (2014).

6. 6.

Kappera, R. et al. Phase-engineered low-resistance contacts for ultrathin MoS2 transistors. Nat. Mater. 13, 1128–1134 (2014).

7. 7.

Li, M.-Y. et al. Epitaxial growth of a monolayer WSe2-MoS2 lateral p-n junction with an atomically sharp interface. Science 349, 524–528 (2015).

8. 8.

Yu, J. et al. Patterning superatom dopants on transition metal dichalcogenides. Nano Lett. 16, 3385–3389 (2016).

9. 9.

Gong, Y. et al. Spatially controlled doping of two-dimensional SnS2 through intercalation for electronics. Nat. Nanotechnol. 13, 294–299 (2018).

10. 10.

Lei, S. et al. Surface functionalization of two-dimensional metal chalcogenides by Lewis acid-base chemistry. Nat. Nanotechnol. 11, 465–471 (2016).

11. 11.

Barja, S. et al. Identifying substitutional oxygen as a prolific point defect in monolayer transition metal dichalcogenides. Nat. Commun. 10, 1–8 (2019).

12. 12.

Schuler, B. et al. How substitutional point defects in two-dimensional WS2 induce charge localization, spin-orbit splitting, and strain. ACS Nano 13, 10520–10534 (2019).

13. 13.

Schuler, B. et al. Large spin-orbit splitting of deep in-gap defect states of engineered sulfur vacancies in monolayer WS2. Phys. Rev. Lett. 123, 076801 (2019).

14. 14.

Lin, Z. et al. Defect engineering of two-dimensional transition metal dichalcogenides. 2D Mater. 3, 022002 (2016).

15. 15.

Wong, D. et al. Characterization and manipulation of individual defects in insulating hexagonal boron nitride using scanning tunnelling microscopy. Nat. Nanotechnol. 10, 949–953 (2015).

16. 16.

Velasco, J. et al. Nanoscale control of rewriteable doping patterns in pristine graphene/boron nitride heterostructures. Nano Lett. 16, 1620–1625 (2016).

17. 17.

Espinosa, F. M. et al. Direct fabrication of thin layer MoS2 field-effect nanoscale transistors by oxidation scanning probe lithography. Appl. Phys. Lett. 106, 103503 (2015).

18. 18.

Komsa, H. P. et al. Two-dimensional transition metal dichalcogenides under electron irradiation: defect production and doping. Phys. Rev. Lett. 109, 035503 (2012).

19. 19.

Komsa, H. P., Kurasch, S., Lehtinen, O., Kaiser, U. & Krasheninnikov, A. V. From point to extended defects in two-dimensional MoS2: evolution of atomic structure under electron irradiation. Phys. Rev. B 88, 035301 (2013).

20. 20.

Shi, W. et al. Reversible writing of high-mobility and high-carrier-density doping patterns in two-dimensional van der Waals heterostructures. Nat. Electron. 3, 99–105 (2020).

21. 21.

Li, H. et al. Mechanical exfoliation and characterization of single- and few-layer nanosheets of WSe2, TaS2, and TaSe2. Small 9, 1974–1981 (2013).

22. 22.

Castellanos-Gomez, A. et al. Laser-thinning of MoS2 on demand generation of a single-layer semiconductor. Nano Lett. 12, 3187–3192 (2012).

23. 23.

Seo, S. Y. et al. Writing monolithic integrated circuits on a two-dimensional semiconductor with a scanning light probe. Nat. Electron. 1, 512–517 (2018).

24. 24.

McDonnell, S., Addou, R., Buie, C., Wallace, R. M. & Hinkle, C. L. Defect-dominated doping and contact resistance in MoS2. ACS Nano 8, 2880–2888 (2014).

25. 25.

Lu, J. et al. Atomic healing of defects in transition metal dichalcogenides. Nano Lett. 15, 3524–3532 (2015).

26. 26.

Gao, J. et al. Aging of transition metal dichalcogenide monolayers. ACS Nano 10, 2628–2635 (2016).

27. 27.

Albisetti, E. et al. Nanopatterning reconfigurable magnetic landscapes via thermally assisted scanning probe lithography. Nat. Nanotechnol. 11, 545–551 (2016).

28. 28.

Carroll, K. M. et al. Parallelization of thermochemical nanolithography. Nanoscale 6, 1299–1304 (2014).

29. 29.

Garcia, R., Knoll, A. W. & Riedo, E. Advanced scanning probe lithography. Nat. Nanotechnol. 9, 577–587 (2014).

30. 30.

Szoszkiewicz, R. et al. High-speed, sub-15 nm feature size thermochemical nanolithography. Nano Lett. 7, 1064–1069 (2007).

31. 31.

Wei, Z. et al. Nanoscale tunable reduction of graphene oxide for graphene electronics. Science 328, 1373–1376 (2010).

32. 32.

Albisetti, E. et al. Thermochemical scanning probe lithography of protein gradients at the nanoscale. Nanotechnology 27, 315302 (2016).

33. 33.

Albisetti, E. et al. Nanoscale spin-wave circuits based on engineered reconfigurable spin-textures. Commun. Phys. 1, 1–8 (2018).

34. 34.

Carroll, K. M. et al. Fabricating nanoscale chemical gradients with thermochemical nanolithography. Langmuir 29, 8675–8682 (2013).

35. 35.

Radisavljevic, B., Radenovic, A., Brivio, J., Giacometti, V. & Kis, A. Single-layer MoS2 transistors. Nat. Nanotechnol. 6, 147–150 (2011).

36. 36.

van der Zande, A. M. et al. Grains and grain boundaries in highly crystalline monolayer molybdenum disulphide. Nat. Mater. 12, 554–561 (2013).

37. 37.

Komsa, H.-P. & Krasheninnikov, A. V. Native defects in bulk and monolayer MoS2 from first principles. Phys. Rev. B 91, 125304 (2015).

38. 38.

Lu, C. P., Li, G., Mao, J., Wang, L. M. & Andrei, E. Y. Bandgap, mid-gap states, and gating effects in MoS2. Nano Lett. 14, 4628–4633 (2014).

39. 39.

Ponomarev, E. et al. Hole transport in exfoliated monolayer MoS2. ACS Nano 12, 2669–2676 (2018).

40. 40.

Hong, J. et al. Exploring atomic defects in molybdenum disulphide monolayers. Nat. Commun. 6, 6293 (2015).

41. 41.

Zhou, W. et al. Intrinsic structural defects in monolayer molybdenum disulfide. Nano Lett. 13, 2615–2622 (2013).

42. 42.

Kim, I. S. et al. Influence of stoichiometry on the optical and electrical properties of chemical vapor deposition derived MoS2. ACS Nano 8, 10551–10558 (2014).

43. 43.

Nan, H. et al. Strong photoluminescence enhancement of MoS2 through defect engineering and oxygen bonding. ACS Nano 8, 5738–5745 (2014).

44. 44.

Nipane, A., Karmakar, D., Kaushik, N., Karande, S. & Lodha, S. Few-layer MoS2 p-type devices enabled by selective doping using low energy phosphorus implantation. ACS Nano 10, 2128–2137 (2016).

45. 45.

Parkin, W. M. et al. Raman shifts in electron-irradiated monolayer MoS2. ACS Nano 10, 4134–4142 (2016).

46. 46.

Tosun, M. et al. Air-stable n-doping of WSe2 by anion vacancy formation with mild plasma treatment. ACS Nano 10, 6853–6860 (2016).

47. 47.

Carroll, K. M. et al. Speed dependence of thermochemical nanolithography for gray-scale patterning. Chemphyschem: a Eur. J. Chem. Phys. Phys. Chem. 15, 2530–2535 (2014).

48. 48.

Liang, J. & Fernandez, J. M. Kinetic measurements on single-molecule disulfide bond cleavage. J. Am. Chem. Soc. 133, 3528–3534 (2011).

49. 49.

Lee, C. et al. Anomalous lattice vibrations of single and few-layer MoS2. ACS Nano 4, 2695–2700 (2010).

50. 50.

Azcatl, A. et al. Covalent nitrogen doping and compressive strain in MoS2 by remote N2 plasma exposure. Nano Lett. 16, 5437–5443 (2016).

51. 51.

Chambers, S. A., Droubay, T., Kaspar, T. C. & Gutowski, M. Experimental determination of valence band maxima for SrTiO3, TiO2, and SrO and the associated valence band offsets with Si(001). J. Vac. Sci. Technol. B 22, 2205 (2004).

52. 52.

Fantauzzi, M., Elsener, B., Atzei, D., Rigoldi, A. & Rossi, A. Exploiting XPS for the identification of sulfides and polysulfides. RSC Adv. 5, 75953–75963 (2015).

53. 53.

Bergeron, H. et al. Chemical vapor deposition of monolayer MoS2 directly on ultrathin Al2O3 for low-power electronics. Appl. Phys. Lett. 110, 053101 (2017).

54. 54.

Neal, A. T., Pachter, R. & Mou, S. P-type conduction in two-dimensional MoS2 via oxygen incorporation. Appl. Phys. Lett. 110, 193103 (2017).

55. 55.

Tongay, S. et al. Defects activated photoluminescence in two-dimensional semiconductors: interplay between bound, charged, and free excitons. Sci. Rep. 3, 2657 (2013).

56. 56.

Liu, D., Guo, Y., Fang, L. & Robertson, J. Sulfur vacancies in monolayer MoS2 and its electrical contacts. Appl. Phys. Lett. 103, 183113 (2013).

57. 57.

Peto, J. et al. Spontaneous doping of the basal plane of MoS2 single layers through oxygen substitution under ambient conditions. Nat. Chem. 10, 1246–1251 (2018).

58. 58.

Zheng, X. R. et al. Patterning metal contacts on monolayer MoS2 with vanishing Schottky barriers using thermal nanolithography. Nat. Electron. 2, 17–25 (2019).

59. 59.

Ortiz-Conde, A. et al. A review of recent MOSFET threshold voltage extraction methods. Microelectron. Reliab. 42, 583–596 (2002).

60. 60.

Kittel, C. Introduction to Solid State Physics (Wiley, 2004).

61. 61.

Schroder, D. K. Semiconductor Material and Device Characterization. 3rd edn. (John Wiley & Sons, Inc., 2006).

62. 62.

Gao, L. et al. Defect-engineered atomically thin MoS2 homogeneous electronics for logic inverters. Adv. Mater. 32, 1906646 (2020).

63. 63.

Rawlings, C. et al. High throughput lithography using thermal scanning probes. in 2017 19th International Conference on Solid-State Sensors, Actuators and Microsystems (TRANSDUCERS) 418–422. (2017). https://doi.org/10.1109/TRANSDUCERS.2017.7994076.

64. 64.

Lee, J. et al. Electrical, thermal, and mechanical characterization of silicon microcantilever heaters. J. Microelectromech. Syst. 15, 1644–1655 (2006).

65. 65.

Giannozzi, P. et al. QUANTUM ESPRESSO: a modular and open-source software project for quantum simulations of materials. J. Phys. Condens. Matter 21, 395502 (2009).

66. 66.

Troullier, N. & Martins, J. L. Efficient pseudopotentials for plane-wave calculations. Phys. Rev. B 43, 1993–2006 (1991).

67. 67.

Perdew, J. P., Burke, K. & Ernzerhof, M. Generalized gradient approximation made simple. Phys. Rev. Lett. 77, 3865–3868 (1996).

68. 68.

Dumcenco, D. et al. Large-area epitaxial mono layer MoS2. ACS Nano 9, 4611–4620 (2015).

69. 69.

Monkhorst, H. J. & Pack, J. D. Special points for brillouin-zone integrations. Phys. Rev. B 13, 5188–5192 (1976).

70. 70.

Methfessel, M. & Paxton, A. T. High-precision sampling for brillouin-zone integration in metals. Phys. Rev. B 40, 3616–3621 (1989).

## Acknowledgements

This article is based upon work supported by the U.S. Department of Energy, Office of Basic Energy Sciences (grant no. DE-SC0018924). We thank Prof. Angelo Bongiorno at the CUNY College of Staten Island for guidance and relevant discussions. We thank Prof. Robert Szoszkiewicz for valuable ideas and discussions. We thank Dr. Robert Keyse at Lehigh University for assistance with TEM imaging, in particular M.D. and P.M.D. acknowledge funding from NSF, Grant EFRI 2-DARE (EFRI-1542707) for TEM work.

## Author information

Authors

### Contributions

E.R. conceived, developed, and directed the entire research project. X.Z., A.C., X.L., Z.H., E.A., F.L., T.-D.L., and V.N. performed the experimental studies. X.Z. and A.C. analyzed the data. T.C. performed the DFT calculations. M.D. and P.M.D. performed the TEM experiments, C.A. directed the XPS experiments. J.W.H. designed the environmental chamber under the direction of M.V., D.S. directed the FET measurements. W.P.K. provided the tc-SPL probes. All authors contributed to the paper writing and revisions.

### Corresponding authors

Correspondence to Davood Shahrjerdi or Elisa Riedo.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Peer review information Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. Peer review reports are available.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Zheng, X., Calò, A., Cao, T. et al. Spatial defects nanoengineering for bipolar conductivity in MoS2. Nat Commun 11, 3463 (2020). https://doi.org/10.1038/s41467-020-17241-1

• Accepted:

• Published:

• ### Hidden Vacancy Benefit in Monolayer 2D Semiconductors

• Xiankun Zhang
• , Qingliang Liao
• , Zhuo Kang
• , Baishan Liu
• , Xiaozhi Liu
• , Yang Ou
• , Jiankun Xiao
• , Junli Du
• , Yihe Liu
• , Li Gao
• , Lin Gu
• , Mengyu Hong
• , Huihui Yu
• , Zheng Zhang
• , Xiangfeng Duan
•  & Yue Zhang

• ### Photothermal antenna effects derived from the one-to-one coupling nanohybrids of Au plasmonics and MoS2 semiconductors

• Hao Lin Zou
• , Xiao Juan Du
• , Hong Qun Luo
• , Nian Bing Li
•  & Bang Lin Li

Journal of Materials Chemistry C (2021)

• ### Enhanced Near‐Infrared Photocatalytic Eradication of MRSA Biofilms and Osseointegration Using Oxide Perovskite‐Based P–N Heterojunction

• Congyang Mao
• , Weidong Zhu
• , Yiming Xiang
• , Yizhou Zhu
• , Jie Shen
• , Xiangmei Liu
• , Shuilin Wu
• , Kenneth M. C. Cheung
•  & Kelvin Wai Kwok Yeung

• ### Maskless Device Fabrication and Laser-Induced Doping in MoS2 Field Effect Transistors Using a Thermally Activated Cyclic Polyphthalaldehyde Resist

• Alonit Kafri
• , Debopriya Dutta
• , Subhrajit Mukherjee
• , Pranab K. Mohapatra
• , Ariel Ismach

ACS Applied Materials & Interfaces (2021)

• ### Nanofabrication of graphene field-effect transistors by thermal scanning probe lithography

• Xiangyu Liu
• , Zhujun Huang
• , Xiaorui Zheng
• , Davood Shahrjerdi
•  & Elisa Riedo

APL Materials (2021)