stb-irModes¶
Stage 2 - Modes & Dipole/Born-Charge Displacements of the 5.12 IR Spectrum workflow · menu code 5.12.2
usage: stb-irModes [-h] [-dir DIRECTORY] [-l LABEL] [-p DIR] -c CALC
[--modes N [N ...]] [--freq-min FREQ_MIN] [--freq-max FREQ_MAX]
[--vacuum-gap VACUUM_GAP] [--symprec SYMPREC]
[--rotational-mode-tol ROTATIONAL_MODE_TOL]
[--displacement DISPLACEMENT] [--use-symmetry] [--skip-degenerate]
[--export-animations] [--animation-frames ANIMATION_FRAMES]
[--fc-displ BOHR] [--polarization-grid N N N N N N N N N] [-v]
[--no-intro]
Stage 2 of 3: builds FORCE_SETS from Stage 1's phonon displacements, identifies the Gamma-point vibrational modes, and generates whichever follow-up SIESTA folder(s) the IR dipole-derivative calculation needs.
The path is AUTO-SELECTED by structure dimensionality (core.kspace.detect_vacuum_axes on the
primitive cell), no flag needed:
- Non-bulk (0D molecule, or 1D wire -- zero or two vacuum-padded axes): SIESTA prints the
total dipole moment automatically for a non-periodic direction, no special fdf block
needed. Writes exactly 2 folders per selected mode (dipole_disp/mode_XX_plus/,
mode_XX_minus/) -- a simple single-point SCF, no per-axis probing (unlike
stb-ramanModes' Optical.Vector sweep): the dipole derivative dmu/dQ already comes out as
a full 3-vector from one +/-delta pair. NOTE: for a 1D wire this is only valid along the
two genuinely non-periodic transverse directions -- the along-axis component is subject
to the same periodic-direction caveat the HYBRID path below exists to fix for 2D; 1D isn't
covered by that fix yet.
- Bulk (3D periodic, zero vacuum axes): a naive dipole moment is gauge-ambiguous for a fully
periodic system. Writes exactly ONE equilibrium folder (born_charge_disp/equilibrium/,
the undisplaced structure) using SIESTA's own native Born-effective-charge automation
(MD.TypeOfRun FC + BornCharge T + %block PolarizationGrids) -- independent of how many
modes are selected. Also writes a small eigendisplacement JSON sidecar per selected mode
(born_charge_disp/mode_XX_eigendisplacement.json) so stb-irAnalysis can combine it with the
Born-charge tensors without reloading Phonopy itself.
- Hybrid (2D slab, exactly one vacuum-padded axis): a naive dipole moment is only valid
along the slab's non-periodic (vacuum) axis -- the two in-plane axes are genuinely
periodic, same gauge-ambiguity problem the bulk path exists to solve. Writes BOTH the
bulk path's single shared born_charge_disp/equilibrium/ folder (PolarizationGrids built
vacuum-aware -- the vacuum axis's own row zeroed, so SIESTA skips its ill-defined
out-of-plane polarization component entirely) AND the non-bulk path's per-mode
dipole_disp/mode_XX_plus/mode_XX_minus/ folders. stb-irAnalysis takes the in-plane
dmu/dQ components from the Born-charge run and the vacuum-axis component from the
dipole-difference pair, combining them into one physically valid 3-vector per mode.
Doesn't run SIESTA itself -- run each folder's calculation yourself, then use stb-irAnalysis.
options:
-h, --help show this help message and exit
-dir DIRECTORY, --directory DIRECTORY
Root directory written by stb-ir (Stage 1) -- must contain 'phonon_disp/' (default: ir_study).
-l LABEL, --label LABEL
SystemLabel used in Stage 1's calc.fdf (default: auto-detected).
-p DIR, --pseudo-dir DIR
Pseudopotentials source: a bundled bank or a folder path. Default: reuse whatever Stage 1 already resolved and copied into its phonon_disp/disp-*/ folders (the normal, self-contained case -- no need to point at a source a second time). Only needed if that folder is missing pseudopotentials for some reason (e.g. hand-built phonon_disp/ instead of a real stb-ir run).
-c CALC, --calc CALC calc.fdf template for the follow-up SIESTA calculation(s) -- can be the same file used in Stage 1 or a different one, since these are now single-point evaluations on the small unit cell, not the phonon supercell.
--modes N [N ...] 1-based mode index/indices to process (in ascending-frequency order, acoustic modes already excluded -- see Stage 2's own [1] PHONON MODES table for the numbering). Default: every non-acoustic mode. On the bulk path this only controls which modes appear in the report/MODE_TABLE and get an eigendisplacement sidecar -- the single equilibrium folder is written regardless.
--freq-min FREQ_MIN Skip modes below this frequency (THz).
--freq-max FREQ_MAX Skip modes above this frequency (THz).
--vacuum-gap VACUUM_GAP
Minimum gap (Ang) along an axis to consider it vacuum-padded, same convention as stb-ir (default: 10.0). Used both for the 0D extra-trivial-mode detection AND to auto-select the bulk vs. non-bulk IR path.
--symprec SYMPREC Symmetry-detection tolerance (Ang) Phonopy uses internally when loading the force constants -- drives both the reported point group and, when --use-symmetry is on, the IR-active/inactive classification and degenerate-mode grouping (default: 0.01, pymatgen's own default -- matches the rest of the suite, and deliberately NOT Phonopy's own raw default of 1e-5, which is far too tight for a real DFT-relaxed structure and can misdetect the true point group: a mode that should be exactly degenerate can come out as two separate near-identical frequencies, and a symmetry-silent mode can be misclassified as IR-active). Loosen further (e.g. 0.02-0.05) for a structure relaxed with a looser force tolerance.
--rotational-mode-tol ROTATIONAL_MODE_TOL
0D (molecule) only: a mode within the first 3 bands after the translations is treated as free rotation (trivial, excluded) if |frequency| is below this (THz) (default: 2.0). Lower this if your molecule has genuine low-frequency skeletal/torsional vibrational modes you want to make sure aren't mistaken for rotation.
--displacement DISPLACEMENT
Finite-difference displacement (Ang) along each mode's eigendisplacement for the non-bulk dipole derivative, and the default amplitude for --export-animations (default: 0.02). Has no effect on the bulk path's folder (it's the equilibrium structure, never displaced).
--use-symmetry Skip modes that group theory guarantees are IR-INACTIVE (their irreducible representation at Gamma isn't contained in the vector (x,y,z) representation -- their dipole derivative is exactly zero, not just numerically small). Works for any of the 32 point groups. Only applies to the default mode selection (every non-acoustic mode) -- an explicit --modes list is never second-guessed. On the bulk path this only reduces what's listed/sidecar'd, never the folder count (always 1). Needs a PRIMITIVE cell (see stb-unitcell --mode primitive); falls back to running every mode, with a warning, if that's not available.
--skip-degenerate Non-bulk path only: for a degenerate group of modes (2 or more bands sharing one irrep), write dipole-displacement folders for only ONE representative band and skip the rest -- the IR intensity |dmu/dQ|^2 is a rotational invariant, identical for every degenerate partner regardless of phonopy's arbitrary eigenvector choice within the subspace. stb-irAnalysis reuses the representative's value automatically. No effect on the bulk path (already exactly 1 folder regardless of mode count -- nothing to save by skipping). Needs a PRIMITIVE cell, same as --use-symmetry.
--export-animations Write a looping animation of each selected mode's eigendisplacement (a smooth 0/+A/0/-A/0 sweep) as a mode_XX_animation.axsf file -- open in XCrySDen/VESTA to see which atoms move before interpreting the spectrum. Same amplitude as --displacement.
--animation-frames ANIMATION_FRAMES
Frames per mode animation, with --export-animations (default: 20).
--fc-displ BOHR Bulk path only: MD.FCDispl for SIESTA's own native Born-effective-charge finite-displacement automation, in Bohr (default: 0.02). Has no effect on the non-bulk path.
--polarization-grid N N N N N N N N N
Bulk path only: the 9 integers (row-major 3x3, one row per lattice vector) for SIESTA's %block PolarizationGrids -- diagonal entries are 1D line-integral k-point counts, off-diagonal entries are the 2D surface-integral mesh (default: 10 4 4 4 10 4 4 4 10). Manual, not auto-generated from a density heuristic -- consult the SIESTA manual for your structure. Has no effect on the non-bulk path.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Usage example:
stb-irModes --directory ir_study --calc calc.fdf
stb-irModes --directory ir_study --calc calc.fdf --modes 1 2 3