Repository navigation
Phonon module (phonopy phono3py integration)
PAOFLOW's src/PAOFLOW/phonon/ subpackage drives phonopy
(and, in future stages, phono3py) to
compute lattice-dynamical properties from Quantum ESPRESSO calculations using the
finite-displacement method.
PAOFLOW post-processes DFT — it does not compute forces itself. The phonon
workflow therefore writes ready-to-run Quantum ESPRESSO inputs, you run
pw.x / ph.x, and PAOFLOW harvests the results to assemble force constants,
phonon dispersions, density of states, thermal properties, Born effective
charges and the LO–TO splitting.
Convention: all lengths follow the phonopy Quantum ESPRESSO convention, i.e. Bohr for cell vectors and displacements, Ry/Bohr for forces. phonopy's internal frequency factor is set for
calculator='qe'.
- Implementation status
- Installation
- Architecture
- The two-phase workflow
- Quick start (Python API)
- Born charges, ε∞ and the LO–TO splitting
- Infrared (IR) spectrum
- Raman spectrum
- Vibrational dielectric ε(ω) and emissivity
- Quasi-harmonic approximation (QHA)
- DFT+U: injecting the HUBBARD card
- Output files
- Plotting
- Generating a workflow script with
paoflow-gen - API reference
- Worked example: MgO
- Troubleshooting
- Roadmap
| Stage | Capability | Status |
|---|---|---|
| S0 | Structure bridge (PAOFLOW ↔ PhonopyAtoms), phonopy object lifecycle |
✅ Implemented |
| S1 | Harmonic phonons (fc2): displacements, force harvesting, dispersion, DOS, thermal properties | ✅ Implemented |
| S2 | Born effective charges Z*, high-frequency dielectric ε∞, non-analytical correction (LO–TO) |
✅ Implemented |
| S3 | Infrared (IR) spectrum from mode effective charges and zone-centre eigenvectors | ✅ Implemented |
| S4 | Non-resonant (Placzek) and IPA resonance Raman spectra by finite-difference ∂ε/∂Q
|
✅ Implemented |
| S5 | Vibrational (ionic) dielectric ε(ω) (reststrahlen, generalised LST) and the lattice emissivity 1 − R
|
✅ Implemented |
| S6 | Quasi-harmonic approximation (QHA): isotropic volume scan, EOS fit, V(T), thermal expansion, B(T), C_p, thermodynamic γ(T) and the mode-Grüneisen dispersion |
✅ Implemented |
| S7+ | Phono3py (fc3 / anharmonic), electron–phonon | 🚧 Planned (see Roadmap) |
The public entry points currently available are
PAOFLOW.phonons(...),
PAOFLOW.born_charges(...),
PAOFLOW.ir_spectrum(...),
PAOFLOW.raman_spectrum(...) and
PAOFLOW.vibrational_dielectric(...) (plus the low-level
PAOFLOW.phonon_setup(...)) and
PAOFLOW.quasi_harmonic(...).
The phonon stack is an optional dependency group. Install PAOFLOW with the
phonon extra to pull in phonopy, phono3py and seekpath:
pip install "PAOFLOW[phonon]"
# or, from a checkout:
pip install -e ".[phonon]"This installs:
| Package | Used for |
|---|---|
phonopy>=2.21 |
finite-displacement engine, fc2, dispersion / DOS / thermal |
phono3py>=2.3 |
anharmonic fc3 (future stages) |
seekpath>=2.0 |
automatic high-symmetry q-paths when ibrav is unknown |
You also need a working Quantum ESPRESSO (pw.x, and ph.x if you use the
DFPT Born-charge back-end).
src/PAOFLOW/phonon/
├── structure.py # PAOFLOW structure <-> PhonopyAtoms (unit handling)
├── io.py # write QE inputs; harvest forces; BORN / ph.x / field I/O
├── do_phonopy.py # phonopy lifecycle, fc2, dispersion, DOS, thermal, NAC
└── do_born_charges.py # Z* + epsilon assembly (sum rule, symmetrization, BORN)
The QHA driver lives in
do_qha.py(volume scan, EOS fit, thermal expansion and the mode-Grüneisen dispersion), the IR/Raman machinery indo_ir_raman.pyand the vibrational dielectric indo_vibrational_dielectric.py.
| File | Key public functions |
|---|---|
structure.py |
paoflow_to_phonopy, phonopy_to_paoflow, primitive_atom_info
|
do_phonopy.py |
init_phonopy, generate_displacements, produce_force_constants, compute_phonon_bands, compute_phonon_dos, compute_thermal_properties, attach_nac
|
do_qha.py |
generate_qha_inputs, run_qha, compute_gruneisen_band
|
io.py |
write_displaced_supercells, harvest_qe_forces, ingest_force_sets, write_force_sets, write_born_file, read_born_file, read_hubbard_card, write_ph_epsil_input, harvest_ph_results, write_field_inputs, harvest_field_results
|
do_born_charges.py |
compute_born_and_epsilon |
These are orchestrated by the high-level methods on the PAOFLOW class
described in the API reference.
Because forces come from external Quantum ESPRESSO runs, both phonons() and
born_charges() operate in two phases:
flowchart LR
A["phonons(forces=None)"] -->|writes| B["supercell-NNN.in"]
B -->|run pw.x| C["supercell-NNN.out"]
C --> D["phonons(forces='qe')"]
D -->|fc2 + NAC| E["bands / DOS / thermal"]
-
Generate (
forces=None): build the phonopy object, create the displaced supercells and write one completepw.xSCF input per displacement. -
Run (you): execute
pw.xon every generated input. -
Analyse (
forces='qe'): harvest the forces, build the second-order force constants and compute the requested properties.
The displacement ordering is deterministic, so the generate and analyse
calls line up as long as the structure, displacement amplitude and supercell are
unchanged. On HPC, run the phases separately so pw.x can go through the
scheduler (the generated script — see below — splits them for you).
from PAOFLOW import PAOFLOW
# A PAOFLOW instance pointed at an existing QE .save directory.
paoflow = PAOFLOW.PAOFLOW(
workpath='.', outputdir='output', savedir='Mg1O1.save', verbose=True,
)
# --- Phase 1: write the displaced-supercell QE inputs -------------------
paoflow.phonons(
supercell_matrix=2, # 2x2x2 supercell (scalar / length-3 / 3x3)
displacement_distance=0.06, # Bohr
phonon_dir='phonon', # under outputdir
forces=None, # generate only
)
# -> output/phonon/supercell-001.in, supercell-002.in, ...Run pw.x on every supercell-*.in (writing supercell-*.out next to them),
then analyse:
# --- Phase 3: harvest forces, build fc2, compute properties -------------
paoflow.phonons(
supercell_matrix=2,
forces='qe', # harvest supercell-*.out
ibrav=2, # FCC -> default high-symmetry q-path
mesh=[20, 20, 20], # q-mesh for DOS / thermal
do_bands=True, do_dos=True, do_thermal=True,
units='cm-1',
fname='phonon',
)
# -> output/phonon_band.dat, phonon_band.labels, phonon_dos.dat, phonon_thermal.dat| Value | Meaning |
|---|---|
None |
Generate phase: only write supercell-*.in. |
'qe' |
Harvest forces from supercell-*.out in phonon_dir. |
'<path>/FORCE_SETS' |
Ingest an external phonopy FORCE_SETS file. |
ndarray (ndisp, natoms, 3) |
Use forces directly (Ry/Bohr). |
For polar insulators the phonon dispersion near Γ requires the non-analytical
term correction (NAC), which needs the Born effective charges Z* and the
high-frequency dielectric tensor ε∞. born_charges() computes both and writes
a phonopy BORN file; phonons(nac=True, born_file=...) then applies the
LO–TO splitting.
Two back-ends are available via method=:
method |
Engine | Notes |
|---|---|---|
'dfpt' (default) |
a single Γ-point ph.x run (epsil=.true., trans=.false., zeu=.true.) |
Fast & accurate. Not available for DFT+U / hybrid functionals. |
'field' |
finite electric field (lelfield) on the primitive cell — central differences of forces (→ Z*) and polarization (→ ε∞) |
Slower (Berry-phase SCF), but works when ph.x cannot be used. |
# Phase 1: write the ph.x input (reuses the existing scf .save).
paoflow.born_charges(method='dfpt', forces=None, phonon_dir='phonon')
# -> output/phonon/ph_epsil.inRun it (ph.x reuses the self-consistent .save):
cd output/phonon
mpirun -np 16 ph.x -in ph_epsil.in > ph_epsil.out# Phase 2: parse, enforce the acoustic sum rule, symmetrize, write BORN.
paoflow.born_charges(method='dfpt', forces='qe', phonon_dir='phonon')
# -> output/phonon/BORNpaoflow.born_charges(method='field', forces=None,
field_strength=0.001, nberrycyc=3) # writes 7x field-*.in
# ... run pw.x on every field-*.in ...
paoflow.born_charges(method='field', forces='qe') # writes BORNThe seven inputs are a zero-field reference plus ±field along each Cartesian
axis (field-0, field-{x,y,z}{+,-}).
paoflow.phonons(
supercell_matrix=2, forces='qe', ibrav=2,
nac=True,
born_file='output/phonon/BORN',
)The acoustic sum rule (Σ_κ Z*_κ = 0) and tensor symmetrization are applied by
default (enforce_sum_rule=True, symmetrize=True).
The infrared activity of a zone-centre phonon is governed by how strongly the
mode modulates the cell dipole. ir_spectrum() forms, for each mode ν, the
mode effective charge vector
Zbar_{ν,a} = Σ_{κ,b} Z*_{κ,a,b} · e_{ν,κ,b} / sqrt(M_κ)
from the Born effective charges Z*, the (mass-weighted) Γ-point eigenvectors
e_ν and the atomic masses M_κ. The IR intensity is
I_ν = Σ_a |Zbar_{ν,a}|², and a Lorentzian broadening of each line produces the
continuous spectrum. The transverse-optical eigenvectors at exactly Γ are
used, so the non-analytical (LO–TO) correction is not required here.
IR therefore reuses the harmonic force constants (for the eigenvectors) and the
Born charges (from a BORN file or a preceding born_charges() call) — it does
not need any new SCF runs:
# (force constants + BORN already available under output/phonon/)
p.ir_spectrum(
supercell_matrix=2,
forces='qe', # rebuild fc2 -> Gamma eigenvectors
phonon_dir='phonon',
born_file='output/phonon/BORN', # Z* (and epsilon_inf)
units='cm-1',
gamma=4.0, # Lorentzian FWHM (in 'units')
fname='phonon',
)
# -> output/phonon_ir_modes.dat, output/phonon_ir_spectrum.dat<fname>_ir_modes.dat lists, per mode, the frequency, IR activity (raw and
normalised), an active flag and the irreducible-representation label;
<fname>_ir_spectrum.dat is the broadened curve (frequency vs. intensity).
Acoustic modes are rigid translations and carry no dipole derivative, so they come out IR-silent automatically.
raman_spectrum() computes the non-resonant (Placzek) Raman spectrum by
finite differences of the static dielectric tensor along each optical
zone-centre mode. Unlike IR, Raman needs the derivative of the polarisability,
which is obtained numerically: the primitive cell is displaced by ±δ along
every optical eigenvector and the static dielectric tensor of each displaced
cell is evaluated with the fast PAOFLOW internal-projection optical pipeline
(an SCF-only run — no NSCF, no projwfc.x). The Raman tensor of mode ν is the
central difference
R^ν = ( ε(+δ) − ε(−δ) ) / (2δ)
from which the orientationally-averaged (powder) invariants — the isotropic
part a = Tr(R)/3 and the anisotropy γ² — give the activity 45a² + 7γ² and
the Stokes intensities.
# --- generate: write +/- displaced primitive-cell SCF inputs -----------
p.raman_spectrum(
supercell_matrix=2,
forces='qe', # rebuild fc2 -> optical eigenvectors
raman_dir='raman',
delta=0.05, # mass-weighted normal-coordinate step
nbnd=21, # empty states for the optical response
generate=True,
)
# -> output/raman/mode-NNN-{plus,minus}/<prefix>.scf.in (optical modes only)Run pw.x (SCF) in every mode-* directory, then analyse:
# --- analyse: epsilon per cell -> Raman tensor -> spectrum -------------
p.raman_spectrum(
supercell_matrix=2,
forces='qe',
raman_dir='raman',
delta=0.05,
basispath='BASIS_PS/', # pseudo-atomic basis for internal projections
configuration='extended',
pthr=0.95,
nfft=(24, 24, 24), # optional double-grid interpolation
e_static=0.05, # eV; epsilon_1 at omega -> 0
units='cm-1',
generate=False,
)
# -> output/phonon_raman_modes.dat, output/phonon_raman_spectrum.datThe phase is chosen automatically when generate=None (the default):
analyse once every displaced-cell .save is present, otherwise generate.
Only the optical modes are displaced; acoustic modes are rigid translations
and are skipped (Raman-silent).
For silicon (diamond structure) this reproduces the single triply-degenerate
T₂g Raman-active optical phonon (~520 cm⁻¹ experimentally).
The bare activity 45a² + 7γ² can be turned into a measured-like Stokes
intensity with three options:
| Option | Default | Meaning |
|---|---|---|
laser_nm |
None |
Excitation wavelength in nm. When set, each line is scaled by the resonance-free frequency prefactor (ω_L − ω_ν)⁴ (the standard scattered-light factor). None omits it, leaving the bare activity. |
temperature |
300.0 |
Temperature (K) for the Bose–Einstein population. Stokes scattering carries the thermal factor (n_ν + 1) with n_ν = 1 / (exp(ħω_ν / k_BT) − 1). Higher T enhances low-frequency lines. |
gamma |
4.0 |
Lorentzian full width at half maximum used to broaden each mode into the continuous spectrum, in the chosen units (cm⁻¹ or THz). |
These correspond to the constants exposed at the top of the generated
main.raman.py:
# Raman cross-section options.
LASER_NM = None # excitation wavelength (nm); None -> no (wL-wv)^4 factor
TEMPERATURE = 300.0 # K, Bose (n+1) Stokes factor
GAMMA = 4.0 # Lorentzian FWHM (in UNITS)<fname>_raman_modes.dat lists, per mode, the frequency, activity (raw and
normalised), Stokes intensity, the invariants a and γ², an active flag and
the irrep label; <fname>_raman_spectrum.dat is the broadened curve.
The same machinery yields the resonance Raman spectrum by finite-differencing
the complex dielectric tensor evaluated at the laser frequency ω_L instead of
the static limit. Set method='resonance' and give the excitation wavelength via
laser_nm:
p.raman_spectrum(
supercell_matrix=2,
forces='qe',
raman_dir='raman',
delta=0.05,
basispath='BASIS_PS/',
method='resonance',
laser_nm=532.0, # ω_L = hc/λ; required for resonance
lifetime=0.1, # eV; Lorentzian broadening of ε(ω_L)
units='cm-1',
generate=False,
)Each displaced cell is run once over a small energy grid (up to e_window,
defaulting to just above the largest laser energy, with e_ne points chosen to
resolve lifetime), and ε(ω_L) is harvested by interpolation from the
epsr_*/epsi_* outputs. The Raman tensor
R^ν(ω_L) = ( ε(+δ, ω_L) − ε(−δ, ω_L) ) / (2δ)
is now complex, and the activity uses the modulus, 45|a|² + 7γ². In this
independent-particle limit the central difference differentiates the transition
energies and the transition dipoles together, so it captures both the
Albrecht A-term (Franck–Condon) and B-term (Herzberg–Teller); the
lifetime Γ keeps the response finite on resonance. The dielectric tensor is
symmetric by construction, so the antisymmetric invariant γ_a² is identically
zero and is not included.
laser_nm also accepts a list of wavelengths to compute a Raman excitation
profile in one pass; each wavelength is written to a separate
<fname>_<nm>nm_raman_modes.dat / <fname>_<nm>nm_raman_spectrum.dat pair:
p.raman_spectrum(..., method='resonance', laser_nm=[488.0, 514.5, 532.0])
# -> output/phonon_488nm_raman_spectrum.dat, ..._514nm_..., ..._532nm_...method='all' produces the static spectrum and one resonance spectrum per
laser from a single optics run per displaced cell — the resonance grid already
starts at ω → 0, so the static tensor is harvested for free from the same run.
The static spectrum is written to <fname>_static_raman_*.dat and each laser to
<fname>_<nm>nm_raman_*.dat:
p.raman_spectrum(..., method='all', laser_nm=[488.0, 532.0])
# -> output/phonon_static_raman_spectrum.dat
# output/phonon_488nm_raman_spectrum.dat
# output/phonon_532nm_raman_spectrum.dat| Option | Default | Meaning |
|---|---|---|
method |
'static' |
'static' (non-resonant Placzek), 'resonance' (at ω_L), or 'all' (both, one optics run per cell). |
lifetime |
0.1 |
Lorentzian lifetime broadening (eV) of ε(ω_L) — the delta of dielectric_tensor(); keeps resonant lines finite. |
e_window |
None |
Upper energy (eV) of the per-cell dielectric grid (default: just above the largest laser energy). |
e_ne |
None |
Number of grid points for the per-cell dielectric grid (default: chosen to resolve lifetime). |
Custom dielectric back-end. Pass
dielectric_callback=f(savedir, workpath)returning a(3, 3)static dielectric tensor to bypass the built-in PAO pipeline (e.g. to read ε from an external code). When a callback is given,basispathis not required. Formethod='resonance'the callback must return a(len(laser_nm), 3, 3)complex array (one tensor per laser wavelength).
vibrational_dielectric() builds the ionic (lattice) contribution to the
dielectric function from the polar zone-centre phonons and adds it to the
electronic high-frequency tensor ε∞:
ε_ab(ω) = ε∞_ab + (e² / (ε₀ m_u V)) · Σ_ν S_{ν,ab} / (ω_ν² − ω² − iωγ_ν)
where S_{ν,ab} = Zbar_{ν,a} · Zbar_{ν,b} is the mode oscillator-strength
tensor built from the same mode effective charge vectors Zbar_ν used by
ir_spectrum() (Gonze–Lee, PRB 55, 10355). It reuses the harmonic force
constants (Γ eigenvectors) and the BORN file (Z* and ε∞), so — like IR
— it needs no new SCF runs:
p.vibrational_dielectric(
supercell_matrix=2,
forces='qe', # rebuild fc2 -> Gamma eigenvectors
phonon_dir='phonon',
born_file='output/phonon/BORN', # Z* and epsilon_inf
gamma=4.0, # phonon linewidth / Lorentzian damping (in 'units')
units='cm-1',
outdir='vibdielectric',
fname='phonon',
)
# -> output/vibdielectric/{epsr,epsi,eels,refl}_<ab>.dat
# output/phonon_vibdielectric_static.datTwo static observables follow directly and are written to
<fname>_vibdielectric_static.dat:
- the static dielectric tensor
ε(0) = ε∞ + Σ_ν S_ν / ω_ν²(the generalised Lyddane–Sachs–Teller relation), and - the per-mode oscillator strengths
Tr(S_ν)/3and frequencies.
For a polar crystal Re ε(ω) < 0 between ω_TO and ω_LO — the reststrahlen
band of total reflection. Acoustic modes carry no dipole (Zbar_ν = 0) and a
small relative cutoff excludes their residual 1/ω².
Only
ε∞is required, not the full electronic spectrum. Phonon resonances sit in the far-IR while electronic interband transitions sit in the eV–UV range, so across the phonon window the electronic response is flat and equal toε∞(the high-frequency constant from theBORNfile). The frequency-dependent electronicε(ω)from the optical pipeline is not needed. To stitch a full IR→UVε(ω)instead, combine the two asε_elec(ω) + ε_ionic(ω) − ε∞(subtracting oneε∞to avoid double-counting).
By Kirchhoff's law an opaque surface emits what it does not reflect, so the
spectral emissivity is ε_emis(ω) = 1 − R(ω). Passing emissivity=True
derives it from the vibrational ε(ω) by reusing the Fresnel/Kirchhoff/Planck
helpers of the optical module (Emissivity):
p.vibrational_dielectric(
supercell_matrix=2,
forces='qe',
phonon_dir='phonon',
born_file='output/phonon/BORN',
gamma=4.0,
units='cm-1',
emissivity=True,
emis_angles=(0.0, 60.0), # directional incidence angles (deg)
emis_ntheta=64, # polar samples for the hemispherical integral
emis_temperature=(300.0, 1000.0), # Planck-weighted total emissivity
outdir='vibdielectric',
)
# -> output/vibdielectric/{refl,emis}_th{deg}_<comp>.dat (directional)
# output/vibdielectric/emish_<comp>.dat (spectral hemispherical)
# output/vibdielectric/emist_<comp>.dat (temperature vs total)For each diagonal component (xx, yy, zz) PAOFLOW writes the directional
reflectivity/emissivity at each angle, the angle-averaged spectral
hemispherical emissivity emish_<comp>.dat, and the Planck-weighted total
hemispherical emissivity vs. temperature emist_<comp>.dat. In the
reststrahlen band the reflectivity approaches 1, so the emissivity shows a deep
dip there.
The total hemispherical emissivity is integrated over the far-IR grid only, so it captures the lattice (phonon) contribution to the emissivity — combine with the electronic optical run for the full broadband value.
The QHA (Stage 6) adds temperature-dependent lattice properties by combining
the static DFT energy E(V) with the harmonic vibrational free energy
F_vib(T, V) sampled at several isotropically strained volumes. Minimising
the Gibbs energy G(T, p) = E(V) + F_vib(T, V) + pV at each temperature yields
the thermal expansion and the temperature dependence of the volume, bulk modulus
and heat capacity — none of which exist in the strictly harmonic (fixed-volume)
picture.
For each sampled volume the workflow runs a static SCF (for E(V)) and a
full finite-displacement phonon calculation (for F_vib(T, V)), then feeds
the collected data to phonopy's PhonopyQHA.
Outputs (all as functions of temperature unless noted):
| Quantity | File | Units |
|---|---|---|
| Static energy–volume curve | <fname>_ev.dat |
ų, eV |
Equilibrium volume V(T)
|
<fname>_volume.dat |
ų |
Volumetric thermal expansion α(T)
|
<fname>_thermal_expansion.dat |
K⁻¹ |
Isothermal bulk modulus B(T)
|
<fname>_bulk_modulus.dat |
GPa |
Gibbs free energy G(T)
|
<fname>_gibbs.dat |
eV |
Heat capacity at constant pressure C_p(T)
|
<fname>_heat_capacity.dat |
J/K/mol |
Thermodynamic Grüneisen γ(T)
|
<fname>_gruneisen.dat |
– |
Mode Grüneisen dispersion γ_qν(q)
|
<fname>_gruneisen_band.dat (+ .labels) |
– |
<fname> defaults to qha.
The equation-of-state fit drives the choice of nvolumes:
-
nvolumes=5(default, recommended): the full four-parameter EOS fit viaPhonopyQHA(Vinet by default;birch_murnaghanormurnaghanalso available). A four-parameter EOS needs at least four volume points. -
nvolumes=3: a low-order parabolic fit ofG(V; T)at each temperature. A quadratic is exactly determined by three points and is valid for the small strains probed here; it produces the same set of output files (theeosargument is ignored).
strain (default 0.02) sets the maximum linear strain of the scan, so the
volumes span Ω·(1 ± strain)³.
Like the rest of the phonon module, quasi_harmonic() is two-phase: with
forces=None it writes the QE inputs for every volume, and with forces='qe'
it harvests them and runs the QHA.
from PAOFLOW import PAOFLOW
p = PAOFLOW.PAOFLOW(workpath='.', outputdir='output', savedir='Si.save', verbose=True)
# --- Phase 1: write the per-volume static SCF + displaced-supercell inputs ---
p.quasi_harmonic(supercell_matrix=2, displacement_distance=0.06,
nvolumes=5, strain=0.02, forces=None)
# -> output/qha/vol-00/{scf.in, supercell-001.in, ...}
# output/qha/vol-01/... ... output/qha/vol-04/...
# --- Phase 2: run pw.x on every scf.in and supercell-*.in in each vol-NN ---
# --- Phase 3: harvest E(V) + forces, fit the EOS, write the QHA tables -----
p.quasi_harmonic(supercell_matrix=2, forces='qe', ibrav=2,
nvolumes=5, strain=0.02, mesh=[20, 20, 20],
t_min=0.0, t_max=1000.0, t_step=10.0,
eos='vinet', pressure=0.0, units='cm-1')
# -> output/qha_volume.dat, qha_thermal_expansion.dat, qha_bulk_modulus.dat,
# qha_gibbs.dat, qha_heat_capacity.dat, qha_gruneisen.dat,
# qha_ev.dat, qha_gruneisen_band.dat (+ .labels)Each volume lives in its own output/qha/vol-NN/ directory containing a static
scf.in (for E(V)) and the phonopy displaced supercells; run pw.x on all of
them before the analyse phase.
Beyond the macroscopic γ(T), the QHA also computes the mode Grüneisen
parameters γ_qν = −(V/ω_qν)·∂ω_qν/∂V along a q-path — a dispersion-style
plot analogous to the phonon bands. It uses the three volumes bracketing
equilibrium via phonopy's PhonopyGruneisen, and resolves the q-path exactly
like the phonon dispersion: an explicit q_path wins, otherwise the
ibrav-derived high-symmetry path, otherwise the automatic seekpath path.
Because γ_qν carries a 1/ω² factor, the acoustic branches diverge as ω → 0
at Γ. Modes whose frequency falls below gruneisen_cutoff (in the output
units; default: 1 % of the maximum frequency) are masked (nan) so the plot
simply leaves a gap near Γ instead of drawing spurious spikes. Pass
gruneisen_cutoff=0 to disable the masking, or set gruneisen_band=False to
skip the dispersion entirely.
When the underlying SCF uses DFT+U, the displaced-supercell force calculations
must carry the same Hubbard parameters. Pass hubbard_file= (a pw.x input
containing a new-style HUBBARD card) and PAOFLOW appends the card to every
generated input:
paoflow.phonons(
supercell_matrix=2, forces=None,
hubbard_file='scf.in', # read its HUBBARD card, inject into supercell-*.in
)Only on-site U parameters are injected. Intersite V lines carry explicit
atom indices that are not valid for a supercell, so they are dropped. The
on-site U manifold lines (e.g. U Ga-4p 0.39) transfer verbatim.
HUBBARD (ortho-atomic)
U Ga-4s 0.0
U Ga-4p 0.3911078136627079
U As-4s 0.0
U As-4p 2.118807310520171
V Ga-4s As-4s 1 2 1.07 <- dropped (supercell-specific indices)
...
Born charges with DFT+U. The
ph.x(DFPT) back-end does not support intersiteU+Vfor the electric-field response in current QE releases. Usemethod='field'(which acceptshubbard_file=to inject the U-only card), or restrict to on-siteU. FullU+Vsupercell support is on the roadmap.
You can also pass hubbard_card= with the card text directly (overrides
hubbard_file). Programmatically, read_hubbard_card(path, include_v=False)
returns the card string.
Written under the PAOFLOW output directory (workpath/outputdir):
| File | Produced by | Contents |
|---|---|---|
<phonon_dir>/supercell.in |
phonons(forces=None) |
perfect supercell (reference) |
<phonon_dir>/supercell-NNN.in |
phonons(forces=None) |
displaced supercell pw.x inputs |
<phonon_dir>/phonopy_disp.yaml |
phonons(forces=None) |
displacement dataset (provenance / restart) |
<phonon_dir>/FORCE_SETS |
phonons(forces='qe') |
harvested forces (phonopy format) |
<phonon_dir>/BORN |
born_charges(forces='qe') |
ε∞ + Z* (phonopy BORN format) |
<phonon_dir>/ph_epsil.in/.out |
born_charges(method='dfpt') |
DFPT epsilon/Born run |
<phonon_dir>/field-*.in/.out |
born_charges(method='field') |
lelfield runs |
<fname>_band.dat |
phonons(do_bands=True) |
path distance + branch frequencies |
<fname>_band.labels |
phonons(do_bands=True) |
high-symmetry tick positions + labels |
<fname>_dos.dat |
phonons(do_dos=True) |
frequency + total DOS |
<fname>_thermal.dat |
phonons(do_thermal=True) |
T, free energy, entropy, heat capacity |
<fname>_ir_modes.dat |
ir_spectrum() |
per-mode frequency, IR activity, active, irrep |
<fname>_ir_spectrum.dat |
ir_spectrum() |
broadened IR spectrum (frequency vs. intensity) |
<raman_dir>/mode-NNN-{plus,minus}/<prefix>.scf.in |
raman_spectrum(generate=True) |
±displaced primitive-cell SCF inputs (optical modes) |
<fname>_raman_modes.dat |
raman_spectrum(generate=False) |
per-mode frequency, activity, Stokes intensity, a, γ², irrep |
<fname>_raman_spectrum.dat |
raman_spectrum(generate=False) |
broadened Raman spectrum (frequency vs. intensity) |
<outdir>/{epsr,epsi,eels,refl}_<ab>.dat |
vibrational_dielectric() |
vibrational ε(ω) (real/imag), energy-loss, normal-incidence reflectivity |
<fname>_vibdielectric_static.dat |
vibrational_dielectric() |
ε∞, ionic and static ε(0) tensors (generalised LST) + per-mode oscillator strengths |
<outdir>/{refl,emis}_th{deg}_<comp>.dat |
vibrational_dielectric(emissivity=True) |
directional reflectivity / emissivity 1 − R at each incidence angle |
<outdir>/emish_<comp>.dat |
vibrational_dielectric(emissivity=True) |
spectral hemispherical emissivity |
<outdir>/emist_<comp>.dat |
vibrational_dielectric(emissivity=True) |
total hemispherical emissivity vs. temperature |
qha/vol-NN/scf.in |
quasi_harmonic(forces=None) |
per-volume static SCF (E(V)) |
qha/vol-NN/supercell-*.in |
quasi_harmonic(forces=None) |
per-volume displaced-supercell inputs |
<fname>_ev.dat |
quasi_harmonic(forces='qe') |
static energy–volume curve (ų, eV) |
<fname>_volume.dat |
quasi_harmonic(forces='qe') |
equilibrium volume V(T) (ų) |
<fname>_thermal_expansion.dat |
quasi_harmonic(forces='qe') |
volumetric thermal expansion α(T) (K⁻¹) |
<fname>_bulk_modulus.dat |
quasi_harmonic(forces='qe') |
isothermal bulk modulus B(T) (GPa) |
<fname>_gibbs.dat |
quasi_harmonic(forces='qe') |
Gibbs free energy G(T) (eV) |
<fname>_heat_capacity.dat |
quasi_harmonic(forces='qe') |
heat capacity C_p(T) (J/K/mol) |
<fname>_gruneisen.dat |
quasi_harmonic(forces='qe') |
thermodynamic Grüneisen γ(T)
|
<fname>_gruneisen_band.dat / .labels
|
quasi_harmonic(forces='qe') |
mode-Grüneisen dispersion γ_qν(q) (+ ticks) |
<fname> defaults to phonon. Frequency units are 'THz' (default) or
'cm-1'.
Use the GPAO helper to plot the dispersion (with optional DOS) and the thermal
properties:
from PAOFLOW import GPAO
pplt = GPAO.GPAO()
pplt.plot_phonons(
band_file='output/phonon_band.dat',
dos_file='output/phonon_dos.dat',
labels_file='output/phonon_band.labels',
units='cm-1',
title='MgO phonons',
filename='mgo_phonon.png', # omit to show interactively
)
pplt.plot_phonon_thermal('output/phonon_thermal.dat')The quasi-harmonic results are plotted with plot_qha (a multi-panel figure of
V(T), α(T), B(T), C_p(T), γ(T) and the static E–V curve) and the
mode-Grüneisen dispersion with plot_gruneisen_band:
pplt.plot_qha(
volume_file='output/qha_volume.dat',
thermal_expansion_file='output/qha_thermal_expansion.dat',
bulk_modulus_file='output/qha_bulk_modulus.dat',
heat_capacity_file='output/qha_heat_capacity.dat',
gruneisen_file='output/qha_gruneisen.dat',
ev_file='output/qha_ev.dat',
title='Quasi-harmonic approximation',
)
# Mode Gruneisen parameters along the q-path (dispersion style).
pplt.plot_gruneisen_band(
'output/qha_gruneisen_band.dat',
labels_file='output/qha_gruneisen_band.labels',
title='Mode Grüneisen parameters',
)The IR and Raman spectra have their own helpers (a continuous curve with optional per-mode sticks):
pplt.plot_ir_spectrum(
'output/phonon_ir_spectrum.dat',
modes_file='output/phonon_ir_modes.dat', # optional stick markers
title='Infrared spectrum', units='cm-1',
filename='ir.png', # omit to show interactively
)
pplt.plot_raman_spectrum(
'output/phonon_raman_spectrum.dat',
modes_file='output/phonon_raman_modes.dat',
title='Raman spectrum', units='cm-1',
filename='raman.png',
)The vibrational dielectric and the reststrahlen emissivity are plotted with the
optical helper plot_optical (their files share the epsr/epsi/emish layout of
the optical module, with the frequency axis in eV):
# Re/Im epsilon(omega): the reststrahlen band is where Re eps < 0.
pplt.plot_optical(['epsr', 'epsi'], path='output/vibdielectric', component='xx',
title='Vibrational dielectric function')
# Spectral hemispherical emissivity (1 - R), when emissivity=True was used.
pplt.plot_optical(['emish'], path='output/vibdielectric', component='xx',
title='Vibrational (reststrahlen) emissivity')The paoflow-gen CLI scaffolds a self-contained, three-phase driver
(main.phonon.py) plus an optional plotting script (plot.phonon.py):
paoflow-gen # then choose the "phonon" workflow at the promptYou are prompted for the supercell multiplicity, displacement amplitude, q-mesh,
frequency units, thermal-property toggle, pseudopotential directory, the
optional HUBBARD input file, whether to compute Born charges (and which method),
whether to run the quasi-harmonic approximation, and the pw.x command (which
may carry flags, e.g. pw.x -npool 4). The generated main.phonon.py runs in phases:
python main.phonon.py generate # write displaced-supercell (+ Born) QE inputs
python main.phonon.py run # run pw.x on each supercell; ph.x / pw.x for Born
python main.phonon.py analyse # forces -> fc2 -> bands / DOS / thermal (+ LO-TO)
python main.phonon.py # 'all' (default): generate -> run -> analyseWhen Born charges are enabled the same three phases also write, run and harvest
the Born/dielectric calculation, so the resulting bands include the LO–TO
splitting automatically. With Born charges on you are additionally asked whether
to compute the vibrational (ionic) dielectric ε(ω) and its reststrahlen
emissivity (and the phonon linewidth / emissivity temperature); when enabled,
the analyse phase runs vibrational_dielectric(...) after the IR spectrum and
plot.phonon.py adds the ε(ω) and emissivity plots. When the quasi-harmonic
approximation is enabled you are asked for the number of volumes (5 or 3),
the maximum strain, the EOS, the temperature grid and the pressure; the three
phases then also write, run and harvest the per-volume qha/vol-NN/ inputs, and
plot.phonon.py adds the QHA panels and the mode-Grüneisen dispersion. Edit the
constants at the top of main.phonon.py (SUPERCELL_MATRIX, DISPLACEMENT,
MESH, BORN, BORN_METHOD, VIBDIELECTRIC, VIBDIELECTRIC_GAMMA,
VIBDIELECTRIC_EMISSIVITY, VIBDIELECTRIC_EMIS_TEMP, QHA, QHA_NVOLUMES,
QHA_STRAIN, QHA_EOS, QHA_TMIN, QHA_TMAX, QHA_TSTEP, QHA_PRESSURE,
HUBBARD_FILE, MPI_QE, QE_PW, QE_PH, …) to tweak the run.
When you answer yes to “Also generate a non-resonant Raman workflow?” the
generator additionally emits a self-contained main.raman.py (and, with
plotting enabled, plot.raman.py). It reuses the FORCE_SETS produced by
main.phonon.py (run that first, at least its analyse phase) and runs the
same three phases on the ±displaced primitive cells:
python main.raman.py generate # write +/- displaced primitive-cell SCF inputs
python main.raman.py run # run pw.x (SCF) in every mode-* directory
python main.raman.py analyse # PAOFLOW epsilon per cell -> Raman spectrum
python main.raman.py # 'all' (default): generate -> run -> analyseYou are prompted for the displacement step (DELTA), the number of SCF bands
(NBND), the optical-pipeline settings (NPOOL, SMEARING, double-grid
NFFT, E_STATIC) and the Raman cross-section options (TEMPERATURE, GAMMA,
and the laser wavelength LASER_NM); all are exposed as editable constants at
the top of the script. The very first Raman prompt picks the flavour —
none (skip), static, resonance, or all (static + resonance from one run).
The resonance/all flavours additionally prompt for the laser wavelength(s)
and the LIFETIME, and emit the METHOD, LIFETIME, E_WINDOW and E_NE
constants. The wavelength prompt accepts a comma-separated list or a Python
list expression such as [n for n in range(450, 650, 5)] to sweep an excitation
profile; plot.raman.py then overlays every spectrum on a single plot (with
a legend), so an all run or an excitation profile is one figure rather than a
pile of windows. Useful flags: --normalize (scale each curve to unit peak to
compare line shapes), --sticks (overlay the discrete mode intensities),
--xmin/--xmax, and --save. With several laser energies, --excitation
switches to the resonance excitation profile — the Raman intensity of each
active mode plotted against the laser energy (eV), read from the per-laser
<fname>_<nm>nm_raman_modes.dat files — which is the direct way to see the
resonance enhancement peak.
See also: Input and Script Generators CLI.
phonon_setup(supercell_matrix, primitive_matrix=None,
displacement_distance=0.01, q_mesh=None, q_path=None)Low-level initialiser (Stage 0). Converts the PAOFLOW structure into a phonopy
unit cell, stores the configuration and creates the phonopy.Phonopy object.
Most users call phonons() directly, which performs this setup internally.
phonons(supercell_matrix=None, primitive_matrix=None, displacement_distance=None,
forces=None, phonon_dir='phonon', pp_dir=None, prefix=None, kgrid=None,
ibrav=None, hubbard_file=None, hubbard_card=None,
nac=False, born_file=None, born=None, dielectric=None,
q_path=None, q_labels=None, q_npoints=101, mesh=None,
do_bands=True, do_dos=True, do_thermal=False,
t_min=0.0, t_max=1000.0, t_step=10.0, units='THz', fname='phonon')| Argument | Description |
|---|---|
supercell_matrix |
Supercell for the displacements: scalar (isotropic diagonal), length-3 (anisotropic diagonal) or 3×3 matrix. Required on the first call. |
primitive_matrix |
phonopy primitive transformation (None → identity, 'auto'/'P', or 3×3). |
displacement_distance |
Displacement amplitude in Bohr (default 0.01). |
forces |
None / 'qe' / FORCE_SETS path / (ndisp, natoms, 3) array — see force-source options. |
phonon_dir |
Sub-directory (under outputdir) for the supercells and FORCE_SETS. |
pp_dir |
Pseudopotential directory written into the QE inputs (default: the .save path). |
prefix |
QE prefix for the supercell runs. |
kgrid |
Explicit Monkhorst–Pack grid for the supercell (default: unit-cell grid scaled by the multiplicity). |
ibrav |
QE Bravais-lattice index used to derive the default high-symmetry q-path. |
hubbard_file / hubbard_card
|
DFT+U HUBBARD card to inject into the force inputs (on-site U only). See DFT+U. |
nac |
Apply the LO–TO / non-analytical correction (needs born_file, or born+dielectric). |
born_file |
phonopy BORN file with ε∞ and Z* (takes precedence over born/dielectric). |
born, dielectric
|
In-memory Z* (natom, 3, 3) and ε∞ (3, 3). |
q_path, q_labels, q_npoints
|
Custom dispersion path, tick labels and density. |
mesh |
q-mesh for DOS / thermal (default [20, 20, 20]). |
do_bands, do_dos, do_thermal
|
Property toggles. |
t_min, t_max, t_step
|
Temperature grid (K) for thermal properties. |
units |
'THz' (default) or 'cm-1'. |
fname |
Output filename prefix. |
born_charges(supercell_matrix=None, primitive_matrix=None, method='dfpt',
forces=None, phonon_dir='phonon', pp_dir=None, prefix=None,
outdir=None, kgrid=None, field_strength=0.001, nberrycyc=3,
hubbard_file=None, hubbard_card=None,
enforce_sum_rule=True, symmetrize=True)| Argument | Description |
|---|---|
method |
'dfpt' (ph.x, default) or 'field' (lelfield). |
forces |
None → write the QE input(s); 'qe' → harvest and write BORN. |
phonon_dir |
Sub-directory for the QE runs and the BORN file. |
pp_dir |
Pseudopotential directory (method='field' inputs). |
prefix |
QE prefix. For 'dfpt' defaults to the .save prefix so ph.x reuses it. |
outdir |
QE outdir for 'dfpt' (default: the directory containing the .save). |
kgrid |
Monkhorst–Pack grid for the primitive cell (method='field'). |
field_strength |
efield_cart magnitude in QE a.u. (method='field'; 1 a.u. = 36.3609×10¹⁰ V/m). |
nberrycyc |
Berry-phase cycles per SCF step (method='field'). |
hubbard_file / hubbard_card
|
DFT+U card for the method='field' inputs (on-site U only). |
enforce_sum_rule |
Impose Σ_κ Z*_κ = 0. |
symmetrize |
Symmetrize the Z* and ε∞ tensors. |
ir_spectrum(supercell_matrix=None, primitive_matrix=None, forces='qe',
phonon_dir='phonon', born_file=None, born=None, dielectric=None,
freq_min=None, freq_max=None, npoints=2000, gamma=4.0,
units='cm-1', fname='phonon')| Argument | Description |
|---|---|
supercell_matrix, primitive_matrix
|
As in phonons(); reused from a previous call when omitted. |
forces |
Force source for the harmonic force constants (zone-centre eigenvectors), as in phonons(). |
phonon_dir |
Sub-directory with the displaced supercells / FORCE_SETS and the BORN file. |
born_file |
phonopy BORN file with Z* (and ε∞); takes precedence over born. |
born, dielectric
|
In-memory Z* (natom, 3, 3) and ε∞ (3, 3). |
freq_min, freq_max
|
Frequency-axis limits of the broadened spectrum (in units). |
npoints |
Points on the broadened-spectrum grid. |
gamma |
Lorentzian FWHM (in units). |
units |
'cm-1' (default) or 'THz'. |
fname |
Output prefix; writes <fname>_ir_modes.dat and <fname>_ir_spectrum.dat. |
raman_spectrum(supercell_matrix=None, primitive_matrix=None, forces='qe',
phonon_dir='phonon', raman_dir='raman', delta=0.05, nbnd=None,
basispath=None, configuration='extended', pthr=0.95,
nonlocal_velocity=True, nfft=None, e_static=0.05,
method='static', lifetime=0.1, e_window=None, e_ne=None,
dielectric_callback=None, laser_nm=None, temperature=300.0,
freq_min=None, freq_max=None, npoints=2000, gamma=4.0,
units='cm-1', fname='phonon', generate=None)| Argument | Description |
|---|---|
supercell_matrix, primitive_matrix
|
As in phonons(); reused from a previous call when omitted. |
forces |
Force source for the harmonic force constants (optical eigenvectors), as in phonons(). |
phonon_dir |
Sub-directory with the displaced supercells / FORCE_SETS. |
raman_dir |
Sub-directory for the ±displaced primitive cells and their dielectric outputs. |
delta |
Mass-weighted normal-coordinate step (Bohr·√amu); also the finite-difference step. |
nbnd |
Bands for the displaced SCF inputs (empty states for the optical response). |
basispath |
Pseudo-atomic basis directory for the internal PAO projections (analyse phase). |
configuration |
PAO basis configuration (default 'extended'). |
pthr |
Projectability threshold (analyse phase). |
nonlocal_velocity |
Use the non-local velocity correction in the dielectric tensor (recommended). |
nfft |
Double-grid interpolation (n1, n2, n3) (optional). |
e_static |
Upper energy (eV) of the 2-point grid used to read ε₁ at ω → 0 (method='static'). |
method |
'static' (non-resonant Placzek), 'resonance' (finite-difference of the complex ε(ω_L)), or 'all' (both, harvested from one optics run per cell). |
lifetime |
Lorentzian lifetime broadening (eV) of ε(ω_L) in the resonance case (the delta of dielectric_tensor()). |
e_window |
Upper energy (eV) of the per-cell dielectric grid (resonance; default: just above the largest laser energy). |
e_ne |
Number of grid points for the per-cell dielectric grid (resonance; default: resolves lifetime). |
dielectric_callback |
f(savedir, workpath) returning the dielectric tensor; (3, 3) for method='static' or (len(laser_nm), 3, 3) complex for method='resonance'. Overrides the PAO pipeline (then basispath is unused). |
laser_nm |
Excitation wavelength(s) in nm. Enables the (ω_L − ω_ν)⁴ prefactor; required for method='resonance'. A list produces one spectrum per wavelength (<fname>_<nm>nm_raman_*.dat). |
temperature |
Temperature (K) for the Bose (n+1) Stokes factor. |
freq_min, freq_max, npoints, gamma, units, fname
|
Spectrum grid and output options, as in ir_spectrum(). Writes <fname>_raman_modes.dat and <fname>_raman_spectrum.dat. |
generate |
None (auto: analyse when every displaced-cell save exists), True (force generate), False (force analyse). |
vibrational_dielectric(supercell_matrix=None, primitive_matrix=None, forces='qe',
phonon_dir='phonon', born_file=None, born=None,
dielectric=None, gamma=4.0, freq_min=None, freq_max=None,
npoints=2000, units='cm-1', emit_ev=True,
emissivity=False, emis_angles=(0.0,), emis_ntheta=64,
emis_temperature=(300.0,), outdir='vibdielectric',
fname='phonon')| Argument | Description |
|---|---|
supercell_matrix, primitive_matrix
|
As in phonons(); reused from a previous call when omitted. |
forces |
Force source for the harmonic force constants (zone-centre eigenvectors), as in phonons(). |
phonon_dir |
Sub-directory with the displaced supercells / FORCE_SETS and the BORN file. |
born_file |
phonopy BORN file with Z* and ε∞; takes precedence over born/dielectric. |
born, dielectric
|
In-memory Z* (natom, 3, 3) and ε∞ (3, 3). Both are required (from a file, memory or a preceding born_charges() call). |
gamma |
Phonon linewidth / Lorentzian damping (in units); scalar (all modes) or per-mode array. |
freq_min, freq_max
|
Frequency-axis limits (in units); defaults span 0 to just above the highest LO mode (captures the reststrahlen band). |
npoints |
Points on the frequency grid. |
units |
'cm-1' (default) or 'THz'. |
emit_ev |
Write the eps{r,i}_<ab>.dat frequency axis in eV (so they plot directly with plot_optical); otherwise in units. |
emissivity |
Also derive the reststrahlen emissivity 1 − R (directional, spectral hemispherical and Planck-weighted total). |
emis_angles |
Incidence angles (deg) for the directional reflectivity/emissivity. |
emis_ntheta |
Polar-angle samples for the hemispherical integral. |
emis_temperature |
Temperature(s) (K) for the total hemispherical emissivity. |
outdir |
Sub-directory for the per-component ε(ω) (and emissivity) files. |
fname |
Output prefix; writes <fname>_vibdielectric_static.dat (ε∞, ionic, ε(0) + oscillator strengths). |
quasi_harmonic(supercell_matrix=None, primitive_matrix=None,
displacement_distance=None, nvolumes=5, strain=0.02,
forces=None, qha_dir='qha', pp_dir=None, prefix=None, kgrid=None,
hubbard_card=None, hubbard_file=None, mesh=None,
t_min=0.0, t_max=1000.0, t_step=10.0, eos='vinet', pressure=0.0,
ibrav=None, q_path=None, q_labels=None, q_npoints=101,
gruneisen_band=True, gruneisen_cutoff=None, units='THz', fname='qha')| Argument | Description |
|---|---|
supercell_matrix, primitive_matrix, displacement_distance
|
Finite-displacement settings, as in phonons(); required on the first call. |
nvolumes |
Number of sampled volumes: 5 (full EOS fit, default) or 3 (parabolic G(V; T) fit). |
strain |
Maximum linear strain of the scan; volumes span Ω·(1 ± strain)³ (default 0.02). |
forces |
None → write the per-volume QE inputs; 'qe' → harvest the outputs and run the QHA. |
qha_dir |
Sub-directory (under outputdir) holding the vol-NN directories. |
pp_dir, prefix, kgrid
|
QE-input settings, as in phonons(). |
hubbard_file / hubbard_card
|
DFT+U HUBBARD card injected into every QE input (on-site U only). |
mesh |
q-mesh for the per-volume thermal properties (default [20, 20, 20]). |
t_min, t_max, t_step
|
Temperature grid (K). |
eos |
Equation of state for nvolumes ≥ 4: 'vinet' (default), 'birch_murnaghan' or 'murnaghan'. |
pressure |
External pressure (GPa) added as a pV term. |
ibrav |
QE Bravais-lattice index used to derive the default q-path for the mode-Grüneisen dispersion. |
q_path, q_labels, q_npoints
|
Explicit dispersion path / labels / density for the Grüneisen band. |
gruneisen_band |
Also compute the mode-Grüneisen dispersion γ_qν(q) (default True). |
gruneisen_cutoff |
Frequency cutoff (in units) masking the acoustic 1/ω² divergence near Γ; None → 1 % of the max frequency, 0 → no masking. |
units |
Frequency units for the Grüneisen-band frequencies, 'THz' (default) or 'cm-1'. |
fname |
Output prefix (default qha); writes the <fname>_*.dat tables listed under Output files. |
MgO (rocksalt, ibrav=2, Mg + O) is a polar insulator and a clean test case for
the NAC, the vibrational dielectric and the reststrahlen emissivity. Starting
from a converged Mg1O1.save:
from PAOFLOW import PAOFLOW
p = PAOFLOW.PAOFLOW(workpath='.', outputdir='output', savedir='Mg1O1.save', verbose=True)
# 1. Displaced-supercell inputs (2x2x2).
p.phonons(supercell_matrix=2, displacement_distance=0.06, forces=None)
# ... run pw.x on output/phonon/supercell-*.in ...
# 2. Born charges + epsilon (DFPT).
p.born_charges(method='dfpt', forces=None)
# ... run ph.x on output/phonon/ph_epsil.in ...
p.born_charges(method='dfpt', forces='qe') # -> output/phonon/BORN
# 3. Dispersion with the LO-TO splitting.
p.phonons(supercell_matrix=2, forces='qe', ibrav=2,
nac=True, born_file='output/phonon/BORN',
mesh=[20, 20, 20], do_dos=True, units='cm-1')
# 4. Vibrational dielectric + reststrahlen emissivity (no new SCF runs).
p.vibrational_dielectric(supercell_matrix=2, forces='qe',
born_file='output/phonon/BORN',
gamma=4.0, units='cm-1',
emissivity=True, emis_temperature=(300.0, 1000.0))Reference values (good convergence): ε∞ ≈ 3.23, Z*(Mg) ≈ +2.00,
Z*(O) ≈ −2.00, Σ Z* ≈ 0. At Γ the NAC lifts the threefold-degenerate optical
mode into a doubly-degenerate TO branch and a higher LO branch (the LO–TO
splitting); without NAC the three optical modes are degenerate.
The vibrational dielectric gives ε∞ ≈ 3.23, an ionic contribution ≈ 7.87 and
hence a static ε(0) ≈ 11.1. The generalised LST ratio √(ε(0)/ε∞) ≈ 1.85
matches the experimental ω_LO/ω_TO ≈ 718/401 ≈ 1.79. The hemispherical
emissivity drops to ≈ 0.02 in the reststrahlen band (near-total reflection)
and recovers to ≈ 1 outside it, giving a total hemispherical emissivity of
≈ 0.32 at 300 K (≈ 0.38 at 1000 K).
| Symptom | Cause / fix |
|---|---|
ImportError: phonopy |
Install the extra: pip install -e ".[phonon]". |
| Analyse phase can't find forces |
supercell-*.out missing / pw.x didn't finish (JOB DONE). Re-run the run phase. |
| Displacements don't match between phases | The structure, displacement_distance or supercell_matrix changed between generate and analyse. Keep them identical. |
| No LO–TO splitting near Γ |
nac=True not set, or born_file missing/empty. Check that BORN was written. |
ph.x fails with DFT+U+V |
The DFPT electric-field response does not support intersite U+V. Use method='field' with hubbard_file=, or restrict to on-site U. |
| Optical frequencies too low | Supercell too small. Increase supercell_matrix (at the cost of more / larger pw.x runs). |
| Automatic q-path missing | Provide ibrav=, or install seekpath (in the phonon extra), or pass an explicit q_path/q_labels. |
| Grüneisen dispersion spikes near Γ | Expected acoustic 1/ω² divergence; raise gruneisen_cutoff (in the output units) or keep the auto default. |
| Grüneisen dispersion skipped | No ibrav and seekpath not installed. Pass ibrav/q_path to quasi_harmonic() or install seekpath. |
Failed to fit to "vinet" equation of states |
A four-parameter EOS needs ≥ 4 volumes. Use nvolumes=5, or nvolumes=3 (parabolic fit). |
Implemented today: the structure bridge (S0), the harmonic finite-displacement
workflow (S1), Born charges / ε∞ / LO–TO (S2), the IR spectrum (S3), the
non-resonant and independent-particle resonance Raman spectra (S4), and the
vibrational (ionic) dielectric ε(ω) with its reststrahlen emissivity (S5).
Planned next stages (see Phonon Module Plan):
-
Phono3py (fc3): anharmonic self-energy (
γ,Δ), lattice thermal conductivity, and the anharmonic (three-phonon) corrections beyond the quasi-harmonic mode-Grüneisen picture already provided byquasi_harmonic. -
Electron–phonon resonance Raman: beyond the independent-particle
method='resonance', the full Kramers–Heisenberg / excitonic (BSE) cross-section from electron–phonon matrix elements (raman_spectrum(method='elph')), adding vibronic progressions and overtones. -
Electron–phonon coupling: finite-difference
∂H/∂uof the real-space PAO Hamiltonian →g_{mn}^ν(k, q). -
DFT+U+V supercells: geometric remapping of intersite
Vpairs so the fullU+Vinteraction can be carried into the displaced supercells.