Peculiar electronic, strong in-plane and out-of-plane second harmonic generation and piezoelectric properties of atom-thick α-M2X3 (M = Ga, In; X = S, Se): role of spontaneous electric dipole orientations

Second harmonic generation (SHG) and piezoelectric properties of two-dimensional (2D) materials are sparking great interest. However, out-of-plane SHG in 2D materials has been rarely reported; the theoretical out-of-plane piezoelectric response in atom-thick 2D materials is very limited at the present stage. α-M2X3 monolayers exhibit out-of-plane spontaneous polarizations, promising out-of-plane SHG and piezoelectricity. Here, we perform first-principles calculations of the electronic, SHG and piezoelectric properties of single- and few-layer α-M2X3. Results indicate the bandgaps of α-M2X3 monolayers are in the visible range, and become much narrower as the layer number goes up. Furthermore, the narrower bandgaps are broadened by more than 1.00 eV by switching the electric dipole orientation in few-layer α-M2X3. α-M2X3 monolayers exhibit superior in-plane and out-of-plane SHG properties; in particular, their out-of-plane SHG coefficients are comparable with those of GaAs crystals. Furthermore, the out-of-plane SHG coefficients can be effectively tuned by switching the electric dipole orientation in α-M2X3 few-layers. α-M2X3 monolayers exhibit superior in-plane and considerable out-of-plane piezoelectricity, and the latter is significantly enhanced in bilayer α-M2X3 because of the built-in electric field originating from the parallel electric dipoles. Our work will stimulate research on the ultrathin 2D photo detection, SHG and piezoelectric devices.


Introduction
Second harmonic generation (SHG) and piezoelectric properties caused by noncentrosymmetry in two-dimensional (2D) atomthick materials are sparking great interest. For instance, 2D MoS 2 , 1,2 GaSe, 3,4 SiC, 5 BN 6 and GeC 7 nanosheets display fascinating prospects in ultrathin SHG devices. However, these 2D materials only exhibit in-plane SHG properties as they embody out-of-plane centrosymmetric characters, i.e. out-of-plane SHG has not been discovered in these 2D materials. On the other hand, monolayer BN, 8 MoS 2 , 9 GaSe, 10 GaSSe, 11 buckled hexagonal compounds 12 and doped graphene, 13 have a wide range of applications including in mechanical stress sensors, actuators and energy harvesting devices 14 since they are piezoelectric. Even though a recent calculation has found strong out-of-plane piezoelectricity in multilayer MoSTe 15 and a recent experiment has shown that out-of-plane piezoelectricity occurs in multilayer (10 nm-thick) a-In 2 Se 3 akes, 16 the obtained out-of-plane piezoelectricity in atom-thick 2D materials such as monolayers [11][12][13] and bilayers is very limited. This makes it impossible to fabricate effective ultrathin 2D piezoelectric devices allowing out-of-plane mechanical-electrical energy conversions.
On the other hand, 2D nanosheets exfoliated from aand b-In 2 Se 3 bulk crystals are attracting great attention in the aspects of the thermal conductivity, phase transformation, 17,18 photoresponsibility, 19,20 sensitivity, 21 dielectric 22 and optical properties. 23 The electric eld perpendicular to aand b-In 2 Se 3 monolayers induce a semiconductor to metal transition. 24 Remarkably, the class of a-M 2 X 3 ferroelectric monolayers exhibit in-plane and out-of-plane reversible spontaneous polarizations, 25 promising in-plane and out-of-plane SHG and piezoelectric responses. Indeed, out-of-plane SHG has been recently discovered in monolayer a-In 2 Se 3 ; however the features and magnitude of the SHG coefficients are still unknown. 16 Moreover, monolayer multiferroics exhibit very small out-ofplane SHG coefficients c (2) zzy and c (2) zyz . 26 This simulates us to explore the SHG and piezoelectricity of a-M 2 X 3 monolayers using rst-principles calculations, expecting to nd strong outof-plane SHG and piezoelectricity.
Experiments indicate that the physical properties of In 2 Se 3 multilayer nanosheets, such as optical bandgap 23 and thermal conductivity, 17 show a strong layer-dependent behavior. These remind us to study the correlation between the layer thickness and the electronic, piezoelectric and SHG properties of atomicthick M 2 X 3 nanosheets. It should be noted that the nanosheet in our theoretical calculations is much thinner than that in previous experiments. 17,23 Moreover, the van der Waals heterostructure of a-In 2 Se 3 /WSe 2 shows a signicant bandgap reduction when switching the electric dipole orientation of the In 2 Se 3 layer. In essence, switching the electric orientation is changing stacking sequences. It has been shown SHG of few-layer GaSe nanosheets 27 and piezoelectricity of multilayer MoSTe 15 can be effectively tuned by using various stacking sequences. Therefore, it is meaningful to explore how the electric dipole orientation affects the electronic, piezoelectric and SHG properties of few-layer M 2 X 3 .

Calculation models and details
Single-and few-layer b-M 2 X 3 nanosheets are centrosymmetric, their piezoelectricity and SHG vanish. We thereby study the electronic, piezoelectric and SHG properties of monolayer a-M 2 X 3 (M ¼ Ga, In; X ¼ S, Se), and their top and side views are displayed in Fig. 1. To study the layer-dependent behavior, the bilayer and trilayer exfoliated from a-Ga 2 S 3 and a-In 2 Se 3 bulk crystals are considered, which are respectively named as AA and AAA stacking. Furthermore, to investigate the effect of the electric dipole orientation, bilayer AB is achieved by switching the electric dipole orientation of the bottom layer in AA, while trilayer ABA is attained by switching the electric dipole orientation of the middle layer in AAA.
All calculations are on the basis of the density functional theory (DFT) using the projector-augmented wave (PAW) 28 method as implemented in the Vienna Ab initio Simulation Package (VASP). [29][30][31][32] The generalized gradient approximation (GGA) parameterized by Perdew, Burke, and Ernzerhof (PBE) 33 with van der Waals (vdW) correction proposed by Crimme (DFT-D2) 34 is employed. The single electron wave functions are expanded with a large wave cutoff energy of 500 eV. To minimize the periodic interaction along the z axis, the vacuum spacing between adjacent nanosheets is set to be at least 20Å. A gammacentered k-point grid of 11 Â 11 Â 1 is used to optimize geometry structures, and the convergence criteria for electronic and ionic relaxations are respectively set as 10 À7 and 10 À3 eVÅ À1 . A k-point grid of 31 Â 31 Â 1 is used to calculate piezoelectric coefficients of monolayers and few-layers. The more dense k-point grid of 60 Â 60 Â 1 is used to obtain SHG coefficients of monolayers, while the k-point of 45 Â 45 Â 1 is applied for few-layers.

Structural properties
As shown in Fig. 1, a-M 2 X 3 monolayers are ve atoms thick, with atoms arranged in the sequence of X-M-X-M-X in the direction perpendicular to the layers. Table 1 summarizes the calculated in-plane constant a and effective thickness h of a-M 2 X 3 monolayers. As the a-M 2 X 3 bulk crystal contains three basic layers, the theoretical h of a-M 2 X 3 monolayers is simply taken as 1/3 of the lattice constant c of optimized bulk crystals. The calculated h are larger than that of monolayer MX 2 (M ¼ Mo, W; X ¼ S, Se) 35 and GaX (X ¼ S, Se, Te), 27 indicating a stronger SHG intensity in a-M 2 X 3 monolayers than that in MoX 2 and GaX monolayers as the SHG intensity shows a quadratic dependence on the thickness, according to the dipole theory. 4 It is very convenient to identify layer numbers of a-M 2 X 3 nanosheets using the effective thickness value in further experiments, which will accelerate explorations of their properties.
Similar to previous calculations, 36 the formation energies of single-and few-layer a-M 2 X 3 nanosheets are dened as  AA, and trilayer AAA a-Ga 2 S 3 (a-In 2 Se 3 ) decrease as their layer numbers increase, suggesting it is more likely to successfully obtain a-Ga 2 S 3 (a-In 2 Se 3 ) nanosheets with larger layer numbers. Indeed, trilayer AAA a-In 2 Se 3 , i.e. 3.1 nm-thick a-In 2 Se 3 nanosheets have been synthesized using mechanical exfoliation. 23 Moreover, the formation energy of a-Ga 2 S 3 nanosheets is to some extent smaller than that of corresponding a-In 2 Se 3 nanosheets, indicating it is more likely to obtain a-Ga 2 S 3 nanosheets. Furthermore, the difference of the formation energy can be negligible for AA (AAA) and AB (ABA), ensuring the feasibility to achieve AB (ABA) by switching the electric dipole orientation in AA (AAA) from the standpoint of energetics.

Electronic properties
In contrast to the previous bandgap calculation using the HSE06 functional with 25% exact exchange, 25 we calculated the band structure of single-layer a-M 2 X 3 using 30% EE, cf. ESI (SI-1 †). The calculated band structures are displayed in Fig. 3. a-M 2 X 3 monolayers are indirect bandgap semiconductors with their valence band maximum (VBM) located between the M (0.0, 0.5, 0.0) and gamma (0.0, 0.0, 0.0) points. The conduction band minimum (CBM) is located at the M point for monolayer a-Ga 2 S 3 and a-Ga 2 Se 3 , while for single-layer a-In 2 S 3 and a-In 2 Se 3 it is located at the gamma point. The top valence band of a-M 2 X 3 monolayers is relatively at, resulting in a high density of electronic states in the top valence band region as shown in Fig. 3(e), which is the origin of large SHG coefficients. 7 Table 1 summarizes the PBE and HSE06 bandgaps of a-M 2 X 3 monolayers. The PBE bandgap of 0.88 eV for monolayer a-In 2 Se 3 gets very close to the calculated bandgap of 0.82 eV using PBE + SOC, 24 suggesting spin-orbital coupling (SOC) does not signicantly modify the electronic property. The HSE06 bandgap of 1.80 eV for single-layer a-In 2 Se 3 gets close to the calculated bandgap of 1.92 eV using the GW approximation, 24 but slightly larger than the bandgap of 1.45 eV calculated using HSE06 with 25% exact exchange. 25 The energy gaps of each monolayer at the gamma point are close to their respective indirect bandgaps, which is more evident for a-In 2 S 3 and a-In 2 Se 3 monolayers. It is expected the interband optical transition at the gamma point improves optical responses of a-M 2 X 3 monolayers because no phonons are required for this optical transition to proceed. Additionally, the HSE06 bandgaps of a-M 2 X 3 monolayers are large enough to avoid current leakages, and thereby they are promising in piezoelectric devices. Fig. 4 displays the band structures of bilayer AA and AB, and trilayer ABA a-Ga 2 S 3 calculated using HSE06. If there were no interlayer interaction, the band structure of bilayer AA a-Ga 2 S 3 should be identical to that of monolayer a-Ga 2 S 3 . Nevertheless, the bands from different a-Ga 2 S 3 layers in AA are pronouncedly splitted. Comparisons of Fig. 3(c) and 4(c) show the bottom valence bands from various a-Ga 2 S 3 layers in AA are splitted by as large as 1.31 eV. Resultantly, the bandgap of AA signicantly gets reduced by 1.15 eV in comparison with that of monolayer a-Ga 2 S 3 as Table 1 shows, and that of trilayer AAA a-Ga 2 S 3 further decreases as shown in Fig. 4(a). In brief, we nd the bandgap of Table 1 Calculated in-plane constants a (Å), effective thicknesses h (Å), PBE bandgaps E PBE g (eV), HSE06 bandgaps E HSE06 g (eV), minimum direct energy gaps E HSE06 min (eV) and SHG coefficients c (2) (0) (pm V À1 ) of monolayer a-M 2 X 3 (M ¼ Ga, In; X ¼ S, Se), few-layer a-Ga 2 S 3 and a-In 2 Se 3  few-layer a-Ga 2 S 3 nanosheets becomes much narrower as their layer number increases. This bandgap reduction is also pronounced for few-layer a-In 2 Se 3 nanosheets. Fig. 4(a) indicates the bandgap of trilayer AAA a-In 2 Se 3 nearly vanishes.
Similarly, optical absorption spectra show the bandgap decreases from 2.80 eV to 1.45 eV as the layer thickness increases from 3.1 nm to 20.1 nm. 23 Considering the effective thickness of monolayer a-In 2 Se 3 is $1 nm, the optical bandgap of 1.45 eV for a-In 2 Se 3 nanosheets with $20 layers gets close to our theoretical value of 1.48 eV for a-In 2 Se 3 bulk crystals. Nevertheless, the experimental bandgap of 2.8 eV for 3.1 nmthick (trilayer) a-In 2 Se 3 nanosheets signicantly varies from the zero bandgap of trilayer AAA a-In 2 Se 3 . Moreover, PBE calculations also nd the bandgap of bilayer AA and trilayer AAA a-In 2 Se 3 is closed. 25 It seems further bandgap measurements of few-layer a-In 2 Se 3 are emergently needed to interpret the huge divergence between experimental and theoretical bandgaps. On the other hand, we note the band splitting in non-ferroelectric MoS 2 nanosheets is not so pronounced. 35 Single-layer MoS 2 embodies out-of-plane centrosymmetric characters and inplane non-centrosymmetric characters. Therefore, the pronounced band splitting in few-layer a-Ga 2 S 3 (a-In 2 Se 3 ) nanosheets is caused by the built-in electric eld originated from the parallel out-of-plane electric polarizations (dipoles) of a-Ga 2 S 3 (a-In 2 Se 3 ) layers (cf. ESI-3 †). This is further affirmed by semiconducting a-In 2 Se 3 monolayers becoming metallic when an electric led perpendicular is applied. 24 The band splitting of bilayer AB a-Ga 2 S 3 is not pronounced, and accordingly the bandgap difference between monolayer and bilayer AB a-Ga 2 S 3 is very small. This is because the built-in electric eld signicantly decreases as the out-of-plane electric polarizations (dipoles) of a-Ga 2 S 3 layers are antiparallelly  aligned (cf. ESI-3 †). Furthermore, the band splitting in Fig. 4(b) is minor in ABA a-Ga 2 S 3 as expected. The divergence of electronic properties between AA and AB a-Ga 2 S 3 is further emphasized in Fig. 4(e) and (f). The peaks in the conduction band region of bilayer AB a-Ga 2 S 3 look similar to that of monolayer a-Ga 2 S 3 . Nevertheless, the peaks in AA a-Ga 2 S 3 are signicantly splitted, particularly for the peaks between À3 and À2 eV. Briey, the bandgap in AA a-Ga 2 S 3 is broadened by 1.00 eV in AB a-Ga 2 S 3 , which is very advantageous for applications as photodetectors since one can select the sensing photon energy window by switching electric dipole orientation. Additionally, the zero bandgap in AAA a-In 2 Se 3 is opened in ABA a-In 2 Se 3 , indicating the semiconducting nature can be achieved by switching the electric dipole orientation.

SHG properties
The length-gauge formulism at the independent-particle level derived by Aversa and Sipe 37 and rearranged by Rashkeev et al. 38 is used to calculate second-harmonic generation (SHG) coefficients (cf. ESI-2 †), and its details are displayed in a previous work. 39 Similar to previous works, 7,27 the energy differences between HSE06 and PBE bandgaps are used for scissors corrections to reduce the errors caused by neglected many-body effects; 40-42 the effective unit cell volume is applied to reduce underestimations caused by the large vacuum spacing. For a-M 2 X 3 monolayers and few-layers, the effective volume is obtained by multiplying the area of in-plane unit cell and the effective thickness.
Because single-and few-layer a-M 2 X 3 belong to C 3v symmetry, they have eleven static SHG coefficients and only three of them are independent dictated by Kleiman's symmetry: xxz (0). The static c (2) xxy (0), c (2) zxx (0) and c (2) zzz (0) are summarized in Table 1. The static c (2) xxy (0) describes the in-plane SHG phenomenon, which has been discovered in previous experiments of MoS 2 , 2 GaSe 4 and BN 43 monolayers. Even though the static c (2) xxy (0) of a-M 2 X 3 monolayers is much smaller than that of MoS 2 (ref. 35) and GaSe 27 monolayers, it is still comparable with c (2) zxy (0) of 28.2 pm V À1 for an archetypical nonlinear optical crystal AgGaS 2 , 44 ensuring a-M 2 X 3 monolayers can be used as in-plane two-dimensional SHG devices. More importantly, a-M 2 X 3 monolayers have additional SHG components c (2) zzz (0) and c (2) zxx (0) compared with MoS 2 and GaSe monolayers. Especially, the calculated c (2) zzz (0) of a-M 2 X 3 monolayers are comparable or even larger than the static SHG coefficient of 173.2 pm V À1 for GaAs crystals. 45 Therefore, a-M 2 X 3 monolayers are of great importance in ultrathin two-dimensional devices allowing strong out-of-plane SHG occurs. Fig. 5 represents the calculated real and imaginary parts of SHG coefficients c (2) zzz (À2u,u,u), c (2) zxx (À2u,u,u) and c (2) xxy (À2u,u,u) of a-M 2 X 3 monolayers. The c (2) zzz (À2u,u,u) and c (2) xxy (À2u,u,u) components are signicant in the entire range of optical energy. The c (2) zzz (À2u,u,u) component is several times larger than c (2) xxy (À2u,u,u) and c (2) zxx (À2u,u,u). For c (2) zxx (À2u,u,u), the electric eld of both incoming and outgoing photons is parallel to the z axis, and thereby the electric depolarization vanishes. To analyze the prominent features in SHG spectra, the absolute values of imaginary part of c (2) zzz (À2u,u,u) and c (2) xxy (À2u,u,u) for monolayer a-Ga 2 S 3 are plotted in Fig. 6 and compared with the absorptive part of corresponding dielectric function 3 00 . The rst prominent peak between 1.7 and 3.8 eV in the c (2) zzz (À2u,u,u) spectrum is caused by double-photon resonances (cf. Fig. 6(a) and (b)). In contrast, the double-peak structure between 3.8 and 5.6 eV in c (2) zzz (À2u,u,u) comes from single-and double-photon resonances. These single-and double-photon resonances only involve optical transitions for the electric led vectorẼ parallel to the z axis (Ẽkz). Fig. 6 further suggests the rst prominent peak between 2.2 and 3.6 eV in the c (2) xxy (À2u,u,u) spectrum is caused by double-photon resonances withẼkx (cf. Fig. 6(c) and (d)), while the peak between 3.9 and 5.4 eV in c (2) xxy (À2u,u,u) comes from both single-and double-photon resonances withẼkx.
As shown in Table 1, the HSE06 bandgaps of few-layer a-Ga 2 S 3 are in the visible range. In contrast, the HSE06 bandgaps of few-layer a-In 2 Se 3 and AAA a-Ga 2 S 3 are much narrower, which promises low laser damage thresholds. Therefore, we focus on SHG properties of bilayer AA and AB, and ABA a-Ga 2 S 3 , and their real and imaginary parts of c (2) zzz (À2u,u,u), c (2) zxx (À2u,u,u) and c (2) xxy (À2u,u,u) are displayed in Fig. 7. The line shape of the three SHG spectra of AA a-Ga 2 S 3 is very similar to that of monolayer a-Ga 2 S 3 , and the SHG spectra of AA are signicantly redshied in comparison with that of monolayer a-Ga 2 S 3 because of the sizable bandgap reduction. Moreover, the calculated c (2) zzz (0), c (2) zxx (0) and c (2) xxy (0) of AA a-Ga 2 S 3 are very close to those of monolayer a-Ga 2 S 3 , respectively. These suggest that optical transitions occur within each a-Ga 2 S 3 layer, namely the SHG property of each a-Ga 2 S 3 layer is not modied by the built-in electric eld of the neighboring a-Ga 2 S 3 layer. According to the electric dipole theory, the SHG intensity shows a quadratic dependence on the SHG coefficient and the layer thickness, 4 and thereby the non-resonant SHG intensity in bilayer AA is about four times that in monolayers.
The redshi of c (2) xxy (À2u,u,u) for AB a-Ga 2 S 3 is negligible as the bandgap difference of monolayers and AB is small. c (2) zzz (À2u,u,u) and c (2) zxx (À2u,u,u) of AB a-Ga 2 S 3 nearly vanishes, which is further corroborated by its vanishing static c (2) zzz (0) and c (2) zxx (0). The electric dipole in the z(x) direction of the top and bottom a-Ga 2 S 3 layers in bilayer AB points oppositely, and accordingly their contribution to the static c (2) zzz (0)(c (2) zxx (0)) cancels each other. The electric dipole in the z direction is the out-of-plane electric dipole, while the electric dipole in the x direction is the in-plane electric dipole. The c (2) zzz (À2u,u,u) component of trilayer ABA a-Ga 2 S 3 is 1/3 that of monolayer a-Ga 2 S 3 as the contribution of the middle and bottom layers to c (2) zzz (À2u,u,u) in trilayer ABA cancels each other. Therefore, we propose that one can effectively tune the out-of-plane SHG coefficient by switching the electric dipole orientation in 2D nanosheets. Additionally, we summarize c (2) (0) of AB and ABA a-In 2 Se 3 in Table 1, which indicates the obtained optical rules are valid for other a-M 2 X 3 nanosheets. The SHG property of few-layer a-In 2 Se 3 in recent experiments could be obtained by analogy. 16

Piezoelectric properties
To obtain piezoelectric strain coefficients d ij which measure mechanical-electrical energy conversion ratios, we calculate elastic constants C ij and piezoelectric stress coefficients e ij using density functional perturbation theory (DFPT). 46 The clampedion elastic and piezoelectric coefficients are obtained from purely electronic contributions, while the relaxed-ion coefficients are obtained from the sum of electronic and ionic contributions. The relaxed-ion elastic and piezoelectric coefficients are physically meaningful and can be directly compared with experimental results. As shown in Table 2, single-and fewlayer a-M 2 X 3 have three independent elastic constants: C 11 , C 12 and C 66 . The calculated clamped-ion and relaxed-ion elastic constants follow the correlation of C 66 z (C 11 À C 12 )/2. The relaxed-ion elastic constants full the Born criteria of stability of 2D hexagonal structures, [47][48][49] i.e. C 11 > 0 and C 11 -C 12 > 0, ensuing these monolayers and few-layers are mechanically stable. The calculated relaxed-ion Young's moduli (Y ¼ (C 11 2 À C 12 2 )/C 11 ) of single-layer a-M 2 X 3 are smaller than that of graphene (341 N m À1 ) and monolayer BN (275.9 N m À1 ), 50 and comparable with that of monolayer TMDCs. 51 Therefore, a-M 2 X 3 monolayers are much soer than graphene and monolayer BN, and their stiffness is comparable with that of monolayer TMDCs. Moreover, the calculated Young's moduli of bilayer (trilayer) a-Ga 2 S 3 are about two (three) times that of monolayer a-Ga 2 S 3 . This is because, of the same strain, the force needed for bilayers (trilayers) is two (three) times that of monolayers.
Single-and few-layer a-M 2 X 3 have two independent piezoelectric stress coefficients e 11 and e 31 dictated by C 3v symmetry. The piezoelectric strain coefficients d 11 and d 31 , which respectively measure the mechanical-electrical energy conversion ratios in x and z directions, are expressed as d 11 ¼ e 11 /(C 11 À C 12 ) and d 31 ¼ e 31 /(C 11 + C 12 ). 12 The relaxed-ion e 11 values of monolayer a-Ga 2 S 3 and a-Ga 2 Se 3 in Fig. 8(a) are even larger than that of monolayer 2H-CrTe 2 , which has the largest e 11 of 654 pC m À1 among TMDCs. 12 The relaxed-ion d 11 values of single-layer a-Ga 2 Se 3 and a-In 2 Se 3 in Fig. 8(c) are comparable with the maximum d 11 of 13.45 pm V À1 for monolayer TMDCs, and zzz (À2u,u,u), (b) imaginary part of the dielectric function 3 00 z as a function of u/2 and u, (c) absolute value of the imaginary part of c (2) xxy (À2u,u,u), and (d) imaginary part of the dielectric function 3 00 x as a function of u/2 and u of monolayer a-Ga 2 S 3 .
larger than the maximum d 11 of 8.47 pm V À1 for Janus group-III chalcogenide monolayers. 11 The relaxed-ion d 11 values of a-In 2 S 3 and a-In 2 S 3 monolayers are comparable with the maximum d 11 of 2.30 pm V À1 for group-III chalcogenides. 10 Therefore, a-M 2 X 3 monolayers are promising in ultrathin piezoelectric sensors and nano-generators. Fig. 8(a) and (c) further suggest the electronic and ionic polarizations of a-Ga 2 S 3 and a-Ga 2 Se 3 monolayers both positively contribute to relaxedion piezoelectric coefficients e 11 and d 11 , resulting in signicant in-plane piezoelectricity. In contrast, the electronic and ionic polarizations of a-In 2 S 3 and a-In 2 Se 3 monolayers oppositely contribute to relaxed-ion e 11 and d 11 , resulting in smaller inplane piezoelectricity. Our calculation also generates relaxedion e 11 and d 11 are respectively 369 pC m À1 and 3.72 pm V À1 for monolayer MoS 2 , in good agreement with previous theoretical values of 364 pC m À1 and 3.73 pm V À1 , 8 indicating our theoretical results are numerically reliable.  12 However, the bucked hexagonal compounds are energetically metastable. In contrast, a-M 2 X 3 monolayers are energetically, dynamically 25 and mechanically stable, ensuing they are experimentally feasible.
The calculated piezoelectric coefficients e 11 and e 31 of AA and AB a-Ga 2 S 3 are summarized in Fig. 8(e), while their d 11 and d 31 coefficients are displayed in Fig. 8(f). Comparisons of Fig. 8(a) and (e) show the clamped-ion (relaxed-ion) e 11 of AB a-Ga 2 S 3 is exactly twice that of monolayer a-Ga 2 S 3 . This is because, of the same strain, the change of polarization charges in the x direction of bilayer AB a-Ga 2 S 3 is twice that of monolayer a-Ga 2 S 3 . Therefore, the piezoelectric effect occurs within each a-Ga 2 S 3 layer in AB, namely the piezoelectricity of each a-Ga 2 S 3 layer is not modied by the built-in electric eld of the neighboring a-Ga 2 S 3 layer. This is further affirmed by the relaxed-ion d 11 of 10.4 pm V À1 for AB a-Ga 2 S 3 being very close to that (10.7 pm V À1 ) for monolayer a-Ga 2 S 3 . The relaxed-ion d 31 of bilayer AB nearly vanishes since the piezoelectric contribution to d 31 of each a-Ga 2 S 3 layer cancels each other. Fig. 8(a) and (e) further suggest the clamped-ion e 11 of 485.1 pC m À1 for bilayer AA a-Ga 2 S 3 is exactly twice that (243.6 pC m À1 ) of monolayer a-Ga 2 S 3 , while the relaxed-ion e 11 of 1350.3 pC m À1 for AA a-Ga 2 S 3 is to some extent smaller than twice that (755.6 pC m À1 ) of monolayer a-Ga 2 S 3 . The clampedion e 31 of À240.2 pC m À1 for AA a-Ga 2 S 3 is much larger than that (À11.4 pC m À1 ) of monolayer a-Ga 2 S 3 , namely the clampedion e 31 of AA a-Ga 2 S 3 is much enhanced by the strong built-in electric eld originated from the parallel out-of-plane electric polarizations of a-Ga 2 S 3 layers. The relaxed-ion d 31 of À0.91 pm V À1 for AA a-Ga 2 S 3 is accordingly several times larger zzz (À2u,u,u), c (2) zxx (À2u,u,u) and c (2) xxy (À2u,u,u) of bilayer AA, AB, and trilayer ABA a-Ga 2 S 3 . Table 2 Theoretical elastic constants C ij and Yang moduli Y (N m À1 ) in both clamped-and relaxed-ion cases of monolayer a-M 2 X 3 and fewlayer a-Ga 2 S 3

Clamped-ion
Relaxed-ion than that (À0.248 pm V À1 ) of monolayer a-Ga 2 S 3 , suggesting AA a-Ga 2 S 3 is much more easily polarized than monolayer a-Ga 2 S 3 . Similarly, the electric dipole (0.165 eÅ) of AA a-In 2 Se 3 is much larger than that (0.07 eÅ) of monolayer a-In 2 Se 3 . 25 Briey, we nd AA a-Ga 2 S 3 has the largest out-of-plane d 31 among all atomic-thick 2D materials up to date. More importantly, the built-in electric eld can induce strong outof-plane piezoelectricity in atomic-thick 2D materials, which is corroborated by a recent calculation which nds large d 31 of À1.234 pm V À1 and d 33 of À13.517 pm V À1 in multilayer MoSTe. 15 However, the large d 33 (vP 3 /vs 3 , P is the electric polarization and s is the stress) in multilayer MoSTe will vanish in atomic-thick 2D MoSTe such as monolayer 15 and bilayer MoSTe (cf. ESI-4 †). This reects it is very difficult to impose stresses along the z direction for atomic-thick 2D materials since their effective thickness is far smaller than their ake size. For instance, the effective thickness of monolayer MoSSe is about 6.3Å while its ake size is more than 5 mm. 52 The effective thickness of monolayer MoSSe is considered as the average of that of MoS 2 and MoSe 2 monolayers. 35 In contrast, it is easy to impose stresses along the x direction to achieve large d 31 (vP 3 /vs 1 ) because of the large size of atomic-thick 2D materials. Therefore, it is more reasonable to induce out-of-plane piezoelectricity by imposing stresses along the x direction within atomic-thick 2D materials. Moreover, the d 31 coefficient of À1.234 pm V À1 for multilayer MoSTe decreases to À0.417 pm V À1 of bilayer MoSTe (cf. ESI-4 †), being smaller than that of AA Ga 2 S 3 . The small bandgap of AAA a-Ga 2 S 3 is disadvantageous to avoid current leakages. The piezoelectric coefficient d 11 of ABA a-Ga 2 S 3 should be close to that of monolayer a-Ga 2 S 3 , while its d 31 coefficient is around 1/3 that of monolayer a-Ga 2 S 3 since the piezoelectric response occurs within each a-Ga 2 S 3 layer.

Summaries
We have carried out rst-principles calculations of structural, electronic, SHG and piezoelectric properties of single-and fewlayer a-M 2 X 3 (M ¼ Ga, In; X ¼ S, Se). Firstly, a-M 2 X 3 few-layers are energetically favorable and mechanically stable, ensuring bilayer AA and trilayer AAA can be successfully attained by mechanical exfoliation and bilayer AB and trilayer ABA can be achieved by switching the electric dipole orientation. Secondly, the relative at top valence band of a-M 2 X 3 monolayer promises large SHG coefficients, and their large bandgaps are helpful to avoid current leakages in piezoelectric devices. The splitting of energy bands in few-layer AA and AAA is very pronounced because of the built-in electric eld originated from the parallel out-of-plane electric dipoles, while in contrast, that of AB and ABA is not pronounced because the built-in electric eld signicantly diminishes as the out-of-plane electric dipoles are antiparallelly aligned. Therefore, we propose a completely new method, i.e. switching the electric dipole orientation to tune electronic structures and bandgaps, which is very advantageous to tune the sensing photon energy window and achieve the semiconducting nature. Thirdly, the in-plane SHG coefficients of a-M 2 X 3 monolayers are comparable with that of AgGaS 2 crystals. More importantly, we nd out-of-plane SHG in a-M 2 X 3 monolayers and their out-of-plane SHG coefficients are comparable with that of GaAs crystals. Furthermore, SHG occurs within each a-M 2 X 3 layers in AA and AB, and accordingly one can achieve an enhanced out-of-plane SHG intensity in AA This journal is © The Royal Society of Chemistry 2017 and eliminate the out-of-plane SHG in AB. Fourthly, the stiffness of a-M 2 X 3 monolayers is comparable that with monolayer TMDCs. a-M 2 X 3 monolayers exhibit strong in-plane and considerable out-of-plane piezoelectricity. Furthermore, out-ofplane piezoelectricity vanishes in AB a-Ga 2 S 3 , and it is greatly enhanced in AA a-Ga 2 S 3 as the electric dipoles are parallelly aligned. To our knowledge, out-of-plane SHG in 2D materials has been rarely reported, while the out-of-plane piezoelectricity is very limited in ultrathin 2D materials. Here we have presented strong out-of-plane SHG and piezoelectricity in ultrathin 2D materials. In general, our research will stimulate researches on the ultrathin 2D photo detection, SHG and piezoelectric devices.

Conflicts of interest
There are no conicts to declare.