phonon_lifetime.cell package#
Package for manipulating and building a unit cell.
- class phonon_lifetime.cell.PrimitiveCell(*, masses: ndarray[tuple[int], dtype[floating]], symbols: list[str] | None = None, vectors: ndarray[tuple[int, int], dtype[floating]], atom_fractions: ndarray[tuple[int, int], dtype[floating]])#
Bases:
UnitCellRepresents the primitive cell of a defect free system.
- property 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.
- property masses: ndarray[tuple[int], dtype[floating]]#
Mass of the atoms in the unit cell.
- property symbols: list[str]#
Symbols of the atoms in the unit cell.
- property vectors: ndarray[tuple[int, int], dtype[floating]]#
The primitive cell vectors.
primitive_cell[i] is the vector (x, y, z) for the i’th lattice vector of the primitive cell.
- class phonon_lifetime.cell.SuperCell(primitive_cell: C, n_repeats: tuple[int, int, int])#
Bases:
UnitCell,GenericRepresents the supercell of a system.
- property atom_fractions: np.ndarray[__annotationlib_name_1__, np.dtype[np.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.
- property masses: np.ndarray[__annotationlib_name_1__, np.dtype[np.floating]]#
Mass of the atoms in the unit cell.
- property n_repeats: tuple[int, int, int]#
Get the number of repeats of the primitive cell in each direction.
- property primitive_cell: C#
Get the primitive cell of the system.
- property symbols: list[str]#
Symbols of the atoms in the unit cell.
- property vectors: np.ndarray[__annotationlib_name_1__, np.dtype[np.floating]]#
The primitive cell vectors.
primitive_cell[i] is the vector (x, y, z) for the i’th lattice vector of the primitive cell.
- class phonon_lifetime.cell.UnitCell#
Bases:
ABCRepresents the unit cell of a system.
- abstract property atom_fractions: np.ndarray[__annotationlib_name_1__, np.dtype[np.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 masses: np.ndarray[__annotationlib_name_1__, np.dtype[np.floating]]#
Mass of the atoms in the unit cell.
- property n_atoms: int#
Number of atoms in the cell.
- abstract property symbols: list[str]#
Symbols of the atoms in the unit cell.
- abstract property vectors: np.ndarray[__annotationlib_name_1__, np.dtype[np.floating]]#
The primitive cell vectors.
primitive_cell[i] is the vector (x, y, z) for the i’th lattice vector of the primitive cell.
- phonon_lifetime.cell.from_ase_atoms(atoms: Atoms) PrimitiveCell#
Convert an ASE Atoms object to a PrimitiveCell.
- phonon_lifetime.cell.get_atom_positions(cell: UnitCell) np.ndarray[__annotationlib_name_1__, np.dtype[np.floating]]#
Get the positions of the atoms in the cell.
- phonon_lifetime.cell.plot_xy(cell: UnitCell, displacement: ndarray[tuple[int, Literal[3]], dtype[floating]] | None = None, *, ax: Axes3D | None = None, bond_cutoff: float = inf) tuple[Figure, Axes3D, tuple[PathCollection, Line3DCollection]]#
- phonon_lifetime.cell.plot_xyz(cell: UnitCell, displacement: ndarray[tuple[int, Literal[3]], dtype[floating]] | None = None, *, ax: Axes3D | None = None, bond_cutoff: float = inf) tuple[Figure, Axes3D, tuple[PathCollection, Line3DCollection]]#
Submodules#
phonon_lifetime.cell.build module#
- type phonon_lifetime.cell.build.CubicStructure = Literal['simple', 'bcc', 'fcc']#
- phonon_lifetime.cell.build.cubic(*, mass: float, structure: CubicStructure, distance: float = 1.0) PrimitiveCell#
Build a simple cubic system.
- phonon_lifetime.cell.build.from_primitive(*, mass: float, primitive_cell: np.ndarray[__annotationlib_name_1__, np.dtype[np.float64]]) PrimitiveCell#
Build a system with a primitive cell.
- phonon_lifetime.cell.build.graphene(*, mass: float, distance: float = 2.46) PrimitiveCell#
Build a graphene system.