Skip to content

Planar faults

PlanarFaults finds the planar faults of fcc crystals, stacking faults and coherent twin boundaries, from the hcp-like atoms that polyhedral template matching finds in their {111} planes, and estimates their areas. It gives the same types as OVITO's Identify fcc planar faults, atom by atom.

import numpy as np
from mdapy.build import build_crystal, slip
from mdapy.identify import PlanarFaults
from mdapy.transform import replicate

# fcc copper with z along [111], slipped by a/6 [11-2] above one plane
a = 3.615
cell = build_crystal(
    "fcc", a, elements="Cu", orientation=[(1, -1, 0), (1, 1, -2), (1, 1, 1)]
)
crystal = replicate(cell, (6, 4, 8))
faulted = slip(crystal, [0, a / np.sqrt(6), 0], height=0.51)

result = PlanarFaults().compute(faulted)
result.counts()["intrinsic stacking fault"]  # 96: two planes of 48 atoms
result.areas()["intrinsic stacking fault"]  # 271.6 Ų, the area of the box
faulted = faulted.with_columns(result)  # planar_fault

An intrinsic and an extrinsic stacking fault and a twin in one crystal, made by slipping above chosen (111) planes:

from mdapy.visualization import render

crystal = replicate(cell, (6, 4, 20))  # 60 (111) planes
b = [0, a / np.sqrt(6), 0]
faults = slip(crystal, b, height=10.5 / 60)  # intrinsic
for plane in (25.5, 26.5):  # extrinsic: two neighboring planes
    faults = slip(faults, b, height=plane / 60)
for plane in range(6):  # a twin six planes thick: six planes in a row
    faults = slip(faults, b, height=(40.5 + plane) / 60)

found = PlanarFaults(extrinsic=True).compute(faults)
colors = np.asarray(found.colors)[found.fault]
render(
    faults,
    "images/planar-faults.png",
    color=colors,
    view="left",
    width=600,
    height=900,
    legend=dict(zip(found.names, found.colors)),
)

Planar faults

Seen along x. From the bottom: the intrinsic stacking fault (orange, two planes), the extrinsic stacking fault (purple, two planes with one fcc plane between) and the two coherent twin boundaries (blue) around the twin, whose rows of atoms turn the other way.

Parameters

PlanarFaults(structures=("fcc", "hcp", "bcc"), *, rmsd_cutoff=0.1, extrinsic=False)

Name Type Default Unit Meaning
structures iterable of str ("fcc", "hcp", "bcc") the structures polyhedral template matching looks for, fcc and hcp among them
rmsd_cutoff float64 0.1 atoms that deviate more from their best template are other; 0 for no cutoff
extrinsic bool False also find extrinsic stacking faults, which are otherwise two coherent twin boundaries

compute(system, *, ptm=None, neighbors=None, progress=None, cancel=None) runs polyhedral template matching, or takes a PTMResult of the same system already computed with template_neighbors=True; neighbors, progress and cancel are those of every analysis.

Results

A PlanarFaultResult:

Attribute or method Type Meaning
fault (N,) int8 the type of each atom, an index into names
names tuple of str non-hcp, other hcp, intrinsic stacking fault, coherent twin boundary and multilayer stacking fault, numbered as in OVITO, and extrinsic stacking fault
colors tuple of (3,) float64 OVITO's colors of the types
interatomic_distance (N,) float64 the distance in Å between nearest neighbors of the lattice each atom matched
counts() dict of str to int64 the number of atoms of each type
areas() dict of str to float64 the area in Ų of the intrinsic stacking faults, the coherent twin boundaries and the extrinsic stacking faults

The column is planar_fault.

Errors

The constructor raises InvalidParameter for structures without fcc and hcp, or a negative RMSD cutoff; compute raises it for a PTMResult of another system or without the neighbors in the order of the templates.

Definition

An hcp-like atom has six neighbors in its basal plane, a {111} plane of the fcc crystal, and three above and three below it. Two hcp-like atoms one above the other are stacked, their basal planes parallel, unless an atom lies in both their basal planes. Each hcp-like atom is first classified by its hcp-like neighbors in its basal plane, those stacked above and below it, and its fcc neighbors above and below:

  • stacked hcp-like neighbors on one side only: an intrinsic stacking fault, two planes of hcp-like atoms;
  • no stacked hcp-like neighbors, at least one hcp-like neighbor in the basal plane and fcc neighbors on both sides: a coherent twin boundary, one plane;
  • stacked hcp-like neighbors on both sides: a multilayer stacking fault, three planes or more;
  • otherwise other hcp, an hcp-like atom of no planar fault.

A second pass then goes through the hcp-like atoms in the order of their indices, as OVITO does, and changes the types as it goes: a twin-boundary or other atom whose hcp-like basal neighbors include stacking-fault atoms and no twin-boundary atoms becomes a stacking-fault atom, and the other way round; the stacking-fault atoms stacked on a multilayer atom become multilayer atoms. Atoms at the edges of faults, next to partial dislocations, may thus depend on the order of the atoms.

With extrinsic, a last pass makes extrinsic stacking faults of the twin-boundary atoms next to a single plane of fcc atoms between two planes of hcp-like atoms: a twin-boundary atom with an fcc neighbor above or below that has at least five hcp-like and five fcc neighbors, as an fcc atom with six hcp-like neighbors in the planes above and below it and six fcc neighbors in its own plane has. An extrinsic stacking fault, a plane inserted into the stacking, is such a twin of two planes. This pass reads the types the others left and does not depend on the order of the atoms.

The area of an atom in a {111} plane is \(\tfrac{\sqrt3}{2}d^2\), with \(d\) the interatomic distance; a stacking fault is two planes of atoms, a twin boundary one, an extrinsic stacking fault two:

\[ A_\mathrm{ISF} = \frac{\sqrt3}{4}\sum_{i \in \mathrm{ISF}} d_i^2, \qquad A_\mathrm{TB} = \frac{\sqrt3}{2}\sum_{i \in \mathrm{TB}} d_i^2, \qquad A_\mathrm{ESF} = \frac{\sqrt3}{4}\sum_{i \in \mathrm{ESF}} d_i^2 . \]

Adjacent faults of different kinds can look alike: a multilayer stacking fault may be several stacking faults or twin boundaries on neighboring planes.

See also