InterfaceMatch

class InterfaceMatch(surface_configuration_0, surface_configuration_1, surface_indices, layer_tolerance0, layer_tolerance1, strain_method)

This class represents an interface match as produced by the InterfaceBuilder. It can be used to generate an interface structure or queried to determine the properties (e.g. number of atoms or strain) of the match.

Parameters:
  • surface_configuration_0 (BulkConfiguration) – The bulk configuration representing the first (left) surface.

  • surface_configuration_1 (BulkConfiguration) – The bulk configuration representing the second (right) surface.

  • surface_indices (sequence of type int) – The 8 indices representing how the surface lattice vectors for each configuration should be repeated.

  • layer_tolerance0 (int) – Layers are detected by grouping atoms by their z-coordinates. Increase this tolerance to combine nearby off-lattice atoms into the same layer. Range: [-10, 4].
    Default: -10.

  • layer_tolerance1 (int) – Layers are detected by grouping atoms by their z-coordinates. Increase this tolerance to combine nearby off-lattice atoms into the same layer. Range: [-10, 4].
    Default: -10.

  • strain_method (StrainFirst | StrainSecond | StrainBoth) – The strain method that should be used.

configurations()
Returns:

The two surface configurations used to make the interface.

Return type:

list of type BulkConfiguration

layeredSurfaces()
Returns:

The two surface configurations with custom layers from makeInterface.

Return type:

list of type BulkConfiguration

makeInterface(displacement_vector=None, layers=None, use_periodic_supercell=None, quick_optimize=None, **kwargs)

Create an interface with the given number of layers on each side of the interface, optionally with a displacement between the two sides.

Parameters:
  • displacement_vector (PhysicalQuantity of type length | None) – This vector is added to the coordinates of the second surface configuration. The meaning of the displacement depends on the choice of displacement_vector_origin.
    Default: no displacement.

  • layers (sequence | None) – The start and end layer for both surface configurations. None means the start and end layer are unchanged.
    Default: None.

  • use_periodic_supercell (bool | None) – Ensure that the cell remains periodic when shifting in the C-direction.
    Default: False.

  • quick_optimize (bool) – If True, perform a quick optimization of the interface after its construction to ensure that atoms are adequately spaced from one another at the interface and cell boundaries. The operation is performed by treating the left and right interfaces as rigid bodies and optimizing a generic potential based on covalent radii between the two surfaces. Note that the displacement vector is applied on top of this optimization.
    Default: True.

  • displacement_vector_origin (Automatic | None) – DEPRECATED! Use ``quick_optimize=True`` for ``Automatic`` and ``quick_optimize=False`` for None. The origin of the displacement vector. The default value represents an arbitrary origin based on the relative position of the atoms in each cell. If Automatic is given then the origin (i.e. an all zero displacement) is calculated by treating the left and right interfaces as rigid bodies and optimizing a generic potential based on covalent radii between the two surfaces.
    Default: None.

Returns:

The interface configuration. The first layer atoms are tagged as “Left Interface” and the second layer is tagged as “Right Interface”.

Return type:

BulkConfiguration

meanAbsoluteStrain()
Returns:

The average of the absolute values of the three independent components of the engineering strain tensor.

Return type:

float

numberOfAtoms()
Returns:

The number of atoms in the configuration.

Return type:

int

score()
Returns:

A subjective score of the quality of the interface match. Structures that are both small and low in mean absolute strain score higher.

Return type:

float

strainMethod()
Returns:

The strain method.

Return type:

StrainFirst | StrainSecond | StrainBoth

strainTensor()
Returns:

The 2x2 engineering strain tensor that for the strained surface configuration (as determined by the strain_method).

Return type:

ndarray

surfaceIndices()
Returns:

The surface indices for this match.

Return type:

ndarray of type int

Usage Examples

This object is returned by the matches and bestMatch methods of InterfaceBuilder. See its reference manual entry for more details on how to create interfaces.