pymatgen.analysis.interfaces.coherent_interfaces module

This module provides classes to store, generate, and manipulate material interfaces.

class CoherentInterfaceBuilder(substrate_structure: Structure, film_structure: Structure, film_miller: tuple[int, int, int], substrate_miller: tuple[int, int, int], zslgen: ZSLGenerator | None = None)[source]

Bases: object

This class constructs the coherent interfaces between two crystalline slabs Coherency is defined by matching lattices not sub-planes.

  • substrate_structure – structure of substrate

  • film_structure – structure of film

  • film_miller – miller index of the film layer

  • substrate_miller – miller index for the substrate layer

  • zslgen – BiDirectionalZSL if you want custom lattice matching tolerances for coherency

get_interfaces(termination: tuple[str, str], gap: float = 2.0, vacuum_over_film: float = 20.0, film_thickness: float | int = 1, substrate_thickness: float | int = 1, in_layers: bool = True) Iterator[Interface][source]

Generates interface structures given the film and substrate structure as well as the desired terminations

  • termination (tuple[str, str]) – termination from self.termination list

  • gap (float, optional) – gap between film and substrate. Defaults to 2.0.

  • vacuum_over_film (float, optional) – vacuum over the top of the film. Defaults to 20.0.

  • film_thickness (float | int, optional) – the film thickness. Defaults to 1.

  • substrate_thickness (float | int, optional) – substrate thickness. Defaults to 1.

  • in_layers (bool, optional) – set the thickness in layer units. Defaults to True.


Iterator[Interface] – interfaces from slabs

from_2d_to_3d(mat: ndarray) ndarray[source]

Converts a 2D matrix to a 3D matrix

get_2d_transform(start: Sequence, end: Sequence) ndarray[source]

Gets a 2d transformation matrix that converts start to end

get_rot_3d_for_2d(film_matrix, sub_matrix) ndarray[source]

Finds a transformation matrix that will rotate and strain the film to the substrate while preserving the c-axis