phonon_lifetime package#
An Example project.
- class phonon_lifetime.System#
Bases:
ABCRepresents a System of atoms.
- abstractmethod as_pristine() PristineSystem#
Return a new System with no defects.
- get_mode(idx: int) NormalMode[__annotationlib_name_1__]#
Get the normal mode for a given index.
- abstractmethod get_modes() NormalModes[__annotationlib_name_1__]#
Get the normal modes of the system.
- abstract property masses: ndarray[tuple[int], dtype[floating]]#
Mass of every atom in the system.
- property n_atoms: int#
Number of atoms in the system.
- abstract property n_primitive_atoms: int#
Number of atoms in the primitive cell.
- abstract property n_repeats: tuple[int, int, int]#
Number of repeats of the primitive cell in each direction (nx, ny, nz).
- abstract property primitive_atom_fractions: ndarray[tuple[int, int], dtype[floating]]#
The positions of the atoms as a fraction of the primitive cell.
primitive_atom_positions[i] is the position (x, y, z) of the i’th atom in the primitive cell.
- abstract property primitive_cell: ndarray[tuple[int, int], dtype[floating]]#
Primitive cell lattice vectors.
primitive_cell[i] is the vector (x, y, z) for the i’th lattice vector of the primitive cell.
- abstract property strain_tensor: ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[float64]]#
Strain tensor matrix for the system.
strain_tensor[i, j, alpha, beta] is the force constant between the i’th and j’th atom in the system, for each pair of cartesian directions (alpha, beta).
- abstract property symbols: list[str]#
Chemical symbol of every atom in the system.
Subpackages#
- phonon_lifetime.defect package
- phonon_lifetime.modes package
- phonon_lifetime.pristine package
PristineModePristineModesPristineSystemPristineSystem.as_pristine()PristineSystem.get_modes()PristineSystem.massesPristineSystem.n_primitive_atomsPristineSystem.n_repeatsPristineSystem.primitive_atom_fractionsPristineSystem.primitive_cellPristineSystem.primitive_massesPristineSystem.primitive_strainPristineSystem.primitive_symbolsPristineSystem.strain_tensorPristineSystem.symbolsPristineSystem.with_strain()
plot_dispersion_1d()plot_dispersion_2d_xy()with_ase_forces()with_nearest_neighbor_forces()
- phonon_lifetime.system package
Submodules#
phonon_lifetime.forces module#
- class phonon_lifetime.forces.PristineStrainTensor(*, data: ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[float64]], n_repeats: tuple[int, int, int])#
Bases:
objectRepresents the strain tensor for a system of atoms.
- calculate_full_tensor(n_repeats: tuple[int, int, int]) ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[float64]]#
Return the full strain tensor for a system with shape (n_repeats).
- calculate_pristine_tensor(n_repeats: tuple[int, int, int]) ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[float64]]#
Return the pristine strain tensor for a system with shape (n_repeats).
- data: ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[float64]]#
- property n_primitive_atoms: int#
Number of atoms in the primitive cell.
- n_repeats: tuple[int, int, int]#
- phonon_lifetime.forces.zero_strain_tensor(n_primitive_atoms: int) PristineStrainTensor#
Return a zero strain tensor.
phonon_lifetime.lifetimes module#
- phonon_lifetime.lifetimes.calculate_decay_rates(pristine: NormalModes, defects: NormalModes, *, time: float) ndarray[tuple[int], dtype[float64]]#
Get the decay rate of each pristine state after a time t.
The transition rate according to first-order perturbation theory is given by Fermi’s Golden Rule: Gamma_i = sum_k |<p_k|V|p_i>|^2 / hbar^2 * [ 4 sin^2((omega_k - omega_i) * t / 2) / ((omega_k - omega_i) * t)^2 ] where |p_i> is the pristine state, |d_k> are the defect states. In the limit of t -> infinity, this reduces to the standard Fermi’s Golden Rule with a delta function enforcing energy conservation.
- phonon_lifetime.lifetimes.calculate_finite_time_rates(pristine: NormalModes, defects: NormalModes, *, t: float) ndarray[tuple[int], dtype[float64]]#
Calculate the finite-time decay rates of the pristine states after time t.
- phonon_lifetime.lifetimes.calculate_survival_probabilities(pristine: NormalModes, defects: NormalModes, *, times: ndarray[tuple[int], dtype[float64]]) ndarray[tuple[int], dtype[float64]]#
Get the survival probability of each pristine state after a time t.
returns an array of shape (n_pristine, n_times) where each element is the probability that the pristine state has not decayed after time t.
- phonon_lifetime.lifetimes.calculate_survival_probability(pristine: NormalMode, defects: NormalModes, *, times: ndarray[tuple[int], dtype[float64]]) ndarray[tuple[int], dtype[float64]]#
Get the survival probability of a pristine state after a time t.
returns an array of shape (n_times) where each element is the probability that the pristine state has not decayed after time t.
- phonon_lifetime.lifetimes.get_first_order_scatter(pristine: NormalModes, defects: NormalModes) ndarray[tuple[int, int], dtype[complex128]]#
Calculate the first-order scattering matrix element <p_k|V|p_i>.
- phonon_lifetime.lifetimes.get_state_overlap(pristine: NormalMode, defects: NormalModes) ndarray[tuple[int], dtype[complex128]]#
Calculate the overlap matrix S_ki = <d_k | p_i>.
- phonon_lifetime.lifetimes.get_state_overlap_matrix(pristine: NormalModes, defects: NormalModes) ndarray[tuple[int, int], dtype[complex128]]#
Calculate the overlap matrix S_ki = <d_k | p_i>.
- phonon_lifetime.lifetimes.plot_first_order_scatter(pristine: NormalModes, defects: NormalModes, pristine_idx: int, *, ax: Axes | None = None) tuple[Figure, Axes, Line2D]#
Plot the first-order scattering matrix element <p_k|V|p_i> against the defect frequencies.
for a pristine state |psi_i>, the first-order scattering with a defect mode k is given by $S_(omega_k)^i = |<bar{psi}_k|V|psi_i>|^2$ where omega_k is the frequency of the defect mode k.
- phonon_lifetime.lifetimes.plot_first_order_scatter_against_qx(pristine: PristineModes, defects: NormalModes, pristine_idx: int, *, ax: Axes | None = None) tuple[Figure, Axes, Line2D]#
Plot the first-order scattering matrix element <p_k|V|p_i> against the defect frequencies.
for a pristine state |psi_i>, the first-order scattering with a defect mode k is given by $S_(omega_k)^i = |<bar{psi}_k|V|psi_i>|^2$ where omega_k is the frequency of the defect mode k.
- phonon_lifetime.lifetimes.plot_overlap_weights(pristine: NormalModes, defects: NormalModes, pristine_idx: int, *, ax: Axes | None = None) tuple[Figure, Axes, Line2D]#
Plot the overlap weights of a pristine state with the defect states against the defect frequencies.
for a pristine state |psi_i>, the overlap weight with a defect mode k is given by $W_(omega_k)^i = |<bar{psi}_k|psi_i>|^2$ where omega_k is the frequency of the defect mode k.
- phonon_lifetime.lifetimes.plot_survival_probability(pristine: NormalMode, defects: NormalModes, times: ndarray[tuple[int], dtype[float64]], *, ax: Axes | None = None) tuple[Figure, Axes, Line2D]#
Plot the survival probabilities of the pristine states after time t.
phonon_lifetime.wannier module#
- phonon_lifetime.wannier.plot_wannier_vector(modes: NormalModes, idx: int = 0, *, ax: Axes | None = None) tuple[Figure, Axes]#
Plot the Wannier vectors of the system.