stb-ramanModes¶
Stage 2 - Modes & Optical Displacements of the 5.11 Raman Spectrum workflow · menu code 5.11.2
usage: stb-ramanModes [-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] [--full-tensor] [--use-symmetry]
[--reduce-components] [--skip-degenerate] [--kgrid NX NY NZ]
[--kgrid-density D]
[--optical-mesh OPTICAL_MESH OPTICAL_MESH OPTICAL_MESH]
[--optical-nbands OPTICAL_NBANDS]
[--optical-broaden OPTICAL_BROADEN] [--export-animations]
[--animation-frames ANIMATION_FRAMES] [--view-animation] [-v]
[--no-intro]
Stage 2 of 3: builds FORCE_SETS from Stage 1's phonon displacements, identifies the Gamma-point vibrational modes, and generates the +/-delta Optical-calculation displacement folders needed for the Raman tensor.
For each selected mode, writes 6 folders by default (2 signs x 3
Optical.Vector axes: x, y, z -- a diagonal-only Raman tensor Rxx/Ryy/Rzz)
under <directory>/optical_disp/, or 12 with --full-tensor (adds the
(x+y)/sqrt(2), (x+z)/sqrt(2), (y+z)/sqrt(2) face-diagonal directions needed
to also recover Rxy/Rxz/Ryz). stb-ramanAnalysis auto-detects which scope
was used from the folders actually present. Doesn't run SIESTA itself --
run each folder's calculation yourself, then use stb-ramanAnalysis.
options:
-h, --help show this help message and exit
-dir DIRECTORY, --directory DIRECTORY
Root directory written by stb-raman (Stage 1) -- must contain 'phonon_disp/' (default: raman_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-raman run).
-c CALC, --calc CALC calc.fdf template for the Optical calculations -- can be the same file used in Stage 1 or a different one (e.g. a denser k-grid, 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.
--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-raman (default: 10.0). Only used to detect a genuinely isolated (0D) structure, which has 3 extra trivial (free-rotation) modes at Gamma beyond the usual 3 translations -- irrelevant for 3D/2D/1D structures.
--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 Raman-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 Raman-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 Raman-tensor derivative (default: 0.02).
--full-tensor Compute the FULL symmetric Raman tensor (Rxx, Ryy, Rzz, Rxy, Rxz, Ryz) instead of just the diagonal -- adds 3 more Optical.Vector directions per sign (the face-diagonals), doubling the folder count per mode (12 instead of 6). Off-diagonal components are recovered by stb-ramanAnalysis from these mixed-direction measurements.
--use-symmetry Skip modes that group theory guarantees are Raman-INACTIVE (their irreducible representation at Gamma isn't contained in the quadratic-function representation x^2/y^2/z^2/xy/xz/yz -- their Raman tensor is exactly zero, not just numerically small). Works for any of the 32 point groups, not just centrosymmetric ones. Only applies to the default mode selection (every non-acoustic mode) -- an explicit --modes list is never second-guessed. Needs a PRIMITIVE cell (see stb-unitcell --mode primitive); falls back to running every mode, with a warning, if that's not available.
--reduce-components For a non-degenerate mode whose Raman tensor SHAPE is fixed by symmetry up to one overall scale (a single-band irrep with multiplicity exactly 1 in the quadratic-function representation), probe only ONE Optical.Vector direction instead of all of them -- stb-ramanAnalysis reconstructs the rest algebraically. Falls back to full probing for degenerate modes or any mode whose tensor shape isn't uniquely fixed (needs a PRIMITIVE cell, same as --use-symmetry; degrades to no reduction, never a crash, if that's not available).
--skip-degenerate For a degenerate group of modes (2 or more bands sharing one irrep, e.g. an E or T representation), write Optical folders for only ONE representative band and skip the rest entirely -- Raman activity and the depolarization ratio are rotational invariants of the tensor, so whatever orthogonal transformation relates two degenerate partners (guaranteed to exist by group theory, even though phonopy's returned eigenvectors don't tell you which one) leaves both invariants unchanged -- the representative's computed values apply exactly to every other partner in its group. stb-ramanAnalysis reuses them automatically. Needs a PRIMITIVE cell (same as --use-symmetry/--reduce-components; degrades to running every mode, with a warning, if that's not available).
--kgrid NX NY NZ SCF k-grid of the Optical calculations, forced into config_extra.fdf (overrides the template's own). Without --kgrid or --kgrid-density the template's grid is kept; if the template has none, one is suggested (density 0.2 1/Ang, vacuum axes 1) and forced -- SIESTA would otherwise sample Gamma only.
--kgrid-density D Suggest the SCF k-grid from this density (1/Ang, the stb-kgrid convention) and force it, overriding the template's grid. Ignored when --kgrid is given.
--optical-mesh OPTICAL_MESH OPTICAL_MESH OPTICAL_MESH
Optical.Mesh k-grid for the dielectric-function calculation (default: 10 10 10).
--optical-nbands OPTICAL_NBANDS
Optical.NumberOfBands (default: SIESTA's own default -- all bands within the basis).
--optical-broaden OPTICAL_BROADEN
Optical.Broaden in eV (default: 0.2).
--export-animations Write a looping animation of each selected mode's eigendisplacement (a smooth 0/+A/0/-A/0 sweep) as optical_disp/mode_XX_animation.axsf -- 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).
--view-animation After everything else is written, open each selected mode's eigendisplacement animation in an interactive ASE viewer window (ase-gui), one mode at a time -- close a window to advance to the next. Needs a display (X11/Wayland); off by default. Independent of --export-animations -- works whether or not the .axsf files are also written to disk, and vice versa.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Usage example:
stb-ramanModes --directory raman_study --calc calc_optical.fdf
stb-ramanModes --directory raman_study --calc calc_optical.fdf --modes 1 2 3