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