Skip to content

stb-wfdensity

Wavefunction Density · menu code 2.12 · guide: 2.12 Wavefunction Density

usage: stb-wfdensity [-h] [--label LABEL] [--wfsx WFSX]
                     [--geometry-file GEOMETRY_FILE]
                     [--k-index K_INDEX | --k-point KX KY KZ] [--spin {0,1}] --band
                     BAND [--fermi FERMI] [--bands-file BANDS_FILE]
                     [--fermi-file FERMI_FILE] [--gap-tol GAP_TOL]
                     [--spacing SPACING | --shape NX NY NZ] [--axis {0,1,2}]
                     [--profile] [-p POS] [-o OUTPUT_DIR] [--save-gnuplot] [--view]
                     [-v] [--no-intro]

Real-space |psi|^2 of one chosen (k, band) eigenstate from a SIESTA .WFSX file -> Gaussian .cube.

options:
  -h, --help            show this help message and exit
  --label LABEL         SIESTA output label. Auto-detects <label>.WFSX, falling back to <label>.selected.WFSX (written by WriteWaveFunctions T + %block WaveFuncKPoints) then <label>.bands.WFSX, with a note -- and, unless --geometry-file overrides it, <label>.fdf (with its .ion/.ion.xml files alongside it -- NOT <label>.XV/.HSX, neither of which carries real orbital shapes). Mutually exclusive with --wfsx (not --geometry-file -- see its own help: the real fdf is very often NOT named <label>.fdf).
  --wfsx WFSX           Explicit path to the .WFSX file (alternative to --label).
  --geometry-file GEOMETRY_FILE
                        Explicit .fdf geometry path (must have the basis's .ion/.ion.xml files alongside it). Required if --wfsx is used instead of --label; optional (and common) together WITH --label too, since the real fdf is often not literally named <label>.fdf (e.g. SystemLabel 'siesta' with the actual input file called calc.fdf) -- --label still auto-detects the .WFSX in that case, only the geometry source changes.
  --k-index K_INDEX     0-based index into the .WFSX's own k-point order (default: 0 if neither --k-index nor --k-point is given).
  --k-point KX KY KZ    Match by k-point vector instead of index (same units as the .WFSX's own k, matched via sisl's read_eigenstate).
  --spin {0,1}          Spin channel (default: 0; must be 0 for a non-polarized calculation).
  --band BAND           Which band at the chosen k: an integer N (1-based), or 'vbm'/'cbm' (requires --fermi, --bands-file, --fermi-file, or an auto-detected .out log -- see below).
  --fermi FERMI         Fermi energy (eV) for --band vbm/cbm. Highest-priority source if given.
  --bands-file BANDS_FILE
                        Companion .bands file to read the Fermi energy from, for --band vbm/cbm. No correspondence guard against --wfsx like stb-fatbands has.
  --fermi-file FERMI_FILE
                        Explicit SIESTA .out log to read the Fermi energy from, for --band vbm/cbm -- an alternative to --bands-file for a run with no saved .bands file. Not assumed to be named after --label (see below).
  --gap-tol GAP_TOL     Energy tolerance in eV for VBM/CBM classification (default: 0.01). Same meaning as stb-bands/stb-fatbands.
  --spacing SPACING     Grid spacing in Angstrom (default: 0.3). Mutually exclusive with --shape.
  --shape NX NY NZ      Explicit grid shape (voxel counts), alternative to --spacing.
  --axis {0,1,2}        Axis for the optional --save-gnuplot slice/profile (default: 2).
  --profile             Write a planar-averaged 1D profile instead of a 2D slice, for the optional --save-gnuplot output.
  -p POS, --pos POS     Position (Angstrom) along --axis of the 2D slice (ignored in --profile mode). Default: auto-detected at the plane where the planar-averaged |psi|^2 is largest -- NOT the geometric center of the cell, which can land in empty vacuum for a structure whose atoms aren't centered along --axis (verified live: a real structure with atoms clustered near the cell boundary and vacuum in the middle had its default slice land on a point with ~1000x less density than the real peak, right at the atoms).
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Directory to write the .cube (and, with --save-gnuplot, the slice/profile data) into (the report and its references file go to the current folder) (default: current directory). Created if it doesn't exist.
  --save-gnuplot        Also write a 2D-slice or (with --profile) 1D-profile .dat + .gplot pair of the |psi|^2 density. Off by default -- this tool used to write the .dat file (but never a .gplot script) unconditionally, opted out of via the old --cube-only flag (now removed).
  --view                Show an interactive matplotlib preview (2D slice or 1D profile, matching --profile) before finishing. Off by default -- this tool previously had no matplotlib option at all.
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction

Example usage:
  stb-wfdensity --label siesta --k-index 0 --band 1
  stb-wfdensity --label siesta --band vbm --fermi -4.2
  stb-wfdensity --label siesta --band cbm --save-gnuplot --view