Skip to content

stb-elasticInputs

Stage 1 - Prep of the 5.2 Elastic Constants workflow · menu code 5.2.1

usage: stb-elasticInputs [-h] -s STRUCTURE -c CALC [-p PSEUDO_DIR]
                         [--method {stress,energy}] [--dirs DIRS [DIRS ...]]
                         [--symmetry-method {basic,full}]
                         [--ions {relaxed,clamped,both}] [--relax-steps RELAX_STEPS]
                         [--fmax FMAX] [--max MAX] [--steps STEPS] [-o OUTPUT_DIR]
                         [--vacuum-gap VACUUM_GAP] [--symprec SYMPREC]
                         [--angle-tolerance ANGLE_TOLERANCE] [-v] [--no-intro]

Stage 1 of 2: applies one or more canonical Voigt strains to a SIESTA structure and writes one ready-to-run folder (structure + calc.fdf + config_extra.fdf + pseudopotentials) per scanned strain value. The cell is fixed at each imposed strain; the atoms relax inside it by default (relaxed-ion constants, --ions). Doesn't run SIESTA -- run each folder yourself, then use stb-elasticAnalysis.

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', prepended at the very top (see [4] of the report for why) -- this fixes the cell and sets what the atoms do (--ions), regardless of what MD settings this template itself contains.
  -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.
  --method {stress,energy}
                        Physical quantity the generated strains are meant to feed (default: stress). 'stress': single-component canonical Voigt strains, for stb-elasticAnalysis's stress-strain fit (--method stress there too). 'energy': a point-group-selected set of pure AND combined (two Voigt components at once, e.g. 'xx+yy') strain patterns for an energy-strain (parabolic) fit -- combined patterns are physically required for off-diagonal constants there, since a pure single-component strain's energy curvature only ever determines its own diagonal constant. Always auto-selects (--dirs must be left at its 'all' default); needs more DFT calculations than --method stress for the same crystal system, since each pattern only yields one number (a curvature) instead of a full stress column.
  --dirs DIRS [DIRS ...]
                        List of directions to generate.
                        Options: [xx, yy, zz, xy, xz, yz, bi, hydro, all].
                        Example: --dirs xx yy xy
                        'all' auto-reduces to 1 representative direction per symmetry-
                        equivalent group (e.g. just 2 of the 6 for a cubic material) --
                        stb-elasticAnalysis reconstructs the rest by symmetry. Pass every
                        direction explicitly (not 'all') to run all 6 anyway, e.g. to get
                        stb-elasticAnalysis's diagnostic comparison across truly independent
                        DFT calculations instead.
  --symmetry-method {basic,full}
                        How 'all' picks which directions to actually run (default: basic). 'basic': only reduces when a single point-group operation maps one canonical direction exactly onto another (e.g. cubic); misses reductions like hexagonal's C11=C22, which come from the full elastic tensor's symmetry, not a pairwise direction match. 'full': picks the minimal set of directions that fully determines the point group's independent elastic constants (greedy rank selection) -- catches hexagonal/trigonal reductions too. Must match the --symmetry-method passed to stb-elasticAnalysis later.
  --ions {relaxed,clamped,both}
                        What the atoms do at each strained cell (default: relaxed).
                        'relaxed': the atoms relax inside the fixed strained cell (CG) --
                        relaxed-ion constants, the ones an experiment measures and the
                        ones stb-mlelastic reports. 'clamped': a single point, atoms at
                        the positions the strain alone gives them (what 2.0.0 always
                        wrote) -- cheaper, and exact when symmetry leaves no force on
                        the atoms (fcc/bcc metals, rock salt; NOT diamond, zincblende,
                        graphene, hBN, wurtzite, perovskites under shear). 'both': the
                        two series in <output-dir>/relaxed and <output-dir>/clamped;
                        stb-elasticAnalysis on each then tabulates the contribution of
                        the internal relaxation.
  --relax-steps RELAX_STEPS
                        --ions relaxed/both: maximum number of CG steps, MD.Steps (default: 200).
  --fmax FMAX           --ions relaxed/both: force tolerance of the relaxation in eV/Ang, MD.MaxForceTol (default: 0.01). The stress converges only to first order in the residual force, so keep it tight.
  --max MAX             Max strain % (default: 2.0)
  --steps STEPS         Steps per direction (default: 4)
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Top-level directory (default: elastic_runs). Run folders go into its own '<output-dir>/<direction>/strain_<direction>_<val>/' subfolder, same convention as stb-strain's own --output-dir -- so stb-elasticAnalysis can just 'cd <output-dir>' and find everything (including reference_structure.fdf) with no extra flags.
  --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-strain. Requested directions touching a vacuum-padded axis are skipped with a warning instead of generated.
  --symprec SYMPREC     Symmetry-detection tolerance (default: 0.01, pymatgen's own default), used for the symmetry-based direction reduction and the informational note about triclinic/monoclinic structures. 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-elasticInputs -s structure.fdf -c calc.fdf -p dojo --dirs all
  stb-elasticInputs -s structure.fdf -c calc.fdf --dirs xx yy xy --max 1.5 --steps 6
  stb-elasticInputs -s structure.fdf -c calc.fdf -p dojo --ions both      # relaxed/ and clamped/
  stb-elasticInputs -s structure.fdf -c calc.fdf -p dojo --ions clamped   # single points, as 2.0.0