matcalc._interface module

Interface structure/energy calculations.

class InterfaceCalc(calculator: Calculator | str, *, relax_bulk: bool = True, relax_interface: bool = True, fmax: float = 0.1, optimizer: str | Optimizer = 'BFGS', max_steps: int = 500, relax_calc_kwargs: dict | None = None)[source]

Bases: PropCalc

This class generates all possible coherent interfaces between two bulk structures given their miller indices, relaxes them, and computes their interfacial energies.

Initialize the instance of the class.

Parameters:
  • calculator (Calculator | str) – An ASE calculator object used to perform energy and force calculations. If string is provided, the corresponding universal calculator is loaded.

  • relax_bulk (bool, optional) – Whether to relax the bulk structures before interface calculations. Defaults to True.

  • relax_interface (bool, optional) – Whether to relax the interface structures. Defaults to True.

  • fmax (float, optional) – The maximum force tolerance for convergence. Defaults to 0.1.

  • optimizer (str | Optimizer, optional) – The optimization algorithm to use. Defaults to “BFGS”.

  • max_steps (int, optional) – The maximum number of optimization steps. Defaults to 500.

  • relax_calc_kwargs – Additional keyword arguments passed to the RelaxCalc constructor for both bulk and interface. Default is None.

Returns:

None

_abc_impl = <_abc._abc_data object>[source]
calc(structure: Structure | Atoms | dict[str, Any]) dict[str, Any][source]

Calculate the interfacial energy of the given interface structures and sort by the energy.

Parameters:

structure – A dictionary containing the film, substrate, interface structures

Returns:

  • “interface” (Structure): The initial interface structure.

  • ”final_interface” (Structure): The relaxed interface structure.

  • ”interface_energy_per_atom” (float): The final energy of the relaxed interface structure.

  • ”num_atoms” (int): The number of atoms in the interface structure.

  • ”interfacial_energy” (float): The calculated interfacial energy

Return type:

dict

calc_interfaces(film_bulk: Structure, substrate_bulk: Structure, film_miller: tuple[int, int, int], substrate_miller: tuple[int, int, int], zslgen: ZSLGenerator | None = None, cib_kwargs: dict | None = None, **kwargs: Any) list[dict[str, Any]][source]

Calculate all possible coherent interfaces between two bulk structures.

Parameters:
  • film_bulk (Structure) – The bulk structure of the film material.

  • substrate_bulk (Structure) – The bulk structure of the substrate material.

  • film_miller (tuple[int, int, int]) – The Miller index for the film surface.

  • substrate_miller (tuple[int, int, int]) – The Miller index for the substrate surface.

  • zslgen (ZSLGenerator | None, optional) – An instance of ZSLGenerator to use for generating supercells.

  • zsl_kwargs (dict | None, optional) – Additional keyword arguments to pass to the ZSLGenerator.

  • cib_kwargs (dict | None, optional) – Additional keyword arguments to pass to the CoherentInterfaceBuilder.

  • **kwargs (Any) – Additional keyword arguments passed to calc_many.

Returns:

A list of dictionaries containing the calculated film, substrate, interface.

Return type:

dict