stb-2Dstacking¶
2D Monolayer Stacker · menu code 4.1 · guide: 4.1 2D Monolayer Stacker
usage: stb-2Dstacking [-h] -l1 LAYER1 -l2 LAYER2 [-a MAX_AREA] [-s MAX_STRAIN]
[-i | -id MATCH_ID] [--batch_sym]
[-g GAP | --gap_range START END STEPS] [--vacuum VACUUM]
[-t TWIST] [-tx SHIFT_X] [-ty SHIFT_Y] [-sm {top,bottom,sym}]
[-o OUTPUT] [-sp SYMPREC] [--view] [--ml-relax]
[--ml-relax-cell] [--model {small,medium,large}]
[--custom-model PATH] [--custom-model-card JSON]
[--device {cpu,cuda}] [-v] [--no-intro]
STB Monolayer Stacking Tool with Geometric Control & Symmetry Analysis.
options:
-h, --help show this help message and exit
-l1 LAYER1, --layer1 LAYER1
Path to the bottom monolayer .fdf file
-l2 LAYER2, --layer2 LAYER2
Path to the top monolayer .fdf file
-a MAX_AREA, --max_area MAX_AREA
Maximum supercell area (default: 150.0)
-s MAX_STRAIN, --max_strain MAX_STRAIN
Maximum allowed strain fraction (default: 0.05)
-i, --interactive Interactive mode: shows table to select match ID
-id MATCH_ID, --match_id MATCH_ID
Directly select a specific match ID (default: 0)
--batch_sym Generate all high-symmetry stackings automatically
-g GAP, --gap GAP Van der Waals gap in Angstroms (default: 3.2)
--gap_range START END STEPS
Range for energy curve. Ex: 2.5 4.5 11
--vacuum VACUUM Target vacuum space in Angstroms. Inherits L1 by default.
-t TWIST, --twist TWIST
Twist angle of layer 2 in degrees (default: 0.0)
-tx SHIFT_X, --shift_x SHIFT_X
Fractional shift of layer 2 in X (default: 0.0)
-ty SHIFT_Y, --shift_y SHIFT_Y
Fractional shift of layer 2 in Y (default: 0.0)
-sm {top,bottom,sym}, --strain_mode {top,bottom,sym}
Strain distribution mode (default: top)
-o OUTPUT, --output OUTPUT
Output .fdf base file name
-sp SYMPREC, --symprec SYMPREC
Symmetry tolerance in Angstroms (default: 0.01)
--view Open an interactive 3D view of the final heterostructure(s) (via ASE) after writing the output file(s). Needs a display. Off by default.
--ml-relax Pre-relax each generated heterostructure with a MACE potential (needs the optional 'ml' extra: pip install stb_suite[ml]) before writing it out -- positions only by default. Off by default.
--ml-relax-cell With --ml-relax, also relax the in-plane cell -- the vacuum axis (c) always stays exactly fixed. Only valid together with --ml-relax.
--model {small,medium,large}
MACE-MP-0 foundation model size for --ml-relax (default: medium).
--custom-model PATH Path to a custom fine-tuned .model file for --ml-relax, instead of a MACE-MP-0 foundation size.
--custom-model-card JSON
Model card of the --custom-model file: the mlff_model_card.json that stb-mlffAnalysis wrote next to it (training data, level of theory, accuracy, energy scale). Required with --custom-model -- the card is checked against the model file and used to warn when a structure is outside what the model was trained on.
--device {cpu,cuda} Device to run the MACE model on (default: cpu).
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Example usage:
stb_stacking -l1 bottom.fdf -l2 top.fdf -i
stb_stacking -l1 bottom.fdf -l2 top.fdf --batch_sym -g 3.2