Skip to content

stb-elasticAnalysis

Stage 2 - Analysis of the 5.2 Elastic Constants workflow · menu code 5.2.2

usage: stb-elasticAnalysis [-h] [-f FILE] [-d DIR] [--method {stress,energy}]
                           [--dimensionality {auto,3d,2d,1d}]
                           [--vacuum-gap VACUUM_GAP] [--symmetry-method {basic,full}]
                           [--reference-structure REFERENCE_STRUCTURE]
                           [--compare-with DIR] [--symprec SYMPREC]
                           [--angle-tolerance ANGLE_TOLERANCE]
                           [--eggbox-tolerance EGGBOX_TOLERANCE]
                           [--fit-quality-tolerance FIT_QUALITY_TOLERANCE]
                           [--plot-dir PLOT_DIR] [--save-gnuplot] [--view] [-v]
                           [--no-intro]

Siesta Elastic Properties Analyzer (STB Suite)

options:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  Siesta log/output filename inside strain folders (default:
                        calc.out)
  -d DIR, --dir DIR     Directory to scan for 'strain_*' run folders and the
                        undeformed reference_structure.fdf (default: elastic_runs,
                        matching stb-elasticInputs' own --output-dir default). Accepts
                        either stb-elasticInputs' own nested output layout -- point
                        this at a single direction's own subfolder (e.g.
                        elastic_runs/xx) for that direction alone, or at the top-level
                        output directory itself to automatically use every direction
                        found under it -- or a flat directory of 'strain_*' folders.
  --method {stress,energy}
                        Which physical quantity to fit (default: stress). 'stress':
                        the existing stress-strain linear fit (sigma = C . epsilon),
                        see --symmetry-method. 'energy': an energy-strain (parabolic)
                        fit (E = E0 + (V0/2) gamma^T C gamma) over the pure+combined
                        patterns written by stb-elasticInputs --method energy -- a
                        physically independent cross-check (total energy vs. the
                        stress tensor), since a code's total energy and stress can
                        have different sources of numerical error. Always uses the
                        general symmetry-allowed-subspace fit (--symmetry-method
                        doesn't apply); requires --reference-structure.
  --dimensionality {auto,3d,2d,1d}
                        Physical dimensionality of the material, controlling report
                        units and which constants are shown (default: auto). 'auto':
                        detected from --reference-structure using the same vacuum-gap
                        convention as stb-elasticInputs/stb-kgrid/stb-strain (see
                        --vacuum-gap) -- 0 vacuum-padded axes -> 3d (GPa), 1 -> 2d
                        (N/m), 2 -> 1d (nN); falls back to 3d with a warning if
                        --reference-structure isn't readable, or if the vacuum sits on
                        an axis other than this workflow's assumed convention (in-
                        plane xy for 2D, wire-along-c for 1D). '3d'/'2d'/'1d': force
                        the mode manually and skip detection entirely.
  --vacuum-gap VACUUM_GAP
                        Vacuum gap threshold in Ang (default: 10.0) used only by
                        --dimensionality auto, same convention as stb-
                        elasticInputs/stb-kgrid/stb-strain.
  --symmetry-method {basic,full}
                        How to use detected symmetry (default: the method the folders
                        were prepared with, read from elastic_scan.json or
                        elastic_stage1.txt; 'basic' when neither says). 'basic': exact
                        reconstruction/pooling only when a single point-group
                        operation maps one canonical strain direction exactly onto
                        another (misses reductions like hexagonal's C11=C22, which
                        come from the FULL elastic tensor's invariance, not a pairwise
                        direction match). 'full': fits the whole stiffness matrix at
                        once, constrained a priori to the point group's symmetry-
                        allowed subspace -- catches every crystal system's correct
                        independent-constant count uniformly (cubic, hexagonal,
                        trigonal, ...), at the cost of being a global least-squares
                        fit rather than an exact per-column one. Requires --reference-
                        structure to be available.
  --reference-structure REFERENCE_STRUCTURE
                        UNDEFORMED structure file (default: reference_structure.fdf
                        inside --dir, written automatically by stb-elasticInputs next
                        to the strain_*/ folders), used only to detect symmetry for
                        the diagnostic/pooling/reconstruction across equivalent
                        directions. Must be the undeformed structure, not one from
                        inside a strain folder -- a single-axis strain genuinely
                        lowers the symmetry (e.g. cubic strained along x alone is
                        exactly tetragonal, not 'cubic with noise'), so reading
                        symmetry from a strained structure would silently misdetect
                        it. Never required -- falls back to independent per-direction
                        fitting if unavailable.
  --compare-with DIR    Another analysed run directory of the SAME material with the
                        other treatment of the ions (clamped vs relaxed): tabulates
                        relaxed minus clamped, the internal-relaxation contribution.
                        Found automatically for the relaxed/ and clamped/ folders of
                        'stb-elasticInputs --ions both' (run this analysis on each).
  --symprec SYMPREC     Symmetry-detection tolerance (default: 0.01, pymatgen's own
                        default). 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.
  --eggbox-tolerance EGGBOX_TOLERANCE
                        Relative difference (%, default: 5.0) above which the
                        mandatory eggbox cross-check (--method stress only, see
                        section [3] of the report) flags a direction. Every diagonal
                        constant actually run is computed two independent ways from
                        the SAME calc.out files -- a stress-linear fit and an energy-
                        parabolic fit -- with no new DFT calculations; a disagreement
                        beyond this tolerance is a hint of eggbox (or other numerical)
                        contamination in the stress data. Needs --reference-structure;
                        skipped with a warning (not an error) if it isn't available.
  --fit-quality-tolerance FIT_QUALITY_TOLERANCE
                        R^2 (default: 0.995) below which the mandatory per-direction
                        stress-vs-strain fit-quality check (--method stress only,
                        section [3] of the report) flags a direction -- a clean linear
                        elastic fit should sit well above this. Also flags a non-
                        negligible residual stress at zero strain (same relative-
                        contribution criterion as the energy method's linear-term
                        check). No new DFT calculations: reuses the same stress-strain
                        fit each direction's column already needed.
  --plot-dir PLOT_DIR   Directory (default: elastic_plots, created only if --save-
                        gnuplot is given) to write the raw fitting data + gnuplot
                        scripts into -- one .dat/.gplot pair per direction (--method
                        stress) or pattern (--method energy), plus a combined
                        overview.
  --save-gnuplot        Also write the raw fitting data + gnuplot scripts into --plot-
                        dir (same data+.gplot convention as the rest of the suite,
                        e.g. stb-strainAnalysis). Off by default -- no new DFT
                        calculations either way, reuses the data/fit already computed
                        for the report.
  --view                Show an interactive matplotlib preview (every measured
                        direction/pattern overlaid with its own fit) before finishing.
                        Never saved to disk -- pass --save-gnuplot for that. Off by
                        default.
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction