Skip to content

4. Option 33 Interface & Sub-Option Reference

4.1 Entering Option 33

  1. Launch Multiwfn and load the first periodic structure (Part A, bottom / substrate).
  2. Enter 300 (Other functions, Part 3) → 7 (Geometry operation on the present system) → 33 (Build heterostructure from two periodic structures).
  3. Multiwfn prints a summary of Part A (atom count, formula, in-plane \(a, b, \gamma\), net slab thickness) and prompts for the file path of the second periodic structure (Part B, top / overlayer; drag-and-drop quoted paths are supported, or enter q to cancel).
  4. Once Part B is loaded, the main settings menu appears (Figure 4-1). Loading Part B is completely isolated in memory—it never overwrites the original structure record, so Option -9 (Restore the original geometry) in the geometry operation menu remains available even after building a heterostructure!
Main Settings Menu of Option 33
================ Build heterostructure (A = bottom, B = top) ================
Part A (bottom):     3 atoms (Mo1 S2),  a=  3.160 A, b=  3.160 A, gamma=120.00 deg, thick= 3.12 A
Part B (top):        3 atoms (W1 Se2),  a=  3.280 A, b=  3.280 A, gamma=120.00 deg, thick= 3.34 A

-1 Return without modifying geometry
 0 Start searching for matching heterostructure supercells!
 1 Set maximum strain tolerance                Current:  3.00 % (max principal strain)
 2 Set maximum total number of atoms           Current:   300
 3 Set strain distribution mode                Current: Strain B to match A (fix A as substrate)
 4 Set cell angle gamma filter                 Current: Any reduced cell (60 to 120 deg)
 5 Set relative twist angle constraint         Current: Any twist angle
 6 Set interlayer distance and vacuum          Current: Interlayer= 3.000 A,  Vacuum= 15.00 A
 7 Set lateral shift & overlayer orientation   Current: Frac=(0.000,0.000), FlipB=No , Rot180=No
 8 Swap Part A (bottom) and Part B (top)
 9 Advanced settings (stacking axes: c/c, Z pos, max area, reload B)

4.2 Main Settings Menu Explained (-1, 0, and 1–9)

-1 Return without modifying geometry

Exits Option 33 and returns to the geometry operation menu without altering the loaded geometry.

0 Start searching for matching heterostructure supercells!

Launches the Zur–McGill lattice-matching search using the current settings. For most standard systems, the default settings work out of the box—simply press 0 immediately after loading Part B to view candidate supercells!

1 Set maximum strain tolerance (default: 3.00 %)

Sets the upper bound on maximum principal Biot strain (MaxEps, range 0 to 40 %), strictly requiring \(\max(|\varepsilon_1|, |\varepsilon_2|) \le \text{tolerance}\) along every in-plane direction.

  • Under Mode 3 (Average lattice), this cap applies to the actual strain borne by each component individually (e.g., a \(3.7\%\) raw mismatch halves to \(\approx \pm 1.86\%\), comfortably passing the default 3.00% threshold!).
  • Recommended values: Keep 3.0% or tighten to 1.0%–2.0% for general heterostructures; set 0.1% for exact zero-strain twisted homobilayers (e.g., tBLG); relax to 5%–10% only if forcing a minimal cell on heavily mismatched materials.

2 Set maximum total number of atoms (default: 300)

Sets the upper cap on \(N_{\text{tot}} = N_A n_A + N_B n_B\) (must be \(\ge n_A + n_B\)). Routine DFT calculations typically stay within 100–300 atoms; when using CP2K, machine-learning potentials, or tight-binding models to study large moiré superlattices (e.g., 10×10 Graphene / 9×9 Ir(111), 524 atoms), raise this cap to 600–1000. (For speed, the per-component area multiplier is internally capped at 200.)

3 Set strain distribution mode (default: 1 Fix A, strain B)

Controls how lattice mismatch strain is partitioned between Part A and Part B:

  • 1 — Strain Part B (top) to match Part A (bottom) [Default]: Keeps Part A strictly unstrained (0.000%), applying all strain to Part B. Ideal for a 2D overlayer on a thick metal or oxide substrate.
  • 2 — Strain Part A (bottom) to match Part B (top): Keeps Part B strictly unstrained (0.000%), applying all strain to Part A.
  • 3 — Average lattice (share strain equally between Part A and Part B): Uses the rotation-aligned average lattice so A and B split the mismatch ~50/50 (one slightly stretched, one slightly compressed). Strongly recommended for free-standing 2D/2D vdW heterobilayers (MoS2/WSe2, WS2/MoSe2).

4 Set cell angle γ filter (default: 1 Any reduced cell, 60°–120°)

Restricts the shape of the resulting common supercell:

  • 1 — Any reduced cell (60 to 120 deg) [Default]: Keeps all Gauss-reduced compact cells (hexagonal, orthogonal, and low-strain oblique).
  • 2 — Orthogonal (rectangular) cells only (\(\gamma = 90^\circ\)): Keeps strictly rectangular cells (\(|\gamma - 90^\circ| \le 0.5^\circ\)). Ideal for anisotropic materials (black phosphorus), quantum transport (NEGF), or uniaxial strain along X/Y.
  • 3 — Hexagonal cells only (\(\gamma = 60^\circ\) or \(120^\circ\)): Keeps hexagonal supercells (standardized to \(\gamma = 120^\circ\)), preserving hexagonal Brillouin-zone symmetry.
  • 4 — Custom angle range [min, max]: Accepts user-defined degree bounds (e.g., 80, 100).

5 Set relative twist angle constraint (default: 1 Any twist angle)

  • 1 — Any twist angle [Default]: Automatically discovers all commensurate twist orientations without manual angle scanning.
  • 2 — Target twist angle \(\theta \pm \text{tolerance}\): Restricts matches to a desired twist window (automatically accounting for 2D lattice rotational symmetry). Examples: 0, 1.0 for aligned (\(0^\circ \pm 1^\circ\)) interfaces, or 30, 0.5 for \(30^\circ\)-rotated armchair/zigzag alignment.

6 Set interlayer distance and vacuum (default: 3.000 Å, 15.00 Å)

Enter two values separated by a comma or space: vertical interfacial clearance \(d_{\text{inter}} > 0\) (Å, highest nucleus of A to lowest nucleus of B) and total vacuum thickness \(L_{\text{vac}} \ge 0\) (Å), e.g., 3.2, 18.0. The final cell height is automatically set to \(c = \text{thick}_A + d_{\text{inter}} + \text{thick}_B + L_{\text{vac}}\).

7 Set lateral shift & overlayer orientation

Opens a submenu for precise registry and orientation control of Part B:

  • 1 — Fractional lateral shift (du, dv): Shifts Part B along the final supercell's \(\mathbf{a}', \mathbf{b}'\) axes (e.g., 0.3333, 0.6667 or 0.5, 0.5) to switch among AA, AB, bridge, and hollow registries.
  • 2 — Cartesian lateral shift (dx, dy) in Å: Shifts Part B along aligned \(+X, +Y\) axes (e.g., 1.42, 0.0)—convenient for uniform 2D PES grids.
  • 3 — Toggle flipping Part B upside down (FlipB, default No): Applies a proper 3D 180° rotation about the X-axis \((x, y, z) \to (x, -y, -z)\), placing Part B's top face at the interface while preserving 3D chirality. Essential for polar slabs (ZnO, GaN) and Janus layers (MoSSe). Because flipping an oblique 2D lattice sends \(\gamma \to 180^\circ - \gamma\), toggle FlipB before running the search.
  • 4 — Toggle rotating Part B by 180° in-plane (Rot180, default No): Rotates Part B by \(180^\circ\) in-plane without changing lattice constants or strain—switches R-type (\(0^\circ\)) and H-type (\(60^\circ\)) stacking in \(C_3\)-symmetric materials (MoS2, WSe2, h-BN).

8 Swap Part A (bottom) and Part B (top)

Instantly swaps Part A and Part B without reloading files (each component's stacking-axis setting moves with it, while FlipB and Rot180 reset to No).

9 Advanced settings

  • 1 / 2 — Stacking axis of Part A / Part B (1=a, 2=b, 3=c, default c): Useful if an input structure has its vacuum gap oriented along \(a\) or \(b\) rather than \(c\). Multiwfn automatically checks vacuum gaps along all three axes and prints a Hint if vacuum appears to lie along \(a\) or \(b\).
  • 3 — Slab Z positioning: Default 1 (Centered in c, equal vacuum on bottom and top), or 2 to place the lowest atom at a specified \(Z\) coordinate (e.g., 2.0 Å).
  • 4 — Maximum interface area cap (Ų, default 0 = unlimited): Optional extra area cap in addition to the atom-count limit.
  • 5 — Reload Part B from another crystal file: Replace Part B without leaving Option 33.

4.3 Candidate Table & Interactive Browser Commands

Pressing 0 displays the deduplicated candidate list immediately:

Sample Candidate Table (MoS2 / WSe2, Average Strain Mode)
Found 1092 unique match(es) (4 Pareto-optimal * shown first, then lowest strain):
 Idx Atoms (   A+   B)  Mul(A,B)   Area  a(A)  b(A)  gamma  Twist   RMS%   Max%
   1*    6 (   3+   3) (  1,  1)    9.0  3.22  3.22 120.00   0.00  1.864  1.899
   2*   75 (  39+  36) ( 13, 12)  112.1 11.38 11.38 120.00  16.10  0.137  0.138
   3*   75 (  39+  36) ( 13, 12)  112.1 11.38 11.38 120.00 -16.10  0.137  0.138
   4*  156 (  81+  75) ( 27, 25)  233.2 16.41 16.41 120.00  30.00  0.060  0.060
   5   150 (  78+  72) ( 26, 24)  224.2 11.38 19.71  90.00  16.10  0.137  0.138

Column Definitions

Column Physical Meaning
Idx (and *) Candidate index. A trailing star * marks a Pareto-optimal trade-off (see Figure 1-5). Always inspect starred entries first!
Atoms (A+B) Total atoms in the constructed heterostructure, plus individual counts for Part A (bottom) and Part B (top).
Mul(A,B) In-plane supercell area multipliers $N_A =
Area Interfacial cross-sectional area (Ų), directly usable when computing adhesion energy per unit area.
a(A), b(A), gamma Final common supercell in-plane edge lengths \(a', b'\) (Å) and interaxial angle \(\gamma'\) (degrees).
Twist Exact relative twist angle \(\theta\) of Part B vs. Part A (degrees, reduced modulo lattice symmetry).
RMS% Effective RMS Biot strain (%); under Mode 3, the combined root-mean-square of Part A and Part B RMS strains.
Max% Worst-case principal Biot strain (MaxEps) across either layer along any in-plane direction (%).

Interactive Browser Commands (No Re-Searching Needed!)

Input Action
1 – N Build the chosen candidate heterostructure, load it into Multiwfn memory, print a complete diagnostic summary, and return to the geometry operation menu.
-1 Return to the main settings menu to adjust strain tolerance, atom cap, angle filter, or FlipB and re-search.
-2 Switch sort / view mode: 1 Pareto-first then lowest strain (default); 2 all sorted by RMS strain; 3 all sorted by total atoms; 4 Pareto-optimal (*) entries only.
-3 Inspect full details of any candidate before building: individual Part A & Part B principal strains \((\varepsilon_1, \varepsilon_2)\) (showing tensile + vs. compressive -) and exact 2×2 matrices \(\mathbf{M}_A, \mathbf{M}_B\).
-4 On-the-fly stacking adjustment: change interlayer distance, vacuum thickness, fractional/Cartesian lateral shift, or Rot180 immediately without re-running the lattice search!
-5 Expand the display to list all candidates when more than 30 matches exist.

4.4 Post-Build Diagnostics & Export Workflow

After selecting a candidate, Multiwfn prints a verification report. Focus on four key items:

  1. Contiguous Atom Index Ranges: e.g., Part A (bottom): atoms 1 - 12; Part B (top): atoms 13 - 28.
  2. Component-Wise Principal Strains: Clearly shows whether each component is unstrained, stretched (+), or compressed (-).
  3. Shortest Nearest-Neighbor & A–B Interfacial Distances: e.g., Min nearest-neighbor distance: 1.4400 A (Min A-B interfacial distance: 3.0239 A). If the shortest distance is normal (no < 0.7 Å overlap warning) and the minimum A–B interfacial distance equals or slightly exceeds the target interlayer distance, the geometry is completely healthy.
  4. 3D Preview & Export: Back in the geometry operation menu, press 0 to visually inspect the 3D heterostructure; press -4 / -1 / -2 to export .cif / .xyz / .pdb (or go to main menu 100 → 2 to export CP2K .inp, VASP POSCAR, or Quantum ESPRESSO input). To try a different candidate, press -9 to restore your original structure and re-enter Option 33.