vibe-sketcherDocumentation

vibesketcher.document.grain_boundaries

Symmetric tilt grain boundaries in cubic crystals: CSL bicrystals (#197).

A symmetric tilt boundary on the plane (hkl), tilted about an axis [uvw] in that plane (u h + v k + w l = 0), is built as a bicrystal whose second grain is the mirror image of the first in the boundary plane. In a centrosymmetric crystal the mirror image is the first grain rotated by 180 degrees about the boundary normal, so both grains are the same crystal and the boundary is a coincidence-site-lattice (CSL) boundary. Its Sigma is the least common denominator of the rotation in the cubic basis (Grimmer, Acta Cryst. A30, 685 (1974), doi:10.1107/S0567739474001719); for the 180 degree rotation about [hkl], R = 2 n n^T / N - I with N = h^2 + k^2 + l^2, which gives the odd part of N. The same misorientation is the tilt by theta about [uvw] found among the 24 cubic rotations; theta agrees with Ranganathan’s Sigma = m^2 + N_axis n^2, theta = 2 atan(n sqrt(N_axis) / m) (Acta Cryst. 21, 197 (1966), doi:10.1107/S0365110X66002615). A plane whose mirror is a symmetry of the cubic lattice (Sigma 1, such as (100) or (110)) makes no boundary and is refused, as are polar crystals, whose mirror image is not a rotated copy (it would invert the polarity).

Construction (Sutton and Balluffi, Interfaces in Crystalline Materials, Oxford 1995, ch. 1-4):

  • The boundary frame has x along [uvw], z along the boundary normal [hkl] and y = z x x. Each is spanned by the shortest lattice vector along that direction (centring included), so the orthogonal box is a supercell of the crystal.

  • Grain A fills 0 <= z <= L, with L a whole number of lattice periods along [hkl]. The atoms on the boundary planes (z = 0 and z = L) are grain A’s; grain B is their mirror image, without those planes.

  • periodic: grain B fills L < z < 2L, so the cell holds two equivalent boundaries, at z = 0 and z = L. slab: grain B fills -L <= z < 0 and the bicrystal has free surfaces and vacuum.

  • translation shifts grain B rigidly in the boundary plane (fractions of the boundary cell). Atoms closer than min_distance are refused, never merged or removed silently.

The model is an unrelaxed starting geometry. Neither the boundary’s translation state, its atomic density nor its energy is optimised, and the record says so.

Functions

build_grain_boundary(recipe[, document])

The bicrystal with its CSL record; raises BuildRefused with the reason.

csl_tilt(rotation_axis, boundary_plane)

Sigma, tilt angle and disorientation of the symmetric tilt boundary (hkl)[uvw].

Classes

GrainBoundaryRecipe(*[, kind, source, ...])

A symmetric tilt CSL boundary of a cubic crystal; every choice is stated.

class vibesketcher.document.grain_boundaries.GrainBoundaryRecipe(*, kind='grain_boundary', identifier, source=None, template=None, template_a=None, rotation_axis, boundary_plane, sigma=None, misorientation_deg=None, repeats=None, model='periodic', vacuum=15.0, translation=(0.0, 0.0), repeat=(1, 1), min_image_separation=10.0, min_distance=None)[source]

Bases: BaseModel

A symmetric tilt CSL boundary of a cubic crystal; every choice is stated.

Parameters:
  • kind (Literal['grain_boundary'])

  • identifier (Annotated[str, _PydanticGeneralMetadata(pattern='^[A-Za-z][A-Za-z0-9_-]{0,63}$')])

  • source (Annotated[str | None, _PydanticGeneralMetadata(pattern='^[A-Za-z][A-Za-z0-9_-]{0,63}$')])

  • template (str | None)

  • template_a (Annotated[float | None, Gt(gt=0), AllowInfNan(allow_inf_nan=False)])

  • rotation_axis (tuple[int, int, int])

  • boundary_plane (tuple[int, int, int])

  • sigma (Annotated[int | None, Ge(ge=3), Le(le=999)])

  • misorientation_deg (Annotated[float | None, Gt(gt=0), Lt(lt=180), AllowInfNan(allow_inf_nan=False)])

  • repeats (Annotated[int | None, Ge(ge=1), Le(le=200)])

  • model (Literal['periodic', 'slab'])

  • vacuum (Annotated[float, Ge(ge=3), Le(le=200), AllowInfNan(allow_inf_nan=False)])

  • translation (tuple[float, float])

  • repeat (tuple[int, int])

  • min_image_separation (Annotated[float, Gt(gt=0), Le(le=200), AllowInfNan(allow_inf_nan=False)])

  • min_distance (Annotated[float | None, Gt(gt=0.3), Le(le=5), AllowInfNan(allow_inf_nan=False)])

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

kind: Literal['grain_boundary']
identifier: str
source: str | None

The cubic bulk in the document (conventional cell); or give template.

template: str | None
template_a: float | None
rotation_axis: tuple[int, int, int]

The tilt axis [uvw], in the conventional cubic cell; it lies in the boundary plane.

boundary_plane: tuple[int, int, int]

The boundary plane (hkl) of grain A (and, mirrored, of grain B).

sigma: int | None

the CSL Sigma …

Type:

If stated, checked against the construction

misorientation_deg: float | None

… and the tilt angle about the axis, in degrees.

repeats: int | None

Lattice periods along the normal in each grain; by default the fewest that keep boundaries (or a boundary and a surface) min_image_separation apart.

model: Literal['periodic', 'slab']
vacuum: float
translation: tuple[float, float]

fractions of the boundary cell along x (the axis) and y.

Type:

Rigid in-plane shift of grain B

repeat: tuple[int, int]

In-plane repeats of the boundary cell along x (the axis) and y.

min_image_separation: float
min_distance: float | None

The closest two atoms may come; by default 0.6 of the bulk nearest-neighbour distance.

vibesketcher.document.grain_boundaries.build_grain_boundary(recipe, document=None)[source]

The bicrystal with its CSL record; raises BuildRefused with the reason.

Parameters:
Return type:

PeriodicStructure

vibesketcher.document.grain_boundaries.csl_tilt(rotation_axis, boundary_plane)[source]

Sigma, tilt angle and disorientation of the symmetric tilt boundary (hkl)[uvw].

Pure lattice geometry for a cubic crystal; raises BuildRefused when the axis is not in the plane or the plane makes no boundary.

Parameters:
Return type:

dict[str, Any]