- class matlantis_features.features.phonon.utils.PhononFrequency(force_constant: ndarray, supercell: ndarray, unit_cell_atoms: Union[MatlantisAtoms, Atoms])#
-
Bases:
object
The class to calculate the phonon frequencies and modes from the force constant.
Methods
__init__
(force_constant, supercell, …)Initialize an instance.
get_frequency
(kpts[, unit])Calculate the phonon frequency for each k-point.
get_frequency_mode
(kpts[, unit])Calculate both the phonon frequency and the phonon mode for each k-point.
- __init__(force_constant: ndarray, supercell: ndarray, unit_cell_atoms: Union[MatlantisAtoms, Atoms])#
-
Initialize an instance.
- Parameters
-
-
force_constant (np.ndarray) – The force constant.
-
supercell (np.ndarray) – The supercell size used for the force constant
calculation. -
unit_cell_atoms (MatlantisAtoms or ASEAtoms) – The input primitive cell structure.
-
- get_frequency(kpts: ndarray, unit: str = ‘meV’) ndarray #
-
Calculate the phonon frequency for each k-point.
- Parameters
-
-
kpts (ndarray) – The phonon wavevectors (k-points), expected to be a 2D ndarray with shape (n,3).
-
unit (str, optional) – The unit of phonon frequency. Must be one of: ‘meV’, ‘eV’, ‘THz’
or ‘cm^-1’. Defaults to ‘meV’.
-
- Returns
-
The phonon frequency.
- Return type
-
ndarray
- Raises
-
-
ValueError – If the kpts input is not a (n, 3) 2D ndarray.
-
ValueError – If the unit is not one of the allowed values.
-
- get_frequency_mode(kpts: ndarray, unit: str = ‘meV’) Tuple[ndarray, ndarray] #
-
Calculate both the phonon frequency and the phonon mode for each k-point.
- Parameters
-
-
kpts (ndarray) – The phonon wavevectors (k-points), expected to be a 2D ndarray with shape (n,3).
-
unit (str, optional) – The unit of phonon frequency. Must be one of: ‘meV’, ‘eV’, ‘THz’
or ‘cm^-1’. Defaults to ‘meV’.
-
- Returns
-
The phonon frequency and the phonon mode.
- Return type
-
tuple[ndarray, ndarray]
- Raises
-
-
ValueError – If the kpts input is not a (n, 3) 2D ndarray.
-
ValueError – If the unit is not one of the allowed values.
-
Resource Library
matlantis_features.features.phonon.utils.PhononFrequency