# spectrum¶

psi4.driver.p4util.spectrum(*, poles, residues, kind='opa', lineshape='gaussian', gamma=0.2, npoints=5000, out_units='nm')[source]

One-photon absorption (OPA) or electronic circular dichroism (ECD) spectra with phenomenological line broadening.

This function gives arrays of values ready to be plotted as OPA spectrum:

$\varepsilon(\omega) = \frac{4\pi^{2}N_{\mathrm{A}}\omega}{3\times 1000\times \ln(10) (4 \pi \epsilon_{0}) n \hbar c} \sum_{i \rightarrow j}g_{ij}(\omega)|\mathbf{\mu}_{ij}|^{2}$

or ECD spectrum:

$\Delta\varepsilon(\omega) = \frac{16\pi^{2}N_{\mathrm{A}}\omega}{3\times 1000\times \ln(10) (4 \pi \epsilon_{0}) n \hbar c^{2}} \sum_{i \rightarrow j}g_{ij}(\omega)\Im(\mathbf{\mu}_{ij}\cdot\mathbf{m}_{ij})$

in macroscopic units of $$\mathrm{L}\cdot\mathrm{mol}^{-1}\cdot\mathrm{cm}^{-1}$$. The lineshape function $$g_{ij}(\omega)$$ with phenomenological broadening $$\gamma$$ is used for the convolution of the infinitely narrow results from a linear response calculation.

Parameters:
• poles (Union[List[float], ndarray]) – Poles of the response function, i.e. the excitation energies. These are expected in atomic units of angular frequency.

• residues (Union[List[float], ndarray]) – Residues of the linear response functions, i.e. transition dipole moments (OPA) and rotatory strengths (ECD). These are expected in atomic units.

• kind (str) – {“opa”, “ecd”} Which kind of spectrum to generate, one-photon absorption (“opa”) or electronic circular dichroism (“ecd”). Default is opa.

• lineshape (str) – {“gaussian”, “lorentzian”} The lineshape function to use in the fitting. Default is gaussian.

• gamma (float) – Full width at half maximum of the lineshape function. Default is 0.2 au of angular frequency. This value is expected in atomic units of angular frequency.

• npoints (int) – How many points to generate for the x axis. Default is 5000.

• out_units (str) –

Units for the output array x, the x axis of the spectrum plot. Default is wavelengths in nanometers. Valid (and case-insensitive) values for the units are:

• au atomic units of angular frequency

• Eh atomic units of energy

• eV

• nm

• THz

Returns:

spectrum – The fitted electronic absorption spectrum, with units for the x axis specified by the out_units parameter. This is a dictionary containing the convoluted (key: convolution) and the infinitely narrow spectra (key: sticks).

{"convolution": {"x": np.ndarray, "y": np.ndarray},
"sticks": {"poles": np.ndarray, "residues": np.ndarray}}


Return type:

Dict[str, numpy.ndarray]

Notes

• Conversion of the broadening parameter $$\gamma$$. The lineshape functions are formulated as functions of the angular frequency $$\omega$$. When converting to other physical quantities, the broadening parameter has to be modified accordingly. If $$\gamma_{\omega}$$ is the chosen broadening parameter then:

• Wavelength: $$gamma_{\lambda} = \frac{\lambda_{ij}^{2}}{2\pi c}\gamma_{\omega}$$

• Frequency: $$gamma_{\nu} = \frac{\gamma_{\omega}}{2\pi}$$

• Energy: $$gamma_{E} = \gamma_{\omega}\hbar$$

References

A. Rizzo, S. Coriani, K. Ruud, “Response Function Theory Computational Approaches to Linear and Nonlinear Optical Spectroscopy”. In Computational Strategies for Spectroscopy. https://doi.org/10.1002/9781118008720.ch2