Skip to content

stb-passivate

Surface Passivator · menu code 4.9 · guide: 4.9 Surface Passivator

usage: stb-passivate [-h] -f FILENAME [--passivant PASSIVANT] [--cutoff CUTOFF]
                     [--bond-length BOND_LENGTH] [-sp SYMPREC] [--ml-relax]
                     [--ml-relax-cell] [--model {small,medium,large}]
                     [--custom-model PATH] [--custom-model-card JSON]
                     [--device {cpu,cuda}] [--view] [-o OUTPUT] [-v] [--no-intro]

Caps dangling bonds on a cut surface with a passivating atom.
Detects undercoordinated atoms (e.g. from stb-slab) via local coordination
geometry and places a passivant (default H) along each missing-bond
direction. Only single-missing-bond sites are auto-passivated -- sites
missing 2+ bonds are geometrically underdetermined from local coordination
alone and are reported instead of guessed.

options:
  -h, --help            show this help message and exit
  -f FILENAME, --file FILENAME
                        Path to the input structure file (.fdf), typically a cut slab.
  --passivant PASSIVANT
                        Element to cap dangling bonds with (default: H).
  --cutoff CUTOFF       Neighbor-search radius in Angstrom, used to determine each atom's coordination number. Default: auto-detected as 1.25x the shortest pairwise distance in the structure.
  --bond-length BOND_LENGTH
                        Passivant bond length in Angstrom. Default: auto, per surface-species/passivant pair, as the sum of their pymatgen atomic radii (an approximation -- e.g. Si+H = 1.35 Ang vs. the experimental Si-H ~1.48 Ang).
  -sp SYMPREC, --symprec SYMPREC
                        Symmetry tolerance in Angstroms for the before/after symmetry analysis (default: 0.01).
  --ml-relax            Pre-relax the passivated structure 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 cell -- any vacuum-padded axis 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).
  --view                Open an interactive 3D view (via ASE) comparing the input structure and the passivated structure (page through frames in ase-gui) after writing the output file. Needs a display. Off by default.
  -o OUTPUT, --output OUTPUT
                        Output .fdf file name (default: passivated.fdf).
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction

Usage examples:
  stb-passivate -f slab.fdf
  stb-passivate -f slab.fdf --passivant F --bond-length 1.4 -o slab_F.fdf
  stb-passivate -f slab.fdf --ml-relax --view