Skip to content

Phonopy Displacement

PhonopyDisplacementTransformation

Generates displaced structures for Phonopy calculations.

Creates supercells with atomic displacements for computing phonon spectra, thermal conductivity, and other lattice-dynamical properties.

apply_transformation

apply_transformation(
    structure: Structure,
    distance: float = 0.01,
    supercell_matrix: list | None = None,
    primitive_matrix: list | str | None = "auto",
    log_level: int = 0,
    **kwargs: Any,
) -> dict[str, Any]

Generate displaced supercells for Phonopy calculations.

Parameters:

Name Type Description Default
structure Structure

The input structure to be displaced.

required
distance float

The maximum atomic displacement distance. Defaults to 0.01.

0.01
supercell_matrix list

The supercell matrix to generate supercells for phonon calculations. Defaults to a 2x2x2 supercell.

None
primitive_matrix list | str

The primitive matrix to generate the primitive cell. Defaults to "auto", which detects the primitive cell from crystal symmetry. Pass "P" to use the input structure as is (identity transformation).

'auto'
log_level int

The log level for Phonopy. Defaults to 0.

0
**kwargs Any

Additional keyword arguments for the Phonopy.generate_displacement method.

{}

Returns:

Type Description
dict[str, Any]

dict[str, Phonopy | list[Structure] | np.ndarray | list]: Dictionary with keys: - phonon: The Phonopy object used to generate the displaced structures. - displaced_structures: The list of displaced structures for phonon calculations. - displacements: The displacement vectors used to generate the displaced structures.