# pymatgen.analysis.interfaces.coherent_interfaces module

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

class CoherentInterfaceBuilder(substrate_structure: pymatgen.core.structure.Structure, film_structure: pymatgen.core.structure.Structure, film_miller: Tuple[int, int, int], substrate_miller: Tuple[int, int, int], zslgen: Optional[pymatgen.analysis.interfaces.zsl.ZSLGenerator] = None)

  Bases: `object`

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

  Parameters

    - 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: Union[float, int] = 1, substrate_thickness: Union[float, int] = 1, in_layers: bool = True) → Iterator[pymatgen.core.interface.Interface]

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

    Parameters

      - terminations – termination from self.termination list

      - gap – gap between film and substrate

      - vacuum_over_film – vacuum over the top of the film

      - film_thickness – the film thickness

      - substrate_thickness – substrate thickness

      - in_layers – set the thickness in layer units

from_2d_to_3d(mat: numpy.ndarray) → numpy.ndarray

  Converts a 2D matrix to a 3D matrix

get_2d_transform(start: numpy.ndarray, end: numpy.ndarray) → numpy.ndarray

  Gets a 2d transformation matrix that converts start to end

get_rot_3d_for_2d(film_matrix, sub_matrix) → numpy.ndarray

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