stb-dos¶
PDOS XML Parser · menu code 2.2 · guide: 2.2 PDOS XML Parser
usage: stb-dos [-h] [--label LABEL]
[--type {total,atom,species} [{total,atom,species} ...]]
[--shift SHIFT] [--estimate-from-dos]
[--dos-threshold-frac DOS_THRESHOLD_FRAC] [--projection {l,ml,none}]
[-o OUTPUT_DIR] [--save-gnuplot] [--view] [-v] [--no-intro]
[filename]
Parse a PDOS.xml file and generate Gnuplot-ready .dat files.
positional arguments:
filename The input .PDOS.xml file to process. Give this before --type (see epilog). Optional if --label is given (resolves to '<label>.PDOS.xml').
options:
-h, --help show this help message and exit
--label LABEL SIESTA label. Shorthand for filename='<label>.PDOS.xml' if filename isn't given directly, and (with --shift vbm/cbm) used to locate a companion '<label>.bands'/'<label>.EIG' next to it. One of filename or --label is required. If filename is given explicitly without --label, the label is still derived automatically from its own name for --shift vbm/cbm.
--type {total,atom,species} [{total,atom,species} ...]
Type(s) of DOS to output.
total: Sum of all atoms.
atom: One file for each atom.
species: One file for each chemical species (e.g., C, N, B).
You can select multiple, e.g., --type total species (default: all three)
--shift SHIFT Energy shift to apply.
'fermi': Automatically shift by the Fermi energy (default).
'vbm'/'cbm': Shift by the Valence Band Maximum / Conduction Band
Minimum, computed from a companion '<label>.bands' (preferred) or
'<label>.EIG' file -- see --label. Falls back to an approximate
estimate from the DOS itself only with --estimate-from-dos.
'0.0': Use an absolute energy scale (no shift).
'-1.23': Apply a manual shift of -1.23 eV.
--estimate-from-dos With --shift vbm/cbm: if no companion '<label>.bands'/'<label>.EIG' is found, fall back to an approximate VBM/CBM estimated directly from the DOS itself (blurred by its own energy broadening -- less precise than a real .bands/.EIG). Off by default: without it, a missing .bands/.EIG is a clear error, not a silent approximation.
--dos-threshold-frac DOS_THRESHOLD_FRAC
Only used by --shift vbm/cbm's --estimate-from-dos fallback: fraction of the peak total DOS above which the curve is considered 'occupied'/'empty' again past the gap region (default: 0.01).
--projection {l,ml,none}
Orbital projection detail level.
l: Aggregate by angular momentum (s, p, d, f). (default)
ml: Project by magnetic quantum number (s, px, py, pz, dxy, etc.).
none: No orbital breakdown -- every orbital (including l>3, e.g. g) collapses into a single 'total' column per atom/species/grand-total.
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
Directory to write dos_total.dat, dos_per_atom/, and dos_per_species/ into (default: current directory). Created if it doesn't exist.
--save-gnuplot Also write a .gplot gnuplot script next to every .dat file this run generates (dos_total.dat, each dos_per_atom/*.dat, each dos_per_species/*.dat). Off by default.
--view Show an interactive matplotlib preview of the total DOS before exiting. Off by default.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Example usage:
stb-dos siesta.PDOS.xml --type total species --projection ml
Put the filename first: --type takes one or more values, so anything
written after it (including the filename) is consumed as another type.