The MoSeS dynamic omnigami paradigm for smart shape and composition programmable 2D materials

The properties of 2D materials can be broadly tuned through alloying and phase and strain engineering. Shape programmable materials offer tremendous functionality, but sub-micron objects are typically unachievable with conventional thin films. Here we propose a new approach, combining phase/strain engineering with shape programming, to form 3D objects by patterned alloying of 2D transition metal dichalcogenide (TMD) monolayers. Conjugately, monolayers can be compositionally patterned using non-flat substrates. For concreteness, we focus on the TMD alloy MoSe\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${}_{2c}$$\end{document}2cS\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${}_{2(1-c)}$$\end{document}2(1−c); i.e., MoSeS. These 2D materials down-scale shape/composition programming to nanoscale objects/patterns, provide control of both bending and stretching deformations, are reversibly actuatable with electric fields, and possess the extraordinary and diverse properties of TMDs. Utilizing a first principles-informed continuum model, we demonstrate how a variety of shapes/composition patterns can be programmed and reversibly modulated across length scales. The vast space of possible designs and scales enables novel material properties and thus new applications spanning flexible electronics/optics, catalysis, responsive coatings, and soft robotics.

S hape-programmable materials 1-3 utilize the large deformations achievable with modest internal strains in thin sheets. The ability to spatially pattern internal strains provides a powerful means to controllably transform 2D sheets into 3D objects. Many biological systems exploit these underlying physical principles [4][5][6] . Synthetic analogs are employed in soft robotics 7 , drug delivery 8 , biomedical devices 9 , and biomimetic materials 10 . Shape-programmable materials can be engineered to allow dynamic and reversible shape changes (and become smart or 4D materials) by incorporating stimuli-responsive components.
Geometrically, deformations of thin sheets can alter mean (H) and/or Gauss (K) curvature. Mean curvature is developed by, e.g., constructing a bilayer (analogous to a bimetallic strip) in which the two layers are strained in-plane relative to one another. Gauss curvature requires gradients in in-plane strain within the sheet and can produce a much wider variety of shapes. The ability to independently modulate in-plane and bending strains (K and H) enriches the palette of possible 3D shapes and increases shape programmability.
Atomically thin materials are required for atomic scale programming. To date, 3D feature generation involving inorganic 2D materials 42 , with thicknesses <1-10 nm, has largely been explored using thicker composite bilayers or bimetallic strips [43][44][45] , mechanical self-assembly/buckling-based approaches (e.g., patterned sheets on thicker prestrained deformable substrates [46][47][48][49], and cut-and-deform/kirigami approaches 50,51 . Quasi-2D materials with novel thermal 52,53 , mechanical 54 , optical 55,56 , and electronic 57,58 properties have thus been produced. However, programmed atomic scale 3D features are not readily realized with such approaches. Here, we propose and theoretically investigate an approach based on single 2D transition metal dichalcogenide (TMD) alloy monolayers that permits composition programming to achieve nanoscale 3D objects with exquisite shape control through both bending and stretching (which we dub omnigami) and is rapidly and reversibly actuatable with external electric fields. This system also facilitates the conjugate process; using imposed shapes to self-assemble composition patterns during synthesis or postprocessing. The resultant composition patterns imprint shape, which may be retained when the shape control is removed (e.g., TMD annealing on and removal from a nonplanar substrate). We explore the shape and composition programmable features of TMD alloy monolayers by developing a first principles-informed continuum model for their coupled mechanics, alloy thermodynamics, and interaction with electric fields. The fundamental relations between composition and deformation are derived for several simple shapes and patterns. We then numerically demonstrate the ability to program a wide variety composition patterns and 3D shapes, from smoothly curved to purely foldbased origami designs, with a wide variety of strain states, from internally strain-free to patterns with designed residual strains (e.g., to obtain target mechanical or electronic properties). We also demonstrate how the electrically dipolar nature of Janus (see below) TMDs enables dynamic actuation of these self-shaping 2D materials with electric fields for smart or 4D material functionality. Potential applications of patterned, shaped, and responsive TMD monolayers in optoelectronic devices, flexible electronics, catalysis, responsive coatings, and soft robotics are discussed. Demonstrations include designed composition patterns that can be employed in electronic devices with spatially tailored bandgaps, bilayers with programmed twist angles, and sheets with corrugated/compliant, crumpled, or channeled geometries of nearly arbitrary complexity.

Results
Physical concept. TMD monolayers (MX 2 ) contain three covalently bonded atomic layers; a transition metal atomic layer M fMo; Wg sandwiched between chalcogen XfS; Se; Teg atomic layers. Here, we consider binary chalcogen alloy monolayers. Since different chalcogens have different atomic sizes, inplane variations in the average chalcogen concentration c ¼ ðc þ þ c À Þ=2 (where +/− refers to the upper/lower chalcogen layers) generate variations in in-plane strain (Fig. 1a). Similarly, vertical variations in chalcogen concentration (quantified in terms of Janus degree J ¼ ðc þ À c À Þ=2) generate bending strains (Fig. 1a). A difference in concentrations between the chalcogen layers creates a preferred radius of curvature (bending). The minimum radii of curvature for Janus MSeS, MTeSe, and MTeS are R c % ha X =ða X À a Y Þ % 8, 6, and 3 nm, respectively (h is the monolayer thickness, a X and a Y are the lattice constants of MX 2 and MY 2 ; see Fig. 1b). Spatially uniform Janus TMD monolayers are novel piezoelectric materials [59][60][61][62][63] . Here, we propose using the natural curvature of Janus TMDs 60 in shape programming by patterning lateral variations in Janus degree and thus curvature.  Fig. 1 Coupling between composition and deformation in TMD alloy monolayers. a The TMD hexagonal crystal structure and illustrations of compositionally generated stretching and bending deformations in MoSeS alloys (the z-direction is normal to the TMD monolayer). Metal and chalcogen atoms are shown in gray and cyan/magenta, respectively. The S/Se size difference is amplified for visual clarity. b Equilibrium geometries of Janus MSeS, MTeSe, and MTeS patches The conjugate material programming processes explored here are referred to as shape ! composition programming (patterning topography to program composition patterns) and composition ! shape programming (patterning composition to program non-flat monolayer topographies). These can both be viewed as forward problems; for a given input (shape or composition), determine the output (composition or shape). Or, as inverse/ design problems; given a target output (shape or composition), determine the input (composition or shape) required to generate it. Our presentation is framed in terms of the forward problems which provide a simpler framework for conveying the physical principles and methodology behind dynamic MoSeS omnigami. We return to the inverse/design problems in the Discussion.
First principles-informed continuum model. We consider a single alloy TMD monolayer MX 2 c Y 2ð1À cÞ , where c is the composition of chalcogen species X averaged over both chalcogen layers. The monolayer free energy functional is decomposed as where F elastic is the elastic energy of the heterogeneously alloyed monolayer, F c þ þ F c À is the compositional free energy of the upper and lower flat chalcogen layers in the absence of an electric field, and F electric is the electrostatic energy of the heterogeneously alloyed (dipolar/Janus) monolayer in an applied electric field.
Elastic energy. The mechanics of the monolayer is described using the Föppl-von Kármán thin plate theory extended to include heterogeneous bending eigenstrain fields associated with the Janus nature of the monolayers and stretching eigenstrain fields associated with in-plane misfit from variations in the composition (averaged over the two chalcogen layers at each position in the monolayer). The elastic free energy functional has contributions from the in-plane strain ϵ and the mean out-ofplane displacements w where a "," indicates partial differentiation with respect to the subsequent variable(s). Here,h is the effective elastic plate thickness, λ ijkl is the elastic stiffness tensor, A is the area of the monolayer, is the local elastic stretching deformation tensor associated with (small) in-plane displacements u i and (potentially large) out-of-plane displacements w, ϵ ij is a (macroscopic) applied strain and i; j; k; l 2 fx; yg. The in-plane misfit/eigenstrain is set by the average local composition within the chalcogen layers (i.e., solutes are point sources of dilatation) as , c 0 is the average local composition of the eigenstrain reference state (the zero eigenstrain state), ϵ ¼ða X À a Y Þ=a X is the maximum eigenstrain, and δ ij is the Kronecker delta. w Ã ij ¼ 2J ϵδ ij =hð1 þ ϵ cÞ is the local spontaneous curvature tensor for a given local composition difference between the two chalcogen layers, where h is the geometric thickness of the monolayer (vertical z distance between chalcogen atomic layer mid-planes). The interatomic layer thickness h is a better indicator for the compositional effect on bending eigenstrain than the (distinct, though related)h, proportional to the square root of the ratio between the bending and stretching stiffnesses. From these definitions of deformation, elastic strain is ϵ ij À ϵ Ã ij . Since hexagonal (H phase) TMD monolayers are elastically isotropic, Eqs. (3) and (4) can be rewritten with the plane strain λ ijkl ¼ E½2νδ ij δ kl =ð1 À νÞ þ δ ik δ jl þ δ il δ jk =2ð1 þ νÞ, where E and ν are the in-plane Young's modulus and Poisson's ratio, respectively.
Compositional energy. The alloy free energies of TMD monolayers with alloyed metal 64 /chalcogen 65 layer(s) have previously been calculated within a regular solution model. Here, we generalize the regular solution model for each chalcogen layer in MoSeS-type alloys by inclusion of coupling between layers wherek B T is the usual thermal energy, f mix ðc ± Þ is the enthalpy of mixing within a given chalcogen layer, γ scales the interface energy between regions of different composition in-plane, and the constant Λ characterizes the strength of the local interaction between the two chalcogen layers. μ 0 is a chemical potential that controls the relative X-Y composition (e.g., set by the partial pressure of the different species in the monolayer environment).
Electrical potential energy. Since the electronegativity of species X and Y are different, a Janus region of a monolayer is electrically polar, with local dipole moment density p ¼ 2p 0 Jn, where p 0 is the saturated dipole moment density (J ¼ 1=2) andn is the local normal vector of the monolayer. The interaction energy between dipoles and with an applied electric field E A is The first term (dipole-dipole interaction) is higher order than the second term and is typically negligible compared to compositional and elastic energies in MoSeS (see Methods, Supplementary 67 . Thus, the primary assumption in the continuum plate theory is to only include the lowest order deformation terms in the elastic energy, consistent with the small strains encountered here ((0:1). Since the elastic moduli of MoS 2 and MoSe 2 are similar (15-20% variation), we neglect the elastic inhomogeneity associated with compositional variations within the monolayer and use overall composition-weighted averages of E, ν, κ, and h for the entire monolayer. The (T ¼ 0 K) enthalpy of mixing was parameterized as an asymmetric regular solution, f mix ðc ± Þ ¼ χc ± ð1 À c ± Þ þ c ± U X þð1 À c ± ÞU Y . The regular solution constants (χ, U X , U Y ) and Λ (characterizing compositional interactions between chalcogen layers) were computed from first principles as described in Methods. The constant γ in Eq. (5) characterizes interfaces between domains of different composition-not encountered in these TMD solid solutions.
Here, it should be viewed as a regularization parameter that prevents excessively sharp concentration gradients from forming; it is chosen large enough to facilitate numerical stability but small enough to have a negligible effect on composition patterns.
Simulation schemes. Shape ! composition programming was simulated by numerically evolving the c þ and c À fields to the state of minimum F at fixed u i and w. This constraint on u i and w corresponds to (nonslipping) adhesion between the monolayer and a rigid substrate. Imperfect adhesion/conformation and/or slipping will result in somewhat less compositional variation than predicted here. Composition ! shape programming was simulated by evolving the elastic state fields (u i ; w) to the state of minimum F at fixed c ± . The equilibrium u i were calculated analytically. w was determined by numerical solution of a damped wave equation that approximates flexural acoustic phonon dynamics (vibrational effects are not considered in our free energy F ). Imposing no constraints on u i and w corresponds to a freelysuspended sheet. However, the simulations reported here were performed on a square or rectangular unit cell with periodic boundary conditions to represent large sheets within a manageable computational domain. See Methods for further details.
Shape ! composition programming. In the following subsections we examine how patterned monolayer shape (topography) can be used to generate composition patterns.
Programmed Janus monolayers. Consider first the simple case of a small patch of the surface of a sphere of radius R. For a sufficiently small patch, the stretching energy makes higher order contributions than the first-order bending energy and can be neglected. The composition profile that minimizes the bending energy F w (in the absence of an applied electric field) is a homogeneous Janus monolayer of degree J % h=2R ϵ. For example, a patch of R ¼ 8, 80, and 800 nm in MoSeS corresponds to J % 0:5, 0.05, 0.005. However, the total energy also includes compositional contributions. Minimization of the bending and compositional energies with respect to J for a spherical patch of radius R (with mixing entropy expanded to third order about where The chemo-bending ratio Δ w , a ratio of chemical to elastic bending energies, quantifies how compositional energy suppresses/enhances inhomogeneous spatial Janus patterns (depending on χ and Λ) relative to the F c ± ¼ 0 prediction, J ¼ h=2R ϵ. For MoSeS, 1 þ Δ w % 5:6 at T ¼ 0 K and 7:6 at a reasonable growth/annealing temperature T ¼ 1023 K. Therefore, generating a Janus MoSeS spherical patch with J ¼ 0:5, 0.05, 0.005 at T ¼ 1023 K requires monolayer patches with radii of curvature R % 1, 10, and 100 nm, respectively. Simulations including all terms in Eqs. (2) and (5)  Eq. (7) demonstrates that the ease with which large compositional variations can be programmed into a monolayer depends on the competition between compositional and elastic energies. While composition rearrangement relaxes the strain energy associated with monolayer topography, the resulting inhomogeneous compositions have relative compositional energy costs proportional to Δ w . Large compositional variations are most readily programmed in monolayers with small Δ w , but similar results can be obtained in materials with relatively large Δ w , such as MoSeS, provided that sufficiently large topography amplitudes (large curvature in this case) can be realized. We now examine this and related issues for a series of different compositional patterns.   Table 1 for expressions), b A Miura-ori pattern that employs P2 as a building-block structure, c An elaborate pattern obtained via our numerical programming approach. In a and b, the J scale is set to the predicted maximum J 0 of each topography (second column of Table 1), while the c scale varies from 0:25 to 0:75. The last column in a shows a large amplitude P1 template (large stretching) that generates an in-plane MoS 2 /MoSe 2 heterostructure. Regions in gray in the Janus degree maps represent J ¼ 0. d Maps of electronic bandgap E g (in eV) for the five patterns shown in a and the Miura-ori pattern in b, based on DFT calculations of the composition and strain dependent bandgaps in refs. 60,68,69 . See Supplementary Note 2 for more details Programmed alloy enrichment. We next consider uniform changes in alloy concentration by exchange of species with a reservoir; e.g., by annealing in atmospheres with different chalcogen chemical potentials μ 0 (partial pressures) and/or under homogeneous isotropic in-plane strain ϵ ¼ ϵ xx ¼ ϵ yy . Minimization of the stretching and compositional energies with respect to c for a flat monolayer under tension ϵ (with mixing entropy expanded to second order about c ¼ 1=2) gives a linear relation between c and strain, where and Δ ϵ is the chemo-stretching ratio, c eq is the equilibrium composition at zero strain, α ¼hE=2ð1 À νÞ, and β ¼ ϵ=ð1 þ ϵ c 0 Þ. Analogous to Δ w , Δ ϵ quantifies the degree to which compositional thermodynamics alters the F c ± ¼ 0 result c % ϵ=β þ c eq . For MoSeS, Δ ϵ % 1:2 at T ¼ 0 K and Δ ϵ % 2:6 at T ¼ 1023 K; this indicates that the compositional energy has a significantly weaker effect on shape-programmed alloy composition (dominated by stretching) than on shape-programmed Janus composition (dominated by bending, Eq. (7)). This difference is associated with the vast difference in the stretching and bending stiffnesses of TMD monolayers.
Simple patterns. We now focus on some simple monolayer topographies wðx; yÞ and the Janus composition patterns Jðx; yÞ they produce. Results for various topographies, obtained by minimizing F w þ F c ± with respect to Jðx; yÞ at fixed wðx; yÞ, are given in Table 1. To retain the analytical nature of these predictions, we ignore the relatively small contributions of the inplane strain associated with the substrate topography. This approximation is typically valid for monolayer islands with free edges and/or slowly varying topographies.
The results demonstrate that Janus patterns can be directly obtained by annealing on substrates with patterned topographies and that compositional energy introduces a factor of ð1 þ Δ w Þ À1 into the programmed Janus degree for each topography. For MoSeS monolayers, this effect suppresses J by a factor of $5.6 to 8. Simulation results are consistent with these predictions, as shown in Fig. 3 for spherical cap (P1), 1D bend (P2), 1D sine (P3), and 2D sine (P4) patterns. The simulation configurations shown in Fig. 2a demonstrate further how bending-dominated topographies (e.g., small amplitude as in P1-left or unidirectional patterns as in P2 and P3) generate weak spatial c variations, while topographies that impose significant stretching (e.g., large amplitude as in P1-right or bidirectional patterns as in P4) generate pronounced spatial c variations. More precisely, we find that c pattern magnitude $ A 2 while J pattern magnitude $ A (Table 1), which leads to the observed J prominence at small A and c prominence at large A. It is also seen that c pattern periods are half that of the corresponding J pattern. This is associated with the different symmetries of the in-plane strains and curvatures with respect to w; c $ ϵ ij $ w ;i w ;j while Table 1 Equilibrium mappings for shape ! composition programming and composition ! shape programming P4: A 2 sinðkxÞ þ sinðkyÞ ½ Àhk 2 wðx;yÞ Analytical mappings in limits where the elastic energy is dominated by bending or stretching (i.e., w or ϵ dominant). All shapes w refer back to the equations for the patterns P1-P4 (Fig. 2a) on the left side of the table (Shape column) and their amplitude parameters (1=R, B, A, and Cσ).  Table 1 and the F c ± ¼ 0 limit (Δ w ! 0), respectively, and points are simulation results obtained at equal Se and S concentrations ( Complex patterns and scale dependence. More complex composition patterns can be constructed by combining these relatively simple patterning elements as building blocks. One example is the Miura-ori paper folding pattern shown in Fig. 2b. For patterns less amenable to analytic approximations, numerical simulations provide the necessary deformation-composition mappings. Our numerical approach to forward shape ! composition programming simply requires equilibrating the composition of a monolayer while it is held in contact with the shapepatterned substrate template. Figure 2c shows a complex composition pattern (the reverse of the US Franklin half dollar) programmed into a c ¼ 1=2 MoSeS monolayer using this approach. Distinct J and c patterns are obtained from this topography, with J localizing to the most highly curved regions and c localizing to the most highly stretched or compressed regions.
While the spatial dimensions of programmed composition patterns can be varied from the nano-to macro-scale, not all terms in the total free energy F scale with spatial dimensions in the same manner. Topographies scaled equally in each dimension by a dimensionless scaling factor L, ðL x ; L y ; wÞ ! ðL x ; L y ; wÞL, produce nearly self-similar c patterns while the amplitude of the J pattern scales $ 1=L. This may be traced to the fact that c redistribution is driven by in-plane strains ϵ ij $ w ;i w ;j which are invariant under such a transformation, while J redistribution is driven by curvature w ;ij which scales as 1=L. As the overall size scale of a pattern L decreases, ϵ Ã ij $ δ c remains constant while w Ã ij $ J must increase by the same proportion to satisfy the increasing curvature w ;ij . Conversely, the amplitude of the J pattern is invariant under curvature-conserving topography transformations, e.g., ðL x ; L y ; wÞ ! ðL x ; L y ; wLÞL, while the amplitude of the c pattern $ L. It is therefore possible (within the limit of strains that may be produced in a particular alloy system) to vary the spatial dimensions of composition patterns such that either c or J (but not both) remains nearly fixed while the other varies as 1=L or L.
Functional patterns. Having demonstrated and quantified how to induce composition patterns based on patterned in-plane strain/topography, we apply the same approach to designing composition patterns with targeted functional properties (electronic, photonic, etc.). For example, in-plane J and/or c heterostructures and superlattices can be self-assembled by annealing alloy monolayers on substrates with prescribed topographies and/ or in-plane strain patterns. Spatial patterns in J can be constructed that, for example, correspond to spatial variations in direct versus indirect band gap for uses in photonic applications 62 .
Functional spatial patterns in c could be realized, for example, by pressing a monolayer onto a substrate with patterned wells (e.g., by drawing a vacuum to pull the regions suspended over the wells into a conformal state). This approach has been used to locally engineer strain and thus the band gap in WSe 2 , resulting in arrays of photoluminescent quantum dots 70 . Here, we propose using such localized strains to drive high T composition evolution and self-assembly of in-plane X-Y composition gradients and MX 2 /MY 2 heterostructures such as those shown in Fig. 2a (P1right). Since spatial variations in both composition ( c and J) and residual in-plane strains produce spatially varying bandgaps (see Fig. 2d), this approach can be used to create novel quantum structures, electronic heterojunctions, conductive interconnects, etc. Additionally, applying the same approach to the WTeS system, where variations in composition may produce a semiconductor to metal phase transformation 64 , a pattern of metallic "wires" can be created in a semiconducting sheet. This post-growth, self-assembly-based patterning approach is simpler and more spatially controllable than typical direct synthesis methods in which each material component of the heterostructure or superlattice is sequentially grown.
Composition ! shape programming. Now we examine how patterned compositions can be used to generate 3D structures from 2D sheets. Equilibrium composition ! shape mappings are obtained by minimizing F with respect to wðx; yÞ for fixed c þ ðx; yÞ and c À ðx; yÞ.
Simple shapes. Analytical predictions of 3D shapes generated by different Janus composition patterns are reported in Table 1 Scale dependence of shapes. As in shape ! composition programming, the spatial dimensions of programmed topographies can be varied from the nano-to macro-scale, but features associated with c patterns and J patterns scale differently with size. For a topography scaled equally in each dimension by a factor L, ðL x ; L y ; wÞ ! ðL x ; L y ; wÞL, the required bending eigenstrains (the product of the bending curvature and the length scale) are directly proportional to L; w Ã ij L % 2JL ϵδ ij =h. A decrease in the scale of the pattern L thus requires an increase in J and therefore energy density by the same proportion to maintain a given bending eigenstrain (i.e., shape). On the other hand, the stretching eigenstrain, ϵ Ã ij % δ ij ϵδ c, has no such scale dependence; the size of a composition pattern containing only ϵ Ã ij can be varied with no change in energy density. Decreasing the scale L of a topographical pattern containing both bending and stretching eigenstrains requires no change in the c pattern but an increase in the Janus degree by a factor of 1=L.
Programmed folds. Consider the case of 1D folds or bends; i.e., origami. The angle θ of a fold (i.e., the jump in the surface normal across the fold) programmed along y is set by the bending eigenstrain profile w Ã where L is the width of the eigenbending profile. The fold angle produced by a strip of uniform Janus degree J 0 is θ ¼ w Ã xx L ¼ 2J 0 ϵL=h (see Fig. 4f). Other J profiles can similarly produce folds; e.g., a Gaussian profile w Ã xx ¼ 2J 0 ϵe Àx 2 =2σ 2 =h can be used to create a fold of θ ¼ ffiffiffiffiffi 8π p J 0 σ ϵ=h. If the fold width (L or σ in the examples) is fixed in a particular material, design, or composition pattern, the required value of J 0 is uniquely determined.
The minimum fold width is physically constrained by the smallest L that can be patterned, and the maximum fold angle for a given L is constrained by the material-specific bound jJ 0 j 1=2. The smallest conceivable fold width is L % a, and the sharpest folds that can be realized at this scale (jJ 0 j ¼ 1=2) are θ % 2:5 , 3:9 , and 6:7 for MSeS, MTeSe, and MTeS, respectively. On the other hand, the smallest fold widths capable of producing a 45 fold are L % 6, 4, and 2 nm for the same TMDs. We take these as proxies for the smallest feature sizes achievable with this approach, which implies that 3D objects as small as tens of nanometers are realizable.
Complex shapes. As with shape ! composition programming, in composition ! shape programming, analytical predictions for simple shapes can be combined to create more complex shapes or numerical simulations can be employed to equilibrate the shape of a monolayer with fixed c ± . An example of the numerical approach is presented in the Discussion section.
Uniformization theorem. In shape programming of sheets, the stretching and bending eigenstrains are general rank two tensors. However, in the TMDs considered here, the stretching and bending eigenstrain tensors are isotropic (i.e., changes in composition yield a distribution of point sources of dilatation and no shear). While this would seem to impose a restriction on the possible shapes that can be programmed, the Uniformization Theorem 71 (an exact, geometric result that implies that any Composition ! shape programming: 2D MoSeS monolayers that self-assemble into 3D shapes. a Topographies generated by the composition patterns displayed within each monolayer (also see Supplementary Movies 1-5). The composition patterns Jðx; yÞ for P1-P4 were generated using the expressions for bending-dominant composition ! shape programming given in Table 1. Janus pattern color maps are scaled by their respective maxima J 0 . b, c The minimum radius of curvature R min surface can be coordinatized with an isotropic metric) implies that there is no such restriction (in the limit that bending stiffness tends to zero). For this result to hold exactly, the system must admit arbitrarily large stretching eigenstrain (e.g., approaching infinity or À1 at discrete points). There is thus a restriction emerging from the maximum programmable stretching eigenstrain. 1D shapes such as P2 and P3, for example, cannot be isotropically coordinatized without extremely large stretching eigenstrains and in MoSeS must therefore contain unwanted misfit strain and shape distortion. The consequences of finite bending stiffness for achieving an exact target shape is higher order and can be at least partially resolved with programmed bending eigenstrain. This problem has been extensively studied in the computer graphics literature where algorithms have been developed to efficiently compute the required stretching eigenstrain field for a particular target shape 72 .
Functional shapes. Building on the fundamental features of composition ! shape programming in TMD monolayers outlined here, designs for shapes with targeted electronic, photonic, mechanical, and chemical properties can be created. These may include compliant corrugated designs for use in flexible electronics 46,49,73 , self-enclosing designs for storage and delivery of pharmaceuticals, soft robotics 44 , high surface area corrugated/ crumpled monolayers for use in optical metasurfaces, light harvesting, and catalysis 24,74 , monolayers with geometric features designed for hydrophobic, hydrophilic, or omniphobic properties 74 , nanoplasmonic devices and sensors 47,55 , photodetectors 48 , and templates for selective self-assembly of molecules and nanoclusters 75 . Patterned and shaped monolayers may also be used to program the relative twist between stacked monolayers. When stacked, the crystallographic preference is to align the two monolayers with relative twist angle ϕ ¼ 0. However, consider the stacking of two MoSeS monolayers with sinusoidal Janus patterns generated along different crystallographic directions an angle ψ apart (see Fig. 5a). In this case, the Janus patterns introduce sinusoidal corrugations whose bending energy is minimized when the monolayers twist to ϕ ¼ ψ and the corrugations align. Additionally, the electric dipoles created by the Janus stripes give rise to an electrostatic interaction that is also minimized when like dipole moments align between monolayers, again, at ϕ ¼ ψ. The relative twist angle can therefore be programmed to ϕ ¼ ψ (see Fig. 5b) when the latter two effects outweigh the crystallographic preference for ϕ ¼ 0.
Estimates of the energies involved (see Methods) suggest that twisted configurations may, indeed, be stable, particularly in MTeS. Janus stabilized twist would enable controlled study of the many interesting phenomena that emerge when 2D materials are stacked with particular twist angles, including unconventionally superconducting magic-angle superlattices 76 and chiral stacks with plasmonic and other applications.
Dynamic actuation with electric fields. Thin elastic sheets whose internal strains, and thus shape, can be altered using external stimuli (smart materials) are broadly useful in emerging technologies such as MEM/NEM actuation and soft robotics 77,78 . TMD alloy monolayers with nonzero Janus degree may be dynamically and reversibly reconfigured using external electric fields. Since Janus regions within a monolayer are electrically dipolar 60 , an applied electric field will exert local torques (τ ¼ p E A ) on Janus regions not aligned with the field. This produces local sheet reorientation, flattening, or bending, depending on the local electric polarity relative to that of the field (Fig. 6a).
Actuation of patterned Janus monolayers. Janus patterns can be designed to exploit these effects and induce systematic, reversible, and dramatic shape changes with controlled application of electric fields. Examples of actuated shape change are shown in Fig. 6b-j. Embedded uniform Janus domains (Fig. 6b) follow inplane fields E x and E y in a "sunflower" fashion and either pucker or flatten in response to E z ( Supplementary Movies 6 and 7). The realized shapes reflect a balance between the forces exerted by the electric field and induced elastic forces that tend to oppose the ig. 5 Programming the twist between TMD alloy monolayers with Janus patterns. a Atomic representations of two monolayers compositionally patterned along different crystallographic directions separated by an angle ψ. b When stacked, the twist angle ϕ is stabilized at ψ by the preference to align the programmed out-of-plane deformations and electric dipole patterns of the two monolayers deformation (particularly in periodic monolayers). Embedded Janus domains with an axis of mirror symmetry, such as the elastically dipolar Janus-Janus circles shown in Fig. 6c, fold under E x and distort into saddle-like shapes under E y ( Supplementary  Movies 8-10). This folding effect can be implemented into mechanically anisotropic lamellar patterns that fold under one inplane field direction (Fig. 6d, Supplementary Movie 11) or anisotropic 2D patterns that can fold in more than one direction but are geometrically frustrated from folding in certain directions (Fig. 6e, f, Supplementary Movies 12-18). Other examples include radial patterns of different symmetries (Fig. 6g, h, Supplementary , lattices with randomly selected Janus polarity leading to quasi-random crumpling (Fig. 6i, Supplementary Movies 25 and 26), and actuatable multiscale or hierarchical patterns (Fig. 6j, Supplementary Movie 27). More complicated actuation effects can be achieved with nonuniform electric fields.
Applications with actuation. Designs based on these dynamically configurable and reversible smart materials have potential uses in mechanical actuation of MEMS/NEMS and in dynamically controllable and tunable implementations of the applications noted in the previous section for designed static shapes. Properties of the materials and devices described therein can be rapidly and reversibly enabled, disabled, and tuned.
Potential applications based on the structures shown in Fig. 6 include unidirectional or multidirectional electromechanical actuators and force sensors (Fig. 6d, e, i), surfaces with dynamically variable multiscale features for tunable wettability (Fig. 6j), and dynamically reconfigurable surfaces for microfluidics and selfassembly templates (Fig. 6d-h, j) 79 . Additional uses include generating heterogeneous in-plane strains with E-fields (see, e.g., Fig. 6c) to dynamically and locally tune electronic structure, introducing Janus patterns and E-fields as degrees of freedom in design optimization for targeted mechanical and other properties, and employing E-field application protocols to guide sequential selfassembly of elaborate 3D shapes.
The forces generated during actuation can also be translated into propulsion mechanisms for nano/micro devices. For example, the flapping mode of Janus-Janus domains (Fig. 6c) could be incorporated into driven swimmers by adhering each half-circle onto a stiffer backing material. The force exerted by a perpendicular electric field on a Janus domain with one edge of width ' pinned in place is roughly F % jpjjEj'. A 1 MV m À1 electric field will therefore generate $10 pN of force over a ' ¼ 1 µm domain, comparable to the locomotive forces generated by bacteria on similar length scales 80 . F can be increased by stacking several monolayers.

Discussion
We have demonstrated that shape and composition programmable TMD alloy monolayers are capable of self-assembling a wide variety of patterns and shapes with nano-to macro-scale features and that these shapes can be reversibly actuated with applied electric fields.
The forward shape ! composition and composition ! shape programming processes examined above can be reposed as inverse or design problems; given a target shape or composition, determine the input composition or shape required to generate it. It is straightforward to invert our analytic solutions to the forward problems (see Table 1) to obtain solutions to the inverse problems for simple shapes/patterns. Our numerical solution approaches for complex shapes/patterns can also be adapted to these tasks by additionally optimizing shape amplitude with respect to target composition patterns (designed shape ! composition) or composition magnitude with respect to target shape/topography (designed composition ! shape). This optimization is accomplished in both cases by combining the two types of forward programming processes, as described in Methods and shown in Fig. 7 for a complex shape (the obverse of the US Franklin half dollar).
The relative bending and stretching strains (or J and c pattern magnitudes) associated with a target shape can significantly affect programmed shape accuracy. The accuracy with which complex c d e f g h i j Fig. 6 Using applied electric fields E A to actuate TMD alloy monolayers with composition-programmed shapes. a Schematics of how Janus regions in monolayers with clamped edges reorient, bend, or flatten according to their electric polarity relative to that of the field. Gray, magenta, and cyan spheres represent Mo, S, and Se atoms, respectively. Gray (black) arrows indicate atomic dipole moment (applied electric field) direction. The first column shows equilibrium shapes of seven Janus-patterned free standing sheets in the absence of an applied electric field (E A ¼ 0). b-h Simulated shapes of Januspatterned MoSeS monolayers under uniform fields with directions shown in (a). i ± E x -induced crumpling of a monolayer containing circular Janus domains arranged on a square lattice with randomly assigned polarity. j E x -induced two-scale buckling/folding of a patterned monolayer containing zigzag Janus domains on two length scales. Also see Supplementary  shapes such as the Benjamin MoSeS Franklin example shown in Fig. 7 can be programmed increases as the amplitude of the target shape decreases. Equilibrium composition patterns become J-dominated at small amplitude. However, the topographical amplification factor simultaneously approaches its maximum value (bending-dominant 1 þ Δ w % 7:6 at T ¼ 1023 K), such that the realized free-standing shapes become increasingly flattened relative to their templates. On the other hand, the composition patterns that produce large amplitude complex shapes tend to be c-dominated, which results in less flattening upon removal from the template substrate but less overall shape accuracy. Our numerical procedures for designed programming can be combined to enable physical realization in the laboratory. For example, once a composition pattern that will program a target shape has been determined by our designed composition ! shape programming procedure, this composition pattern must be physically realized. A substrate template topography that will produce the desired pattern can be computed using the designed shape ! composition programming procedure described above.
Recent experimental results demonstrate that the fundamental mechanisms behind our approach are operable and observable. A link between composition and shape has been established, e.g., in defect-free WS 2 /WSe 2 superlattice crystals 26 and coherent MoS 2 / MoTe 2 monolayer heterostructures 27 , where compositional misfit strain created by S/Se and S/Te gradients induces periodic out-ofplane ripple patterns. The production of stable Janus MoSeS monolayers [61][62][63] further indicates that Janus degree can be spatially controlled. The viability of the topographic annealing approach that we propose for this purpose (shape ! composition programming) is supported by experimental results which demonstrate that transition metal diffusivities are sufficiently large (at TMD growth temperatures) to redistribute transition metal composition profiles under relatively small driving forces 81 . Since chalcogen diffusivities are generally larger than metal diffusivities, this suggests that significant chalcogen redistribution will also be achievable.
Nanopatterned TMD growth substrate topographies have been demonstrated using ion-beam-projection lithography 23 . TMD synthesis on these topographically anisotropic substrates resulted in conformal, isomorphic nanosheet growth. This demonstrates that TMD properties can be tailored via topography-based strain engineering and potentially provides a means to spatially control Janus degree in TMD alloys.
The model presented in this work describes single crystal monolayers without grain boundaries or other topological defects. This limits its validity to single grains, which can currently be grown over $10 µm in size. The presence of toplogical defects will couple to and alter strains and compositions. For example, during monolayer growth on non-flat surfaces, shape strain can be accommodated by building topological defects into the lattice. This suppresses the mechanism of shape ! composition programming, indicating that high T annealing rather than synthesis on non-flat surfaces should be the more effective approach for topographical shape ! composition programming. If monolayers containing grain boundaries or domain walls are used, we expect our description to remain valid when strains are sufficiently small and/or grain sizes are sufficiently large relative to topographical or compositional feature sizes. When these conditions are not met, local compositional heterogeneities associated with grain boundaries may become more significant than those created by topographic patterns, and strain-driven defect migration during transfer and annealing may plastically relieve some topographic strain and partially suppress composition patterning. The effects of topological defects can however be built into our model, e.g., as additional contributions to the eigenstrain fields ϵ Ã ij and w Ã ij . Effects associated with finite substrate/monolayer interaction strengths (e.g., slipping and delamination) and free sheet edges can also be treated with appropriate modifications.
The crux of the shape/composition programming paradigm is the determination of the fundamental relations between composition and deformation. We derived these relations for our proposed atomically thin smart shape/composition programming platform and have also presented a physical model with which the relations can be numerically computed for complicated shapes and patterns. Our modeling approach is sufficiently general for application to other TMD alloy systems, other 2D materials, and other shape/composition programmable materials. While our focus here has largely been on shape and composition programming, the ultimate goal is physical property programmingoptimization of patterns and shapes with respect to target material properties. We have provided examples of spatial bandgap modulation and have suggested several other possibilities involving designed mechanical, catalytic, chemical, thermal, and optical properties. Combination of the utility of smart shape programmables with the diversity of intrinsic TMD properties and designed composition patterns, all tunable across length scales, suggest a broad set of potential applications for this 2D material platform.  Fig. 7 Benjamin MoSeS Franklin: a complex shape produced by numerical designed composition ! shape programming. The target shape (left-a 1.4 µm version of the obverse of the Franklin half dollar) is used as a substrate template (1) upon which an initially homogeneous MoSeS monolayer is annealed at 1023 K (shape ! composition programming, yellow arrow). (2) The resulting uncompensated composition state ("Uncompens." J and c), upon release from the template yields an uncompensated shape with features very similar to the target but with smaller shape amplitude (composition ! shape programming, green arrow). (3) The composition patterns obtained from (1) are multiplied by the ratio of target (10 nm) to uncompensated (6.7 nm) shape amplitude (compensation, blue arrow). (4) A monolayer assigned the compensated composition state, upon shape equilibration yields a shape with features and amplitude very similar to the target (composition ! shape programming, green arrow)

Methods
Plate theory formalism. Here we outline the derivation of the modified Föppl-von Kármán equations used in this work, Eq. (2). These equations include the effects of general eigenstretching and eigenbending fields.
We describe material deformation mathematically as two embeddings of the 2D (with small thickness) material in 3D space (Table 2). One embedding represents the undeformed geometry and gives the Lagrangian, or material, coordinates (notated in upper case). The other represents the deformed geometry and gives the Eulerian, or spatial, coordinates (notated in lower case). The indices a; b; c; range over f1; 2; 3g, describing the full three dimensional coordinates, while the indices i; j; k; range over f1; 2g, describing the approximation of the plate as two dimensional. We use the Lagrangian convention, where deformation is said to take a point X a to x a ðX a Þ.
To describe stretching, we consider first the in-plane stretching deformation in the ðX 1 ; X 2 Þ coordinate basis. The displacement vector in 3D Lagrangian coordinates is defined u a ðX i Þ ¼ x a ðX i Þ À ðX i ; 0Þ. The full Lagrangian stretching deformation tensor is For bending, we consider the small but finite thickness of the plate to find the moments that give the bending deformation. We use the Kirchoff-Love hypothesis and other approximations to give that strains ϵ 3a are small and that the gradient x a;3 ðX i Þ is parallel to the normal vector of the plate, n a ðX i Þ. Thus, the full deformation is x a ðX a Þ ¼ x a ðX i Þ þ X 3 n i ðX i Þ. The full in-plane stretching deformation is ϵ ij ðX a Þ ¼ ϵ ij ðX i Þ À X 3 w ij . The term w ij ¼ x a;ij n a is the bending deformation tensor, commonly known as the curvature tensor or the second fundamental form of the surface.
The approximation of the Föppl-von Kármán equations is that the plate undergoes small deformations and small rotations out of plane. Thus, we ignore the higher order terms Oðu 2 i;j Þ and the normal vector n a is nearly entirely in the out-ofpane direction X a;3 . For convenience, we notate the out-of-plane component u 3 as With this, the stretching and bending deformation tensors become and The following definitions are employed for strain. Strain is the deformation from the state that has strain zero. Eigenstrain u Ã ij =w Ã ij is the deformation from the reference state to the state with strain zero. Deformation u ij =w ij is the deformation from the reference state.
Thus, the strain tensor at a point X i is The usual elastic energy functional F ¼ R R 1 2 λ ijkl ϵ ij ϵ kl is replaced by substituting ϵ ij for our full expression for the strain with eigenstrain to obtain Electric dipoles. We examine the importance of the dipole-dipole interaction energy in MoSeS monolayers by examining its effect on pattern P2, a 1D quadratic bend (w ¼ Bx 2 =2) created by a thin homogeneous Janus strip, in this case within a monolayer with free edges. As can clearly be seen in Supplementary Fig. 1, the effect of dipole-dipole interactions is not found to qualitatively alter the results obtained in the absence of these electrostatic effects. We therefore neglect dipole-dipole interactions in this work, which significantly simplifies the analysis and simulations. Employing this approximation, the thermodynamic (dipolar) potential that dictates the monolayer's topography in electrostatic equilibrium under an applied electric field E A is DFT calculations. Here, we detail the DFT calculations performed to determine f mix ðc ± Þ and Λ for MoSeS. All DFT calculations were performed with the Vienna Ab Initio Simulation Package (VASP) 82,83 using a plane-wave basis set and the projector augmented wave method 84,85 . The Perdew-Burke-Ernzerhof generalized gradient approximation was employed to treat exchange-correlation effects 86 . The plane wave kinetic energy cutoff was set to 420 eV, and a 12 12 1Γ-centered kpoint grid was employed for Brillouin zone integration. All atomic structures were fully relaxed until the total force on each atom was <0:01 eV Å À1 . A vacuum layer of minimum thickness 20 Å perpendicular to the monolayer was employed to minimize interactions between the monolayer and its periodic images. The total energies of MX 2 and MY 2 (U X and U Y ) appearing in the enthalpy of mixing were directly computed (Supplementary Table 1). Their derivatives at c ¼ 0 and 1 were evaluated from the change in total energy density upon substituting one Se (S) atom into large supercells containing 150 atoms (5 5 conventional unit cells). Results of these calculations are shown in Supplementary  Fig. 2a. We obtained dU=d cj c¼0 ¼ ðU c¼0:01 À U c¼0 Þ=0:01 ¼ 1:666 eV per Mo and dU=d cj c¼1 ¼ ðU c¼1 À U c¼0:99 Þ=0:01 ¼ 1:951 eV per Mo. Using these values, we determined the regular solution parameter; χ ¼ ðdU=d cj c¼0 À dU=d cj c¼1 Þ=2 ¼ À0:1425 eV per Mo.
The constant that describes the compositional interactions between chalcogen layers, Λ, was determined by considering monolayers with only S atoms in one chalcogen layer and random mixtures of S and Se atoms at different average compositions in the other chalcogen layer. Λ was quantified from the difference in total energy between such asymmetric monolayers U a and symmetric monolayers with equal compositions in both chalcogen layers U s . We fit these data to a quadratic form U a À U s % ðU a 2 À U s 2 Þð c þ À c À Þ 2 (see Supplementary Fig. 2b). Comparison with Eq. (5) shows that Λ ¼ 2ðU a 2 À U s 2 Þ % 0:13 eV per Mo-atom.
Mechanical and chemical relaxation. Out-of-plane displacements are evolved toward equilibrium using a physically-motivated damped wave equation that approximates flexural acoustic phonons β 0 and β 1 are damping parameters that operate uniformly and preferentially on large wavenumber oscillations, respectively, and α w is the propagation speed of bending waves. For conditions in which chalcogen composition is not conserved, c þ and c À are dissipatively relaxed to equilibrium Here, M ± is the diffusional mobility of chalcogens and λ 0 is the environmental chemical potential. This choice assumes substitutional diffusion between species X and Y (M X ¼ M Y ¼ M ± ). For conditions in which chalcogen composition is conserved but only equilibrium states are of interest (physical kinetics are not necessary), a Lagrange multiplier is added to enforce conservation without the need for slower diffusive kinetics Here, λ ± ¼ A À1 R A ðδF=δc ± Þdr is the Lagrange multiplier that enforces global conservation of species in each XY-layer.
Conserved composition and physical kinetics are treated with generalized diffusion equations Composition-to-twist programming. An example of Janus-stabilized twist, ϕ, between two MoSeS monolayers with sinusoidal Janus patterns programmed along crystallographic directions separated by ψ ¼ 15 is shown in Fig. 5. The energy increase between ϕ ¼ 0 (untwisted) and large ϕ (twisted) states has been calculated for MoS 2 bilayers from first principles 87 to be % 0:02 Jm À2 . For Janus patterned bilayers with ψ ≠ 0, the dipole anti-alignment imposed by Janus-misaligned states (ϕ ≠ ψ) leads to an electrostatic energy decrease in the twisted, Janus-aligned state (ϕ ¼ ψ) of % ð2p 0 J 0 Þ 2 =2πϵ 0 d 3 b % 6 10 À4 Jm À2 for J 0 ¼ 1=2 (ϵ 0 ¼ 8:85 10 À12 Fm À1 is the permittivity of air or vacuum and d b % 0:63 nm is the distance between stacked MoSeS monolayers). This energy decrease is not sufficient to stabilize large twist angles. However, our estimates indicate that the bending energy decrease between Janusmisaligned and twisted, Janus-aligned MoSeS states is ≳0:023 Jm À2 for monolayers much larger than the Janus wavelength, which may be sufficient to stabilize twisted configurations. Our calculations also indicate that this twist-stabilizing bending energy decrease is linearly proportional to both κ and ϵ. This suggests that Janus patterninduced twist-stabilization will be most effective in MTeS, which has $10% larger κ and $100% larger ϵ than MSeS.
The bending energy estimates above are obtained from Eq. (4) as the difference between the bending energy minimum of both monolayers in their respective bendingrelaxed states (when ϕ ¼ ψ) and the bending energy maximum of one monolayer in its bending-relaxed state and the other forced to conform to the first (against its programming, when ϕ ≠ ψ). More detailed calculations are required to fully address the question of under exactly which conditions such twisted structures will be stable.
Inverse/designed shape ! composition programming. Designed shape ! composition programming begins with (1) a forward composition ! shape step; the target composition pattern is assigned to a flat monolayer and its shape wðx; yÞ is equilibrated. Then (2) a forward shape ! composition step is performed by fixing a compositionally homogeneous monolayer in the shape obtained in (1) and equilibrating composition. The magnitude of the resulting composition pattern will differ from that of the target by a factor of $ð1 þ ΔÞ À1 , where Δ is the chemo-elastic ratio of the shape obtained in (1). Multiplying the shape amplitude obtained in (1) by the value of 1 þ Δ obtained in (2) gives the compensated substrate template amplitude. While only one iteration of this procedure is typically required to obtain high fidelity substrate amplitudes, the procedure can be iterated to the required degree of convergence.
Inverse/designed composition ! shape programming. Analogously, designed composition ! shape programming begins with (1) a forward shape ! composition step; a monolayer is fixed into the target shape and its composition is equilibrated. Then (2) a forward composition ! shape step is performed by assigning the composition pattern obtained in (1) to a flat monolayer and equilibrating its shape. The amplitude of the resulting shape will differ from that of the target by a factor of $ ð1 þ ΔÞ À1 , where Δ is the chemo-elastic ratio of the target shape. Multiplying the pattern magnitudes obtained in (1) by the value of 1 þ Δ obtained in (2) gives (3) the compensated composition pattern magnitudes, which (4) upon shape equilibration produce an improved programmed shape. This procedure can be iterated until the required shape amplitude accuracy is achieved. Figure 7 shows a complex shape (the obverse of the US Franklin half dollar-i.e., Benjamin MoSeS Franklin) programmed into a c ¼ 1=2 MoSeS monolayer using this approach.

Data availability
The data supporting the findings of this study are available within the paper and its Supplementary files, and are available from the corresponding author upon request.

Code availability
The custom C/MPI code used in numerical simulations is available from the corresponding author upon reasonable request.