Skip to content

Phono3py Displacement

Phono3pyDisplacementTransformation

Phono3pyDisplacementTransformation()

Generates displaced structures for Phono3py calculations.

Creates supercells with atomic displacements for both second- and third-order force constants.

Initializes the Phono3pyDisplacementTransformation object.

apply_transformation

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

Generate displaced supercells for Phono3py calculations.

Parameters:

Name Type Description Default
structure Structure

The input structure to be used for generating displacements.

required
distance float

The maximum atomic displacement distance. Defaults to 0.03.

0.03
supercell_matrix list

The supercell matrix for third-order force constant calculations. Defaults to a 2x2x2 supercell.

None
primitive_matrix list | str

The primitive matrix for the supercell. Defaults to 'auto'.

'auto'
phonon_supercell_matrix list

The supercell matrix for second-order force constant calculations. Defaults to a 3x3x3 supercell.

None
log_level int

The log level for Phono3py. Defaults to 0.

0
**kwargs Any

Additional keyword arguments for Phono3py.generate_displacements and Phono3py.generate_fc2_displacements (e.g. is_diagonal, fc2_is_diagonal, is_plusminus, number_of_snapshots, random_seed, max_distance). See _get_displaced_structures for details.

{}

Returns:

Type Description
dict[str, Any]

dict[str, Phono3py | list[Structure]]: Dictionary with keys: - phonon: The Phono3py object used to generate the displacements. - phonon_supercells_with_displacements: Displaced supercells for phonon (second-order) force constant calculations. - supercells_with_displacements: Displaced supercells for third-order force constant calculations. - phonon_displacements: The atomic displacements for the phonon supercells. - supercell_displacements: The atomic displacements for the third-order force-constant supercells.