Introduction

Two-dimensional (2D) transition metal dichalcogenides (TMDCs) have been shown to exhibit exceptional electronic, magnetic, optical, mechanical, and catalytic properties1,2,3,4,5. The discontinuity represented by the one-dimensional (1D) edges of 2D TMDCs are analogous to the surfaces of bulk materials, which can impart new properties as well as functionalities6,7,8,9. For example, 2D MoS2 monolayer is a direct gap semiconductor with a bandgap of 1.8 eV, while the 1D MoS2 zigzag (ZZ) edge is metallic10,11. Moreover, it is the edges of 2D TMDCs that are responsible for high catalytic activities, while the basal planes are chemically inert12,13,14,15. Therefore, understanding the properties as well as the synthesis conditions of the edges in 2D TMDCs is critical to the design of new functional materials.

The lower symmetry of TMDCs compared with graphene, which normally exhibits ZZ or armchair (AC) edges16, enables them to present a greater diversity of edge structures and compositions. For example, using molecular beam epitaxy (MBE) under conditions of high Mo flux and atomic-resolution electron microscopy, two types of new reconstructed Mo- terminated edges have been synthesized and imaged. Attributed to the presence of the reconstructed edges, nanoporous MoS2 films were found to have excellent activity for hydrogen evolution reaction (HER) and are magnetic up to 400 K17. Moreover, recent in situ heating experiments using scanning transmission electron microscopy (STEM) to track the edge evolution in monolayer Mo1−xWxSe2 (x = 0.05) flakes demonstrated that by varying the local chemical environment, a variety of reconstructed non-stoichiometric edges can be formed18. Using first-principles density functional theory (DFT), we have shown that these reconstructed MoSe2 edges can have near optimal HER activity over conventional stoichiometric edges19. These studies demonstrated that the edges of TMDCs can be tuned at the nanoscale level, in some cases with high fidelity, giving rise to reconstructions that provide improved functional properties.

Despite these aforementioned successes, the whole family of synthesizable reconstructed edges in 2D TMDCs remains largely unknown. This presents a unique opportunity to computationally screen and discover additional functional reconstructed TMDC edges; in this article, we lay out such a computational approach. Starting with configuration ensemble generations, we screen for stable edges using a computationally affordable force-field method. The obtained stable edges are then further refined with DFT based electronic-structure calculations to generate phase diagrams and screen for their functional properties. Our study thus provides a comprehensive yet affordable computational scheme for predicting synthesizable functional edges of 2D materials and provides useful guidelines to experimental researchers. Many studies have investigated tuning the catalytic, electronic and magnetic properties of TMDCs by external doping in an Edisonian approach20,21,22,23, but the merit of our study is to discover a family of ‘intrinsically’ (based on the metal/chalcogen ratio) tunable materials with widely varying functional properties. Success of our study opens a new materials-by-design paradigm to search and discover other families of 2D ‘intrinsic’ edge reconstructions with specific multi-functionalities, with potential edge polytypism, for a wide range of nanoscale applications.

Results and discussion

Workflow for predicting synthesizable functional edge reconstructions in 2D TMDCs

We use a nanoribbon model to study the edge reconstructions in 2D TMDCs. As shown in Fig. 1, for a given type (MoS2, MoSe2, WS2, WSe2…) and phase (2H, 1T, 1T′…) of TMDC, we set a region of width ‘w’ to look for all possible edge reconstructions in a nanoribbon of length ‘L’. The total width of the nanoribbon in our study is seven pairs of Mo and S rows (~18.96 Å). We then generate nm edge configurations by tiling the underlying triangular lattice, where m and n correspond to the number of rows in the reconstructed region (i.e., m = w) and number of possible occupancies considered for each row, respectively. For example, in our work with MoS2, we set the width of the reconstructed region to be 4 rows, and consider 5 possible occupancies (blank, Mo, S up, S down, and S up and down) for each row, to obtain 54 (625) edge configurations. After the full set of edge configurations are obtained, we use a cost-effective force-field method which has been benchmarked and validated against DFT to screen for stable edges. To date, several force-field methods have been developed for TMDCs24,25,26, and here we choose a recently reported reactive force-field (ReaxFF) model for MoS227. In principle, the structures can be also used to fit a neural-network based surrogate model, as has been shown for other materials28. The stable edges are then further refined with explicit DFT calculations to generate phase diagrams and provide guidelines to experimentalists for synthesis. At last, the synthesizable edges are chosen to study the functionalities, including their catalytic activities (e.g., HER), half-metallicity and magnetic variations, with potentially more properties waiting to be discovered, such as topologically protected (magnetic) edge-state for dissipationless quantum nanotransport. In the following sections, we’ll apply this workflow to a model system MoS2.

Fig. 1: Workflow for predicting synthesizable multi-functional edge reconstructions in 2D TMDCs.
figure 1

Starting with configuration ensemble generations for a given size of the TMDC nanoribbon in a particular phase, stable edges are screened by using a computationally affordable force field method. The energies of stable edges are then further refined with DFT based electronic-structure calculations to generate phase diagrams to identify synthesizable edge reconstructions, whose functional properties can subsequently be computed.

Screening for stable reconstructed edges

To screen for stable reconstructed edges, we would like to use force fields or surrogate (neural-network-based) methods, as geometry optimizations (and simulated annealing if necessary) of thousands of edges at the DFT level of theory would be computationally prohibitive. Herein we choose a ReaxFF reactive potential, which can adequately describe the thermodynamic and structural properties of MoS2 sheets, guided by extensive DFT simulations27. To validate the reliability of ReaxFF in identifying stable edges, we compare the formation energies from ReaxFF with DFT for all the generated 625 edge configurations without geometry optimizations, on both 2H and 1T MoS2 phases. The convex hull plots (formation enthalpy as a function of Mo percent) are shown in Fig. 2a, b, d and e. Both DFT and ReaxFF calculations show that there exists a large quantity of edge configurations which have negative formation enthalpies. Some were found to be even more stable than the conventional unreconstructed edges (as indicated by the cyan dots in the figures), as they fall below the lines that connect the pure elements and the unreconstructed edges. Here, the unreconstructed edge refers to the ZZMo edge. As shown in Fig. 2c and f, with the exception of data points with unreasonably high formation enthalpies (indicating unstable edges with unphysical atomic geometries), there is a strong linear correlation between the DFT and ReaxFF energies, indicating that the ReaxFF potential can identify stable reconstructed edges.

Fig. 2: The convex hull plots without geometry optimizations and the comparison between DFT and ReaxFF energies.
figure 2

a, b, The convex hull plots obtained from DFT and ReaxFF calculations and c, the comparison between DFT and ReaxFF energies for 2 H MoS2. d, e, The convex hull plots obtained from DFT and ReaxFF calculations and f, the comparison between DFT and ReaxFF energies for 1T MoS2. The cyan dots in (a), (b), (d) and (e) indicate the unreconstructed stoichiometric edges. The green dotted lines in (c) and (d) correspond to y = x.

Next, we use the ReaxFF potential to perform geometry optimizations of the generated 625 edge configurations to screen for stable edges. Figure 3 shows the convex hull plots after geometry optimizations with ReaxFF for 2H and 1T MoS2. One can see that most of the edges become energetically favorable (i.e., have negative formation enthalpies) after geometry optimizations. In addition, 161 2H and 168 1T MoS2 edges fall below the lines connecting the unreconstructed edges and the pure elements. This indicates a significant portion of reconstructed edges for each phase are more stable than the conventional unreconstructed edges. The left and right slopes of each data point can give an idea about the stability range as a function of chemical potential, but we’ll further generate phase diagrams to provide more accurate information on the synthesis conditions where these edges can be experimentally realized.

Fig. 3: The convex hull plots after geometry optimizations.
figure 3

a The convex hull plots after geometry optimizations with ReaxFF for 2H MoS2. b The convex hull plots after geometry optimizations with ReaxFF for 1T MoS2. The cyan dots in (a) and (b) indicate the unreconstructed stoichiometric edges.

Screening for synthesizable reconstructed edges

The lowest data points of each stoichiometry shown in Fig. 3 correspond to the edges which are most likely synthesized under specific chemical environments. Thus we choose these edge structures for 2H MoS2 to perform further DFT calculations. The reason why we choose the phase of 2H in this work is that it is more stable than 1T, and its known edges are active for catalysis12,13,14,15. Figure 4 shows the DFT refined edge structures for the lowest data points of each stoichiometry. The edges are labeled based on the orientation with respect to the hexagonal lattice of MoS2 (e.g., Mo-oriented ZZMo), and the outermost termination group (e.g., S-terminated (-S) and Mo-terminated (-Mo)). Since our work considers the reconstructions on one side of the nanoribbons, the edges are all derived from the Mo-oriented unreconstructed edge (ZZMo). We have successfully reproduced 3 Mo-oriented edges found from previous experimental studies: ZZMo, ZZMo-S, and ZZMo-S217,18, which validates our approach. These edges currently serve as the basis for most studies of physical and chemical properties of MoS2 edges. More excitingly, we have also predicted nine new reconstructed edges with record stability not found in the literature (highlighted in orange). This discovery reveals that there is a large undiscovered set of experimentally realizable edges in the structure space which is being currently overlooked.

Fig. 4: Top and side views of the predicted stable edges with different stoichiometries.
figure 4

The percentage of Mo in each nanoribbon is shown in bracket. The edges are labeled based on the orientation and the outermost termination group. Mo, cyan; S, yellow.

Notably, two of the predicted reconstructed edges contain grain boundaries (GBs): ZZMo-GB-Mo and ZZMo-GB-S. GBs in 2D materials connect two regions with different orientations. Various GBs have been observed in MoS2 monolayers, such as the ones made of 4 | 4, 4 | 6, 4 | 8, 5 | 7, or 6 | 8 ring pairs29,30,31. GBs can affect the properties of MoS2 monolayers significantly. For example, recent study shows that GBs in MoS2 exhibit superior HER catalytic activity, combined with long-term stability32. The new predicted ZZMo-GB-Mo edge contains octagon rings, and this type of GB is firstly discovered. Meanwhile, ZZMo-GB-S contains a previously observed 6 | 8 boundary, which switches the orientation of the edge from Mo-oriented to S-oriented.

To better understand the synthesis conditions of the predicted reconstructed edges, we generated the phase diagram with the formation energy as a function of the sulfur chemical potential (Fig. 5). As one can see, the most stable edges from the Mo-rich limit to S-rich limit are ZZMo-Mo2, ZZMo-MoS2, ZZMo-S, ZZMo-S2, and ZZMoS4. Therefore, these edges can be synthesized by tuning the chemical potential via controlled MBE growth17 or via controlling heating and electron beam irradiation under STEM18. Our results on ZZMo-S and ZZMo-S2 are in agreement with previous studies18. Besides the five edges, the other seven edges can also be formed, as they have extremely close formation energies to the five edges under various chemical potential windows. For example, at the sulfur chemical potential of −3.9 eV, the formation energies of ZZMo-S2, ZZMo-S3, and ZZMo-S4 are within 0.1 eV/Å, and could likely coexist. In addition, it is reported that the ZZMo edge (indicated by the red dash line in Fig. 5) can be formed under Mo-rich conditions17. ZZMo-Mo2S, ZZMo-MoS, and ZZMo-GB-Mo have lower formation energies than ZZMo under Mo-rich conditions, so it is anticipated that they can also be formed under the same Mo-rich conditions.

Fig. 5: Formation energies Ef (eV/Å) of the predicted edges as a function of sulfur chemical potential µS (eV).
figure 5

The S-oriented edge with 50% S coverage ZZS (50%) was also plotted for comparison. The two vertical dashed lines denote the range −5.4 eV < µS < −4.2 eV, where MoS2 can remain thermodynamically stable with respect to the formation of bulk Mo (µS = −5.4 eV) or bulk SS = −4.2 eV).

For comparison, we have also plotted the often-discussed S-oriented edge with 50% S coverage33 in Fig. 5. It is a Mo-rich edge with the same stoichiometry as the ZZMo-MoS edge, so it is parallel to ZZMo-MoS in the figure. Compared with the Mo-rich Mo-oriented edges, the S-orientated edge with 50% S coverage is more stable than ZZMo-Mo2S, ZZMo-MoS, ZZMo-GB-Mo, but is less stable than ZZMo-Mo when µS is from −7.0 to −6.4 eV. However, it becomes the most stable edge among all the studied edges in this work when µS increases to the range of −6.4 to −6.1 eV. As µS further increases, the stoichiometric ZZMo-MoS2 becomes the most stable edge, followed by three S-rich Mo-orientated edges ZZMo-S, ZZMo-S2, and ZZMo-S4.

One point of interest to note is that ZZMo is not the most stable stoichiometric edge (33.3% Mo). The most stable stoichiometric edge we discovered is the reconstructed ZZMo-MoS2 edge, which is 0.63 eV/supercell lower in energy than the unreconstructed ZZMo edge, and more importantly, 0.35 eV/supercell lower than the currently recognized most stable stoichiometric edge34. This energetically strongly preferred stoichiometric ZZMo-MoS2 edge should be considered in future studies of MoS2 edges. It may have interesting consequences in growth. For example, if growth continues from this edge, it could propagate along a different angle, and then a GB which bends the overall sheet structure can be obtained. The metastable edges like ZZMo might be favored due to kinetic stabilization, and they could also be more catalytically active35. Thus we select three metastable edges to study to simply demonstrate the viability of the metastable reconstructions. Beyond these, there are hundreds of other metastable edges which are worthy of investigation in the future. Supplementary Figure 1 shows the structures of four metastable edges. ZZMo-S2Mo is another metastable stoichiometric edge, and contains seven-member rings, which often appear in GBs of MoS2 monolayers. ZZMo-S and ZZMo-GB contain 31.5% Mo (same stoichiometry as ZZMo-S). ZZMo-S has similar configuration as the observed Mo-Klein edge17, while ZZMo-GB contains a 6 | 8 boundary similar as ZZMo-GB-S, but with less S at the edge. It is expected that these metastable edges can be kinetically stabilized and show promising catalytic activities.

One thing to note is that µMo and µS need to remain smaller than µMo(bulk) and µS(bulk), respectively, to avoid the decomposition of MoS2 to bulk Mo or S. Our computed µS(bulk) ≈ ES(bulk) = −4.2 eV, and µMo(bulk) ≈ EMo(bulk) = −11.5 eV. By assuming µMo + 2µS = ε at equilibrium, where ε is the energy per formula unit of MoS2 monolayer, the upper and lower bounds of µS were determined to be −4.2 and −5.4 eV(as indicated by the two vertical dashed lines in Fig. 5). This is in good agreement with previous studies36. Although some of the edges are predicted to be stabilized under conditions beyond this limit, these edges have been observed experimentally due to some kinetic reasons17,18.

HER activity on predicted synthesizable reconstructed edges

One major promising application for the predicted synthesizable reconstructed edges are for HER, part of the water splitting reaction37,38,39. Electrochemical HER using renewable energy can provide a sustainable supply of fuel for future societies with hydrogen as the key energy carrier40. Since H adsorption is the first step in HER, and the Gibbs free energy for hydrogen adsorption (ΔGH) is a well-established descriptor for the HER41,42,43, we screen for HER activity via ΔGH. Figure 6a shows the computed ΔGH for the fifteen predicted edges (including both stable and metastable edges and the metastable edges are marked with asterisk). Since a close-to-zero value of ΔGH suggests a good HER catalyst, we predict six edges (ZZMo-S, ZZMo, ZZMo-MoS2, ZZMo-S, ZZMo-Mo2, and ZZMo-GB-Mo) to be good HER catalysts (the absolute values of ΔGH for these edges are within 0.2 eV of the optimal point). Our results on the existing edges (ZZMo, ZZMo-S, ZZMo-S2) are in agreement with previous studies14,17. Notably, we discovered four new synthesizable reconstructed edges could be better HER catalysts than the existing active edges. Figure 6b shows the structures of H adsorption at the six most active edges. For the S-terminated edges (ZZMo-S, ZZMo-MoS2, and ZZMo-S), H is adsorbed at the S sites, while for the Mo-terminated edges (ZZMo, ZZMo-Mo2, and ZZMo-GB-Mo), H is adsorbed at the Mo sites. Thus, H always prefers to adsorb at the under-coordinated sites, as these sites are more active44. We have considered H coverage effects on ΔGH for all the edges, and the optimal H coverages (when ∆GH is most close-to-zero) of the six most active edges are 50%, 100%, 50%, 25%, 25%, and 50%, respectively. H coverage is defined by nH/nsite, where nH is the number of adsorbed H, and nsite is total number of equivalent adsorption site.

Fig. 6: HER activity on predicted synthesizable reconstructed edges.
figure 6

a Calculated free energy diagram for hydrogen evolution of the predicted synthesizable edges (metastable edges are marked with asterisks). b Structures of H adsorption at the predicted six most active edges: ZZMo-S, ZZMo, ZZMo-MoS2, ZZMo-S, ZZMo-Mo2, ZZMo-GB-Mo. Mo, cyan; S, yellow; H, red.

Our previous study shows that the optimal HER performance cannot be obtained in the pristine ZZMo and ZZS (or Se) edges19. Indeed, here we further prove that the reconstructed edges could achieve better HER performance. Specifically, we find that ∆GH is 0.10 eV for ZZMo, while it decreased to 0.03 eV for ZZMo-MoS2, and −0.01 eV for ZZMo-S. Since ZZMo-MoS2 is the most stable stoichiometric edge discovered so far, it is highly expected that this predicted reconstructed edge can be synthesized and applied to HER in the near future. While the energetic difference is not dramatic, a tiny change in ∆GH near zero could result in a difference of several orders of magnitude improvement in exchange current density45. One thing to note is that our calculations assume that the catalyst is charge neutral for computational simplicity, but in reality, the catalyst is usually charged to match its Fermi level with the applied electrode potential. Previous study has shown that due to the charge induced change in the occupation of electronic states, the charge on 2D materials can have a strong impact on the electrochemical reactions43. Therefore, while our current approach looks at the intrinsic HER activities, we hope to further explore HER activities in operating conditions on the reconstructed edges by including the charge effects in the future. Moreover, the chemical interactions between the reaction intermediate adsorbed on the catalyst and the surrounding solvent molecules are neglected in our study. These interactions can be strong for reactions in aqueous solution when the intermediate contains a highly charged atom that can form hydrogen bond(s) with water, for example electrochemical CO2 reduction (CO2R)46. Since the adsorbed intermediate H at the studied edges is nearly charge neutral, it is expected that these interactions won’t be very strong, which we also hope to further explore in the future.

Further applications in nanodevices

Table 1 lists the electronic and magnetic properties of the nanoribbons containing the predicted synthesizable reconstructed edges. It shows that edge reconstructions can effectively modify the properties of the nanoribbons. Specifically speaking, nanoribbons with reconstructed edges could become half-metallic. Figure 7 shows the density of states (DOS) of the half-metallic nanoribbon with the unreconstructed ZZS edge on one side and the reconstructed ZZMo-MoS3 edge on the other side. The spin up channel has a gap of 0.38 eV, while the spin down channel is metallic. Our spin density and projected DOS plots show that the half-metallicity is mainly from the reconstructed side. The reconstruction-induced peculiar half-metallic nature which allows electrons of only one spin direction to move can be used in spin-based electronics as proposed for half-metallic graphene nanoribbons47,48. Meanwhile, the magnetic moments of the nanoribbons vary significantly due to the edge reconstructions. It was recently reported that by integrating multiple magnetic units into a single piece of MoS2 nanoribbon, magnetic devices for information storage can be achieved49. Here we provide many synthesizable reconstructed edges with different local magnetic moments, which can further improve the density of information storage.

Table 1 Electronic (metallic or half-metallic) and magnetic (magnetic moment µB/supercell) properties of nanoribbons with predicted synthesizable reconstructed edges.
Fig. 7: Density of states (DOS) of the half metallic nanoribbon.
figure 7

The Fermi level (dashed line) is set as zero. The structure of the nanoribbon which has the unreconstructed ZZS edge on one side and the reconstructed ZZMo-MoS3 edge on the other side is also shown.

To further understand potential applications of reconstructed edges in nanodevices, we examine the electronic and magnetic properties of MoS2 nanoribbons with all the generated 625 edge configurations. Interestingly, we find that 41 2H MoS2 nanoribbons become half-metallic due to the edge reconstruction, representing a significant proportion of the generated structures. Supplementary Fig. 2 shows the DOS for one of the half-metallic nanoribbons (the geometry is also shown). One can see that near the Fermi level, one spin channel is continuous, while other spin channel has a relatively wide gap of ~0.44 eV. Meanwhile for the 1T MoS2 nanoribbons, we find they are all metallic, consistent with the fact that 1T MoS2 monolayer itself is metallic. Regarding their magnetic properties, Fig. 8 shows the histograms of the magnetic moments for the 625 2H and 1T MoS2 nanoribbons. The pristine ZZ MoS2 nanoribbons possess magnetic moment of ~1.1 µB/supercell, in agreement with previous studies11. However, with edge reconstructions the magnetic moment can be dramatically changed. The range of the magnetic moment for 2H and 1T MoS2 is 0.3~6.2 µB/supercell, and 0.0~4.8 µB/supercell, respectively. Most of the 2H nanoribbons are in the range of 0.5~1.5 µB/supercell, while most of the 1T nanoribbons are in 0.0 ~1.0 µB/supercell. Therefore, the magnetic moment of a nanoribbon can be increased by 4~6 times by edge reconstructions. These results show that reconstructed edges have great potential applications in nanodevices due to their tunable electronic and magnetic properties.

Fig. 8: Histograms of the magnetic moments for the nanoribbons.
figure 8

a Histograms of the magnetic moments for the 2H nanoribbons with the generated 625 edges. b Histograms of the magnetic moments for the 1T nanoribbons with the generated 625 edges. The structures and magnetic moments of the pristine nanoribbons are also indicated. Mo, cyan; S, yellow.

Given the potential for nanoribbons to host topologically protected states, in the future, it is worthy to investigate how edge reconstructions modify the topology of the electronic-bands and related properties of MoS2 nanoribbons as recently reported for the carbon nanoribbons50. It is known that pristine MoS2 nanoribbons demonstrate the quantum valley Hall effect, while some other TMDC nanoribbons present a topological insulator phase51. Moreover, 1D topological superconductivity can be realized by placing a TMDC monolayer with M terminated ZZ edge on top of a superconducting substrate52. From these revelations one is led to conceive edge reconstructions would affect the topology. Given that topology also plays a role in catalysis53,54,55, there are naturally interesting unexplained implications for (say) HER performance. Applying machine-learning algorithms on our workflow-generated dataset to screen the functional properties of more on-lattice and off-lattice reconstructions, even with larger wavelength reconstructions than we could compute using current DFT-approaches, is another interesting direction.

Discussion

In conclusion, we have developed a computational approach to rapidly and efficiently discover more synthesizable functional edges in the family of 2D TMDCs. Using MoS2 as an example, we screened 625 edge configurations for 2H and 1T MoS2 phases, and predicted stable edges to guide the experimental synthesis. Subsequently we studied the functional properties of these edges. We discover many of these intrinsically tunable edge reconstructions to be near-optimal for HER. More excitingly, they exhibit half-metallicity and broad variation in local magnetic moments (0.3~6.2 µB/supercell) making them suitable in nanodevices for applications in spintronics and information storage. In the future, the effects of edge reconstructions on the topological properties of TMDC nanoribbons are worthy of further investigations. Combining our current computational approaches to other neural-network and/or evolutionalry structure-search algorithms can lead to accelerating discoveries of more functional edge-reconstructions in 2D materials. Our work thus opens a new materials-by-design paradigm, to ‘intrinsically’ edge engineer multi-functionalities in 2D TMDCs for a wide range of technological applications.

Methods

Details of DFT and force field simulations

Spin-polarized DFT calculations were performed using the Vienna ab initio simulation package (VASP)56,57. Electron exchange-correlation was represented by the functional of Perdew, Burke and Ernzerhof (PBE) of generalized gradient approximation (GGA)58. The ion-electron interaction was described with the projector augmented wave (PAW) method59. The plane-wave cutoff is set to 400 eV, and a conjugate gradient method is applied to relax the geometry until interatomic forces are less than 0.025 eV/Å. The Brillouin zone was sampled using a 3 × 1 × 1 Monkhorst-Pack k-point meshes for the 4 × 1 supercells. Vacuum spaces in y and z directions are larger than 20 Å. The ReaxFF calculations were performed using Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS)60. The energy in ReaxFF is written as the sum of the bond energy (Ebond), valence-angle (Eval), torsion-angle energy (Etor), lone pair (Elp), and over-coordinate (Eover) and under-coordinate (Eunder) energy penalties plus the nonbonded van der Waals (Evdw) and Coulomb (ECoulombic) contributions27.

Formation energy calculations

The formation energy per atom was calculated by

$$E_f/A = \frac{{E_{\mathrm{tot}}\left( {\mathrm{Mo}_x\mathrm{S}_y} \right) - x\mu _{\mathrm{Mo}} - y\mu _S}}{{x + y}}$$
(1)

where Etot(MoxSy) is the total energy of the MoxSy nanoribbon, and μMo and μS are the chemical potentials of Mo and S. To determine whether the edges can be formed and are stable against decomposition into bulk Mo or bulk S, we constructed convex hull plots in Figs. 2 and 3. The chemical potentials used there are µMo in body-centered cubic (bcc) Mo and µS in orthorhombic alpha-S, which were obtained from the computed energies per atom at T = 0 K by neglecting the entropic terms for the condensed states (i.e., µS(bulk) ≈ ES(bulk) = −4.2 eV, and µMo(bulk) ≈ EMo(bulk) = −11.5 eV). To generate the phase diagram (formation energy as a function of chemical potential), it was assumed that µMo + 2µS = ε, where ε is the energy per formula unit of MoS2 monolayer61. Then, the formation energy changed to

$${E}_{\mathrm{f}} = {E}_{{\mathrm{tot}}}\left( {{\mathrm{Mo}}_{x}{\mathrm{S}}_{y}} \right) + (2{x} - {y})\mu _{\mathrm{S}} - {\mathrm{x}}\varepsilon$$
(2)

H adsorption energy calculations

The differential H adsorption energy ΔEH was calculated by

$$\Delta {E}_{\mathrm{H}} = {E}\left( {{\mathrm{Mo}}_{x}{\mathrm{S}}_{y} + {\mathrm{nH}}} \right)--{E}\left( {{\mathrm{Mo}}_{x}{\mathrm{S}}_{y} + \left( {{n} - 1} \right){\mathrm{H}}} \right) - 1/2{E}\left( {{\mathrm{H}}_2} \right)$$
(3)

where E(MoxSy + nH) and E[MoxSy + (n − 1)H] represent the total energy of the MoxSy nanoribbon with n and (n – 1) adsorbed H atoms, respectively, and E(H2) represents the total energy of a gas phase H2 molecule. A negative value of ΔEH suggests favorable absorption. The Gibbs free energy of H adsorption ΔGH was obtained by

$$\Delta {G}_{\mathrm{H}} = \Delta {E}_{\mathrm{H}} + \Delta {E}_{{\mathrm{ZPE}}} - {T}\Delta {\mathrm{S}}_{\mathrm{H}}$$
(4)

where ΔEZPE is the difference in zero-point energy between the adsorbed H and H in the gas phase H2 molecule, and ΔSH is the entropy difference between the adsorbed H and ½ H2 in the gas phase under standard conditions. The zero-point energy was calculated by summing vibrational frequencies ω over normal modes ν: \(E_{\mathrm{ZPE}} = \frac{1}{2}{\sum} {\hbar \omega }\). The entropy of the free H2 molecule at 298.15 K and 1 atm was taken from the NIST database.