phonon_lifetime.system package#
System module.
- class phonon_lifetime.system.StrainSystem(cell: C, strain: ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[floating]], strain_repeats: tuple[int, int, int])#
Bases:
GenericRepresents a system for phonon calculations.
- property cell: C#
Get the cell of the system.
- property strain: ndarray[tuple[int, int, Literal[3], Literal[3]], dtype[floating]]#
Get the strain of the system.
- property strain_repeats: tuple[int, int, int]#
Get the strain repeats of the system.
- phonon_lifetime.system.as_supercell(strian_system: StrainSystem, n_repeats: tuple[int, int, int]) StrainSystem[SuperCell]#
Get the strain of the supercell.
- phonon_lifetime.system.plot_xy(system: StrainSystem, displacement: ndarray[tuple[int, Literal[3]], dtype[floating]] | None = None, *, ax: Axes3D | None = None, bond_cutoff: float = inf, scale_bond_lines: bool = True) tuple[Figure, Axes3D, tuple[PathCollection, Line3DCollection]]#
- phonon_lifetime.system.plot_xyz(system: StrainSystem, displacement: ndarray[tuple[int, Literal[3]], dtype[floating]] | None = None, *, ax: Axes3D | None = None, bond_cutoff: float = inf, scale_bond_lines: bool = True) tuple[Figure, Axes3D, tuple[PathCollection, Line3DCollection]]#
- phonon_lifetime.system.with_ase_forces(cell: C, *, periodic: tuple[bool, bool, bool] = (True, True, True), n_repeats: tuple[int, int, int] | None = None) StrainSystem#
Return a new StrainSystem with forces calculated using ASE.
Parameters#
- cell: C
The system to calculate forces for. The system should be a pristine system, or at least have a well defined primitive cell.
- periodic: tuple[bool, bool, bool]
Whether to apply periodic boundary conditions in each direction when calculating forces. This will affect which atoms are considered nearest neighbors.
- n_repeats: tuple[int, int, int] | None
The number of repeats to use when calculating forces. If None, will simulate the full system.
- phonon_lifetime.system.with_nearest_neighbor_forces(cell: C, spring_constant: float, *, cutoff: float = 2.46, periodic: tuple[bool, bool, bool] = (True, True, True)) StrainSystem#
Return a new PristineSystem with nearest neighbor forces added.
The forces are added in the form of a spring force between nearest neighbor, with the given spring constant. The cutoff is used to determine which atoms are considered nearest neighbor.
- phonon_lifetime.system.with_zero_forces(cell: C) StrainSystem#
Return a new StrainSystem with zero forces.