stb-ir¶
Stage 1 - Phonon Displacements of the 5.12 IR Spectrum workflow · menu code 5.12.1
usage: stb-ir [-h] [-s STRUCTURE] [-c CALC] [-p PSEUDO_DIR] [-dim DIM DIM DIM]
[-d DISTANCE] [--kgrid KGRID KGRID KGRID]
[--kgrid-density KGRID_DENSITY] [--symprec SYMPREC]
[--vacuum-gap VACUUM_GAP] [-O OUTPUT_DIR] [--no-perfect-supercell] [-v]
[--no-intro]
Stage 1 of 3: generates the phonon-displacement folders for an IR spectrum workflow.
Workflow: (1) this tool generates 'ir_study/phonon_disp/disp-*/' -- run
SIESTA in every folder yourself; (2) once they're done, run stb-irModes to
build FORCE_SETS from them, identify the Gamma-point vibrational modes, and
generate whichever follow-up SIESTA folder(s) the dipole-derivative
calculation needs (auto-selected by structure dimensionality -- +/-delta
dipole-moment displacements for a molecule/wire/slab, or a single
equilibrium Born-effective-charge run for a 3D bulk crystal); (3) run SIESTA
in those, then stb-irAnalysis to get the IR-active frequencies/intensities
and spectrum. This whole workflow computes its own phonons -- it does NOT
need item 4's stb-phononsCreate/stb-phononsPos run first, nor stb-raman's
own Stage 1 (though the underlying Phonopy machinery is shared, via
core/phonon_workflow.py -- each workflow keeps its own independent
phonon_disp/ tree).
options:
-h, --help show this help message and exit
-s STRUCTURE, --structure STRUCTURE
Input structure file containing the unit cell (default: structure.fdf)
-c CALC, --calc CALC Input calculation parameters file (default: calc.fdf)
-p PSEUDO_DIR, --pseudo-dir PSEUDO_DIR
Pseudopotentials source: a bundled bank (dojo[-sr|-fr|-sr3plus][-pbe|-pbesol|-pw][-standard|-stringent], virtual_vault) or a folder path (default: current directory).
-dim DIM DIM DIM Supercell dimensions for the phonon force-constant calculation (default: 2 2 2).
-d DISTANCE, --distance DISTANCE
Phonon displacement distance in Angstroms (default: 0.02).
--kgrid KGRID KGRID KGRID
Explicit Monkhorst-Pack grid for the supercell's forced single-point SCF (e.g. --kgrid 2 2 2). Overrides the automatic --kgrid-density suggestion. Written into config_extra.fdf (see [2]).
--kgrid-density KGRID_DENSITY
Target k-point density (1/Ang), used to auto-suggest the supercell k-grid when --kgrid isn't given (default: 0.2, same convention as stb-kgrid/stb-strain/stb-phononsCreate/stb-raman).
--symprec SYMPREC Symmetry-detection tolerance (Ang) Phonopy uses internally to reduce how many displacements are actually needed (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 -- see stb-irModes' own --symprec, which is what actually drives the IR-active/inactive classification. Loosen further (e.g. 0.02-0.05) for a structure relaxed with a looser force tolerance.
--vacuum-gap VACUUM_GAP
Minimum gap (Ang) along an axis to consider it vacuum-padded, for the supercell-dimension advisory and the Stage 2 dipole-path preview (default: 10.0)
-O OUTPUT_DIR, --output-dir OUTPUT_DIR
Root directory for the whole IR workflow (default: ir_study) -- phonon displacements are written under <output-dir>/phonon_disp/. Independent from stb-raman's raman_study/ -- each WORKFLOW_TOOLS entry is self-contained, even though the phonon step itself duplicates the same Phonopy work if you run both.
--no-perfect-supercell
Do not write perfect_supercell/ (the undisplaced supercell, one more SIESTA run). Written by default: the next stage subtracts its forces -- the reference's residual forces -- from every displacement's; left in, a small relaxation residual adds up over the supercell and shifts the Gamma-point modes by up to several THz.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Usage examples:
stb-ir -s structure.fdf -c calc.fdf -p dojo
stb-ir -s structure.fdf -c calc.fdf -p ~/pseudos -dim 2 2 2 -d 0.02
stb-ir -s structure.fdf -c calc.fdf -p dojo -dim 3 3 1 --symprec 0.02
stb-ir -s structure.fdf -c calc.fdf -p dojo -dim 3 3 1 --kgrid-density 0.05
Notes:
- --symprec (default 0.01 Ang) controls how many displacement folders Phonopy
actually needs to write here, and its real, more important effect is
downstream, in stb-irModes: that tool reloads these same force constants with
its OWN --symprec and uses whichever point group IT detects to decide which
modes are IR-active/forbidden and which ones are truly degenerate
(--use-symmetry/--skip-degenerate). Phonopy's own raw default (1e-5) is far
tighter than any real DFT relaxation's residual noise (e.g. a cell angle of
119.999 deg instead of an exact 120 deg is normal CG-relaxation noise, not a
real symmetry breaking) and can silently DETECT A LOWER SYMMETRY than the
crystal actually has -- this is why 0.01 (pymatgen's own default) is used here
instead. Pass THE SAME --symprec to both stages, or the mode
numbering/classification stb-irModes reports may not match what this stage
assumed when it wrote (or skipped) a displacement here. If the space/point
group stb-irModes reports doesn't match what you expect for this crystal,
rerun both stages with a looser --symprec (e.g. 0.02-0.1).
- --kgrid-density (default 0.2 1/Ang, same convention as stb-kgrid/stb-strain/
stb-phononsCreate/stb-raman) is unrelated to symmetry -- it sets how finely the
ELECTRONIC structure is sampled for the SUPERCELL force calculation done here,
which is what the phonon frequencies computed by stb-irModes are actually built
from. A coarse density under-samples the electronic structure and can leave the
reported frequencies far from experiment -- most dramatically for a
metal/semimetal with a Kohn anomaly (verified on stb-raman's own graphene
G-band case: >100 cm^-1 shift from doubling the k-density alone, after
supercell size (-dim) had stopped mattering). If a computed frequency looks far
from the literature/experimental value, suspect --kgrid-density before -dim.
- This flag only tunes the k-grid HERE, for [4]'s big supercell SCF. Stage 2's
own single-point dipole/Born-charge runs are small, unit-cell-sized
calculations that reuse whatever kgrid.MonkhorstPack is already inside the
--calc file YOU pass to stb-irModes -- there is no equivalent --kgrid-density
flag on that stage. To keep the whole workflow at a consistent, converged
k-density end to end, edit that block by hand in the calc.fdf you give
stb-irModes (it can be a different file from this one).