phonon_lifetime package#

An Example project.

class phonon_lifetime.NormalMode#

Bases: ABC

Represents a normal mode of the system.

abstract property omega: float#

The frequency of the mode.

abstract property system: System#

The system that this normal mode belongs to.

abstract property vector: ndarray[tuple[int, int], dtype[complex128]]#

The vector of the mode.

class phonon_lifetime.NormalModeResult#

Bases: ABC

Result of a normal mode calculation for a phonon system.

get_all_modes() list[NormalMode]#

Get all the normal modes in the calculation.

abstractmethod get_mode(branch: int, q: int | tuple[int, int, int]) NormalMode#

Get the normal mode for a given branch and q point.

abstract property n_branch: int#

The number of branches in the calculation.

abstract property n_q: int#

The number of q points in the calculation.

class phonon_lifetime.PristineMode(*, _system: System, _omega: float, _primitive_vector: ndarray, _q_val: ndarray)#

Bases: NormalMode

A normal mode of a pristine system.

property omega: float#

The frequency of the mode.

property primitive_vector: ndarray[tuple[int], dtype[complex128]]#

The primitive vector of the mode.

property system: System#

The system that this normal mode belongs to.

property vector: ndarray[tuple[int, int], dtype[complex128]]#

The vector of the mode.

class phonon_lifetime.PristineNormalModeResult(*, system: System, omega: ndarray[Any, dtype[floating]], modes: ndarray[Any, dtype[floating]], q_vals: ndarray[Any, dtype[floating]])#

Bases: NormalModeResult

Result of a normal mode calculation for a phonon system.

get_mode(branch: int, q: int | tuple[int, int, int]) PristineMode#

Get the normal mode for a given branch and q point.

property n_branch: int#

The number of branches in the calculation.

property n_q: int#

The number of q points in the calculation.

class phonon_lifetime.System(*, element: str, primitive_cell: ndarray[tuple[int, int], dtype[floating]], spring_constant: tuple[float, float, float], n_repeats: tuple[int, int, int] = (1, 1, 1))#

Bases: object

Represents a System of atoms.

element: str#
property n_atoms: int#

Number of atoms in the system.

n_repeats: tuple[int, int, int] = (1, 1, 1)#
primitive_cell: ndarray[tuple[int, int], dtype[floating]]#
spring_constant: tuple[float, float, float]#
property supercell_cell: ndarray[tuple[int, int], dtype[floating]]#

Get the supercell lattice vectors.

supercell_cell[i] is the vector (x, y, z) for the i’th lattice vector of the supercell.

class phonon_lifetime.VacancyMode(*, _system: System, _omega: float, _modes: ndarray, _defect: VacancyDefect)#

Bases: NormalMode

A normal mode of a system with a vacancy.

property omega: float#

The frequency of the mode.

property system: System#

The system that this normal mode belongs to.

property vector: ndarray[tuple[int, int], dtype[complex128]]#

The vector of the mode.

class phonon_lifetime.VacancyNormalModeResult(*, system: System, omega: ndarray[Any, dtype[floating]], modes: ndarray[Any, dtype[floating]], _defect: VacancyDefect)#

Bases: NormalModeResult

Result of a normal mode calculation for a vacancy system.

get_mode(branch: int, q: int | tuple[int, int, int]) NormalMode#

Get the normal mode for a given branch and q point.

property n_branch: int#

The number of branches in the calculation.

property n_q: int#

The number of q points in the calculation.

Subpackages#

Submodules#

phonon_lifetime.system module#

class phonon_lifetime.system.System(*, element: str, primitive_cell: ndarray[tuple[int, int], dtype[floating]], spring_constant: tuple[float, float, float], n_repeats: tuple[int, int, int] = (1, 1, 1))#

Bases: object

Represents a System of atoms.

element: str#
property n_atoms: int#

Number of atoms in the system.

n_repeats: tuple[int, int, int] = (1, 1, 1)#
primitive_cell: ndarray[tuple[int, int], dtype[floating]]#
spring_constant: tuple[float, float, float]#
property supercell_cell: ndarray[tuple[int, int], dtype[floating]]#

Get the supercell lattice vectors.

supercell_cell[i] is the vector (x, y, z) for the i’th lattice vector of the supercell.

phonon_lifetime.system.get_atom_centres(system: System) ndarray[tuple[int, int], dtype[floating]]#

Get the centres of the atoms in the system.

phonon_lifetime.system.get_scaled_positions(system: System) ndarray[tuple[int, Literal[3]], dtype[floating]]#

Get the scaled positions of the atoms in the system.

This gives the fraction along each of the ith lattice vector of the supercell.