xnn.common.models.vibrations.harmonic_analysis#

xnn.common.models.vibrations.harmonic_analysis(hessian, positions, masses=None, atomic_numbers=None, linear_tolerance=1e-05)[source]#

Harmonic frequencies, normal modes and zero-point energy of one structure.

The Hessian is symmetrized and mass-weighted. Translations and rotations (about the center of mass) are projected out, and the remaining 3 n - 6 vibrations (3 n - 5 for a linear molecule, detected from the moments of inertia) are found by diagonalizing the Hessian in their space. The result is differentiable with respect to hessian.

Parameters:
  • hessian (Tensor) – The Hessian (3 n, 3 n) in eV / Angstrom^2 (as from hessian()).

  • positions (Tensor) – The positions (n, 3) in Angstrom.

  • masses (Tensor, optional) – The atomic masses (n,) in u.

  • atomic_numbers (Tensor, optional) – The atomic numbers (n,), for the standard atomic weights when masses is not given.

  • linear_tolerance (float, optional) – A molecule is linear when its smallest principal moment of inertia is below this fraction of the largest; default 1e-5.

Returns:

frequencies

Harmonic wavenumbers (n_vib,) in cm^-1, ascending; imaginary ones as negative numbers.

eigenvalues

The eigenvalues of the projected mass-weighted Hessian (n_vib,) in eV / (Angstrom^2 u).

modes

The normal modes (n_vib, n, 3), orthonormal in mass-weighted coordinates.

displacements

The modes in Cartesian coordinates (modes divided by the square roots of the masses): d . H d is the mode’s eigenvalue.

zero_point_energy

h c / 2 times the sum of the real wavenumbers, in eV.

mass_weighted_hessian, projected_hessian

The mass-weighted Hessian before and after the projection (3 n, 3 n).

linear

Whether the molecule was taken as linear.

Return type:

dict