lineshape_tools.phonon¶
Implements functionality for handling phonons.
Functions¶
|
Evaluate the inverse participation ratio. |
|
Compute smallest displacement vector between two sets of atoms. |
|
Compute smallest mass-weighted displacement vector between two sets of atoms. |
|
Compute the phonon frequencies and eigenvectors from a dynamical matrix. |
Module Contents¶
- lineshape_tools.phonon.get_ipr(U: numpy.ndarray) numpy.ndarray[source]¶
Evaluate the inverse participation ratio.
- Parameters:
U (np.ndarray) – matrix with phonon eigenvectors as columns (see np.linalg.eigh).
- lineshape_tools.phonon.get_disp_vect(atoms0: ase.atoms.Atoms, atoms1: ase.atoms.Atoms) numpy.ndarray[source]¶
Compute smallest displacement vector between two sets of atoms.
- Parameters:
atoms0 (Atoms) – first set of atoms
atoms1 (Atoms) – second set of atoms
- Returns:
3N dimensional displacement vector in Å
- Return type:
np.ndarray
- lineshape_tools.phonon.get_dq_vect(atoms0: ase.atoms.Atoms, atoms1: ase.atoms.Atoms) numpy.ndarray[source]¶
Compute smallest mass-weighted displacement vector between two sets of atoms.
- Parameters:
atoms0 (Atoms) – first set of atoms
atoms1 (Atoms) – second set of atoms
- Returns:
3N dimensional displacement vector in amu^{1/2} Å
- Return type:
np.ndarray
- lineshape_tools.phonon.get_phonons(
- dynmat: numpy.ndarray | pathlib.Path | str,
- acoustic_tol: float = 0.0005,
Compute the phonon frequencies and eigenvectors from a dynamical matrix.
- Parameters:
dynmat (np.ndarray | Path | str) – path to a dynamical matrix in .npz format or a np.ndarray corresponding to a dynamical matrix (shape 3N x 3N).
acoustic_tol (float) – tolerance (in eV) to determine acoustic phonon modes.
- Returns:
phonon frequencies (in eV/amu/Ang^2). U (np.ndarray): matrix with phonon eigenvectors as columns (see np.linalg.eigh).
- Return type:
omega (np.ndarray)