Add IR and Raman spectrum functionality
Add tools for computing IR and Raman spectra from TNEP dipole and polarizability output, along with the dielectric tensor and Kramers-Kronig relation.
New functionality
get_ir_spectrum— computes the IR spectrum from a dipole or polarization time seriesget_raman_spectrum— computes the Raman spectrum from a polarizability time series, with support for Porto notation polarization selectionget_dielectric_function— computes the full imaginary dielectric tensor from P(t) or dP/dt; supports Gaussian windowing, ACF truncation (max_lag), and polarization-projected output (replacesget_dielectric_function)apply_kramers_kronig— adds real part of the dielectric function via the KK relation; two implementations (O(n²) vectorized default, O(n log n) FFT variant)read_dipole,read_polarizability— readers for GPUMD dipole and polarizability output filesapply_quantum_correction— quantum correction factor for spectral intensities
Tutorials
- Training a TNEP model for the polarization (
tnep_polarization.ipynb) - Training a TNEP model for the susceptibility (
tnep_susceptibility.ipynb) - Predicting IR spectra (
predicting_ir_spectrum.ipynb) - Predicting Raman spectra (
predicting_raman_spectrum.ipynb) - Computing the dielectric function (
dielectric_function.ipynb)
API notes
- All spectrum functions use
max_lag(fraction of trajectory length,(0, 1]) instead of an integer sample count to control ACF truncation; defaults to 0.25 - Angular frequency output is in THz throughout
Edited by Paul Erhart