Skip to content

stb-supercell

Supercell Builder · menu code 4.2 · guide: 4.2 Supercell Builder

usage: stb-supercell [-h] -f FILENAME -d DIM [DIM ...] [-o OUTPUT] [-sp SYMPREC]
                     [--ml-relax] [--ml-relax-cell] [--model {small,medium,large}]
                     [--custom-model PATH] [--custom-model-card JSON]
                     [--device {cpu,cuda}] [--view] [-v] [--no-intro]

Builds a supercell from a SIESTA FDF structure file.
Give -d 3 numbers for a diagonal supercell, or 9 for a full row-major matrix.

options:
  -h, --help            show this help message and exit
  -f FILENAME, --file FILENAME
                        Path to the input structure file (.fdf).
  -d DIM [DIM ...], --dim DIM [DIM ...]
                        Supercell dimensions: 3 numbers for a diagonal supercell (e.g. 2 2 2),
                        or 9 numbers for a full row-major 3x3 matrix (e.g. 2 0 0 0 2 0 0 0 1).
  -o OUTPUT, --output OUTPUT
                        Output .fdf file name (default: supercell.fdf).
  -sp SYMPREC, --symprec SYMPREC
                        Symmetry tolerance in Angstroms for the before/after symmetry analysis (default: 0.01).
  --ml-relax            Pre-relax the built supercell 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 final supercell (page through frames in ase-gui) after writing the output file. Needs a display. Off by default.
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction

Usage examples:
  stb-supercell -f structure.fdf -d 2 2 2
  stb-supercell -f structure.fdf -d 2 0 0 0 2 0 0 0 1 -o big_cell.fdf
  stb-supercell -f structure.fdf -d 2 2 2 --ml-relax --view