stb-strain¶
Stage 1 - Prep of the 5.1 Stress-Strain workflow · menu code 5.1.1
usage: stb-strain [-h] -s STRUCTURE -c CALC --relax-mode
{cell-fixed,stress-constrained} [-p PSEUDO_DIR] --stdir STDIR
[--stmin STMIN] [--stmax STMAX] [--step STEP] [-o OUTPUT_DIR]
[--vacuum-gap VACUUM_GAP] [--symprec SYMPREC]
[--angle-tolerance ANGLE_TOLERANCE] [-v] [--no-intro]
Stage 1 of 2: applies strain in Cartesian coordinates to a SIESTA structure and writes one ready-to-run folder (structure + calc.fdf + config_extra.fdf + pseudopotentials) per scanned strain value. Type (uniaxial/biaxial) is inferred from direction; --relax-mode selects how the cell is allowed to respond (see its own help). Doesn't run SIESTA -- run each folder yourself, then use stb-strainAnalysis.
options:
-h, --help show this help message and exit
-s STRUCTURE, --structure STRUCTURE
Input structure.fdf -- lattice + atomic coordinates. Only this file's %block LatticeVectors is rewritten per strain step; everything else is preserved verbatim. Atomic coordinates MUST be fractional (checked in [1] of the report -- Cartesian positions would not scale with the strained cell).
-c CALC, --calc CALC calc.fdf template -- SCF/basis/MD settings, normally %including the structure file above by name. Copied into every generated folder with one line added: '%include config_extra.fdf' (the Geometry.Constraints block --relax-mode builds, see [4] of the report) -- no other directive in this file is modified.
--relax-mode {cell-fixed,stress-constrained}
How the cell responds to the imposed strain, via a %block Geometry.Constraints written to config_extra.fdf: 'cell-fixed' fixes all 6 Voigt stress components (cell stays exactly at the imposed strain; atomic positions still relax, via whatever MD.TypeOfRun/MD.Steps is already in --calc). 'stress-constrained' fixes only the imposed strain direction's own component(s) (plus anything touching a vacuum axis); every other periodic direction relaxes freely to zero stress. Either way, MD.VariableCell must be enabled in your own --calc for Geometry.Constraints to have any effect -- checked (not forced) in [4] of the report.
-p PSEUDO_DIR, --pseudo-dir PSEUDO_DIR
Pseudopotentials source (optional): a bundled bank (dojo[-sr|-fr|-sr3plus][-pbe|-pbesol|-pw][-standard|-stringent], virtual_vault) or a folder path. If given, the required pseudopotential for every species in the structure is copied into every generated folder, so it's immediately ready for SIESTA.
--stdir STDIR Direction of strain: x, y, z for uniaxial; xy, xz, yz, etc. for biaxial.
--stmin STMIN Minimum strain percentage (default: 0). Can be negative for compression.
--stmax STMAX Maximum strain percentage (default: 25).
--step STEP Strain step percentage (default: 1).
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
Top-level directory (default: strain_runs). The run folders go into its own '<output-dir>/<direction>/strain_<direction>_<val>/' subfolder -- so 2 different --stdir runs into the same --output-dir never mix their folders, and stb-strainAnalysis can point --dir at one direction's subfolder alone, or at <output-dir> itself with --compare to analyze every direction found under it.
--vacuum-gap VACUUM_GAP
Vacuum gap threshold in Ang used to detect which lattice axes are periodic vs. vacuum-padded (default: 10.0), same convention as stb-kgrid/stb-kpath. Straining a vacuum-padded axis is physically meaningless and is refused.
--symprec SYMPREC Symmetry-detection tolerance (default: 0.01, pymatgen's own default), used only for the informational note about symmetry-equivalent directions (uniaxial only) -- never blocks the run. Loosen further (e.g. 0.02-0.05) for a structure relaxed with a looser force tolerance -- a tighter value than the relaxation's own residual numerical noise can misdetect the true space group.
--angle-tolerance ANGLE_TOLERANCE
Symmetry angle tolerance in degrees (default: 5.0, pymatgen's own default), same use as --symprec.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Example usage:
stb-strain -s structure.fdf -c calc.fdf -p dojo --relax-mode cell-fixed --stdir x --stmin -2 --stmax 2 --step 1
stb-strain -s structure.fdf -c calc.fdf --relax-mode stress-constrained --stdir xy --stmax 5