Skip to content

1. Heterostructure Fundamentals

1.1 What Is a Heterostructure?

In condensed-matter physics, materials science, heterogeneous catalysis, and nanoelectronics, stacking or joining two (or more) distinct crystalline materials along a vertical normal direction to form an atomically sharp interface creates a heterostructure (or heterojunction). Heterostructures combine complementary properties of their parent materials and frequently exhibit emergent physics absent in either component alone—such as built-in interfacial electric fields that separate photogenerated electrons and holes, \(d\)-band center tuning for catalysis, or flat bands and correlated superconductivity in twisted moiré bilayers.

In first-principles calculations, vertical heterostructures generally fall into four major classes:

  • 2D van der Waals (vdW) Heterostructures: Two or more 2D layers (e.g., graphene, h-BN, MoS2, WSe2, black phosphorus) held together by weak vdW forces with no dangling bonds, such as MoS2 / WSe2 or Graphene / MoS2.
  • 2D Layer on Bulk Substrate: Simulating CVD growth or metal-semiconductor electrical contacts by placing a 2D overlayer onto a metallic or oxide slab, such as Graphene / Cu(111), Graphene / Ir(111), or MoS2 / Au(111).
  • Slab-on-Slab Interface: Cleaving specific crystal facets from two bulk crystals (e.g., via Multiwfn Option 32) and matching them face-to-face, such as GaN(0001) / HfO2(001) or semiconductor/oxide interfaces.
  • Twisted Homobilayer / Heterobilayer Moiré Superlattices: Stacking two identical or nearly lattice-matched 2D crystals with a deliberate relative twist angle \(\theta\), producing periodic moiré patterns such as twisted bilayer graphene (tBLG).

1.2 Why Is Building a Heterostructure Challenging?

Mainstream localized-basis and plane-wave DFT codes (CP2K, VASP, Quantum ESPRESSO, etc.) rely on periodic boundary conditions (PBC). Consequently, the simulation cell must simultaneously preserve exact 2D in-plane periodicity for both the bottom component Part A and the top component Part B—meaning A and B must fit inside one shared common supercell (commensurate supercell).

In practice, however, two different crystals rarely share the same primitive lattice constants (\(a, b\)) or interaxial angle (\(\gamma\)). For example, graphene is hexagonal (\(a = b = 2.468\text{ Å}, \gamma = 120^\circ\)), whereas monolayer black phosphorus is rectangular (\(a = 4.380\text{ Å}, b = 3.310\text{ Å}, \gamma = 90^\circ\)). Forcing their \(1\times 1\) primitive cells together would induce \(30\%\text{–}70\%\) distortion, completely destroying covalent bonds and electronic band structures.

Therefore, constructing a realistic heterostructure requires finding a pair of 2D integer supercell matrices \(\mathbf{M}_A\) and \(\mathbf{M}_B\) (allowing a relative in-plane rotation \(\theta\)) such that the expanded supercells \(A'\) and \(B'\) match closely in both edge lengths and angle—minimizing artificial lattice strain while keeping the total atom count affordable for DFT. Figure 1-1 summarizes the four heterostructure archetypes and the commensurate supercell matching concept.

Four heterostructure types and commensurate supercell matching
Figure 1-1. (A) Four common categories of vertical heterostructures. (B) Why naive 1×1 stacking fails under periodic boundary conditions and how integer supercell matrices with an in-plane twist angle lock rectangular black phosphorus and hexagonal graphene into one shared periodic supercell (28 atoms, strain ≤ 2.46%).

1.3 Core Concepts Every Beginner Should Know

(1) Lattice Mismatch vs. Exact Continuum Biot Strain Tensor

Lattice mismatch is the single most important quality metric when constructing a heterostructure. Two levels of definition appear in the literature:

  1. Simple geometric mismatch (used by basic scripts): Compares supercell edge lengths and angles directly, e.g., \(\delta_a = |a_{A'} - a_{B'}|/a_{A'}\), \(\delta_b = |b_{A'} - b_{B'}|/b_{A'}\), angle difference \(\delta_\gamma = |\gamma_{A'} - \gamma_{B'}|\), or area mismatch \(\delta_S = |S_{A'} - S_{B'}|/S_{A'}\).
  2. Why edge-length and area mismatch alone are dangerous: In an elongated or acute parallelogram supercell, even zero edge-length mismatch and tiny area mismatch accompanied by a \(1^\circ\text{–}2^\circ\) angle discrepancy induces severe in-plane shear distortion, heavily distorting bond angles (such as regular graphene hexagons) and inflating strain energy.
  3. Multiwfn's exact physical metric — Biot Principal Strain via Polar Decomposition: Multiwfn forms the exact 2D deformation gradient mapping supercell \(B'\) onto supercell \(A'\):
\[ \mathbf{F} = \mathbf{H}_{A'}\,(\mathbf{H}_{B'})^{-1} = \mathbf{U}\,\mathbf{R}(\theta) \]

By analytic polar decomposition, pure rigid rotation \(\mathbf{R}(\theta)\) (which causes zero bond distortion and directly gives the twist angle \(\theta\)) is cleanly separated from the symmetric pure-stretch tensor \(\mathbf{U}\). The engineering Biot strain tensor is \(\boldsymbol{\varepsilon} = \mathbf{U} - \mathbf{I}\), whose two eigenvalues are the orthogonal principal strains \((\varepsilon_1, \varepsilon_2)\) (positive + = tensile stretch, negative - = compression). Multiwfn reports:

\[ \text{MaxEps} = \max(|\varepsilon_1|, |\varepsilon_2|), \qquad \text{RMS} = \sqrt{\frac{\varepsilon_1^2 + \varepsilon_2^2}{2}} \]

MaxEps rigorously bounds the worst-case fractional bond stretch or compression along any in-plane direction, automatically catching both axial mismatch and shear distortion (Figure 1-2).

Shear distortion pitfall vs polar decomposition Biot strain
Figure 1-2. (a) Undeformed reference hexagonal ring inside supercell B'. (b) The shear-distortion pitfall: zero edge-length mismatch with a small angle discrepancy severely shears the atomic ring in a slender cell. (c) Multiwfn's analytic polar decomposition separates rigid rotation R(θ) from orthogonal principal stretches (+ε1, −ε2), rigorously bounding both axial and shear deformation.
MaxEps Range Quality Rating Practical Guidance for DFT Calculations
< 1.0% Excellent (nearly strain-free) Negligible artificial band shifts or strain energy; ideal for accurate band alignment, moiré flat bands, and precise reaction barriers.
1.0% – 3.0% Good (recommended range) Standard acceptance window in most DFT heterostructure papers, balancing physical fidelity and tractable atom counts. Multiwfn default: 3.0%.
3.0% – 5.0% Acceptable with caution Often tolerable for flexible 2D layers or under average-strain mode; verify that isolated strained monolayers retain qualitative electronic features (e.g., no unintended direct/indirect gap crossover or metallization).
> 5.0% High (generally avoid) Risk of artificial stress, bond distortion, and unphysical electronic states; increase the atom-count cap or allow non-zero twist angles to find a better supercell.

(2) Supercell Transformation Matrices and Area Multipliers

To construct a commensurate supercell, 2×2 integer transformation matrices \(\mathbf{M}_A\) and \(\mathbf{M}_B\) are applied to the in-plane primitive lattice vectors \((\mathbf{a}, \mathbf{b})\) using the standard crystallographic row convention:

\[ \begin{aligned} \mathbf{a}' &= M_{11}\mathbf{a} + M_{12}\mathbf{b}, \\ \mathbf{b}' &= M_{21}\mathbf{a} + M_{22}\mathbf{b}, \\ N &= |\det(\mathbf{M})| = |M_{11}M_{22} - M_{12}M_{21}|, \\ N_{\text{tot}} &= N_A n_A + N_B n_B. \end{aligned} \]

Here \(n_A, n_B\) are the atom counts of the input cells, and the area multipliers \((N_A, N_B)\) appear as Mul(A, B) in Multiwfn's candidate table. For example, in Black-P / Graphene, \(\mathbf{M}_A = \begin{pmatrix}1 & 0 \\ 0 & 3\end{pmatrix}\) (\(N_A = 3\)) and \(\mathbf{M}_B = \begin{pmatrix}1 & 2 \\ -4 & 0\end{pmatrix}\) (\(N_B = 8\)) yield \(N_{\text{tot}} = 3\times 4 + 8\times 2 = 28\) atoms.


(3) Relative Twist Angle (θ) and Moiré Superlattices

When off-diagonal supercell matrices align two lattices into a common box, their crystal axes naturally form a relative twist angle \(\theta\) (counterclockwise rotation of Part B relative to Part A). Allowing non-zero twist angles (such as \(16.10^\circ\), \(19.11^\circ\), or \(30.00^\circ\)) frequently cuts lattice strain from \(3\text{–}4\%\) down to \(0.1\text{–}0.5\%\) at a fraction of the atom count required for \(0^\circ\) alignment!

For identical homobilayers (such as graphene/graphene), specific commensurate twist angles (\(\pm 21.79^\circ, \pm 27.80^\circ, \pm 13.17^\circ, \pm 9.43^\circ, \dots\)) achieve exact \(0.000\%\) zero strain. Pairs of \(+\theta\) and \(-\theta\) entries in the candidate table represent enantiomorphic mirror twins with identical strain tensors.


(4) Strain Distribution Strategy (Which Layer Takes the Strain?)

When \(A'\) and \(B'\) differ slightly in size, deciding which component carries the strain depends on physical stiffness:

Multiwfn Strain Mode (Option 3) Common Lattice \(\mathbf{H}_{\text{common}}\) Physical Scenario
1 Fix A, strain B (default) \(\mathbf{H}_A\) (Part A unstrained; Part B bears full strain) Epitaxial growth or 2D overlayer on a thick, rigid metal/oxide substrate.
2 Fix B, strain A \(\mathbf{H}_B\) (Part B unstrained; Part A bears full strain) When the top layer B is much stiffer or serves as the reference lattice without swapping A and B.
3 Average lattice \(\tfrac{1}{2}(\mathbf{H}_A + \mathbf{R}\mathbf{H}_B)\) (strain split ~50/50) Recommended for free-standing 2D/2D vdW bilayers (e.g., MoS2/WSe2): cuts per-layer maximum strain in half!

(5) Interlayer Distance, Vacuum Thickness, and Z-Axis Box Anatomy

  • Interlayer distance \(d_{\text{inter}}\) (in Å): Defined as the vertical (\(Z\)) separation between the highest atomic nucleus of Part A and the lowest atomic nucleus of Part B (i.e., the net nuclear-plane clearance at the interface, not the center-of-mass distance). Typical initial guesses: 3.0 – 3.4 Å for vdW 2D heterostructures (Multiwfn default: 3.000 Å), or 2.0 – 2.6 Å for strongly chemisorbed metal/oxide interfaces. Exact equilibrium spacing is subsequently obtained via dispersion-corrected DFT structural relaxation.
  • Vacuum thickness \(L_{\text{vac}}\) (in Å): Separates the top surface of the heterostructure from the bottom of its periodic image along \(c\). DFT slab calculations typically require ≥ 15 Å (Multiwfn default: 15.00 Å); for polar interfaces or accurate work-function / electrostatic-potential calculations, use 18 – 20 Å together with centered Z placement and dipole correction.
Strain distribution modes and Z-axis periodic box anatomy
Figure 1-3. Left: Comparison of Multiwfn's three strain distribution modes for MoS2/WSe2 (3.7% raw mismatch halves to +1.90% / −1.83% under Mode 3). Right: Z-axis periodic cell anatomy showing Part A & Part B net thicknesses, nuclear-plane interlayer clearance dinter, top/bottom half-vacuum regions, and contiguous Z-sorted atom ordering.

(6) Stacking Registry, Lateral Shift, Upside-Down Flip (FlipB), and 180° Rotation (Rot180)

Even for the exact same supercell lattice, the interfacial sliding registry and overlayer orientation strongly govern binding energy, charge transfer, and band alignment (Figure 1-4):

  • Lateral Shift (du, dv or dx, dy): Translates Part B parallel to the interface in fractional supercell coordinates (e.g., (1/3, 2/3) or (0.5, 0.5)) or Cartesian Ångströms to generate and compare high-symmetry stacking sites (AA top, AB Bernal, bridge, hollow) or perform 2D potential-energy surface (PES) scans.
  • Flip Part B Upside Down (FlipB): Applies a proper 3D rigid 180° rotation around the X-axis, \((x, y, z) \to (x, -y, -z)\), swapping the top and bottom faces of Part B without inverting 3D chirality. Crucial for polar surfaces (e.g., Zn- vs. O-terminated ZnO) and asymmetric Janus 2D layers (e.g., S-down vs. Se-down MoSSe).
  • In-Plane 180° Rotation (Rot180): Rotates Part B by \(180^\circ\) in-plane without changing the lattice vectors or strain. For \(C_3\)-symmetric 2D crystals (MoS2, WSe2, h-BN), toggling Rot180 cleanly switches between R-type (3R-like, \(0^\circ\) parallel) and H-type (2H-like, \(60^\circ\) antiparallel) stacking!
Lateral shift, FlipB, and Rot180 stacking controls
Figure 1-4. Visual guide to Option 7 interface registry and overlayer orientation controls: (a) AA vs. AB Bernal stacking via lateral shift, (b) chirality-preserving 180° X-axis flip FlipB on a Janus MoSSe layer, and (c) switching between R-type (0°) and H-type (60°) stacking via in-plane Rot180 in C3-symmetric TMDs.

(7) Cell Angle (γ) and Pareto Optimality (*)

  • Cell shape (\(\gamma\)): Any 2D Gauss-reduced cell (\(60^\circ \le \gamma \le 120^\circ\)) is compact and well-conditioned for DFT. Hexagonal systems naturally favor \(\gamma = 120^\circ\) for maximum symmetry and fewer irreducible \(k\)-points, whereas transport (NEGF), anisotropic crystals (black phosphorus), or uniaxial strain studies often prefer orthogonal rectangular supercells (\(\gamma = 90^\circ\)).
  • What does Pareto-optimal (*) mean? You simultaneously want fewer atoms (cheaper DFT) and lower strain (higher accuracy), which are usually competing goals. A candidate is Pareto-optimal if no other match has fewer (or equal) atoms while also having strictly lower strain. Multiwfn automatically pins all Pareto-optimal solutions to the top of the table with a star (*), revealing the entire optimal cost-vs-accuracy trade-off curve at a glance (Figure 1-5).
Real MoS2/WSe2 Pareto frontier plot
Figure 1-5. Authentic Pareto frontier plotted from all 1,104 live Multiwfn matches for MoS2/WSe2 (average strain mode). Every gray point above-right of the dashed frontier is dominated in both atom count and strain by at least one starred (*) candidate.