StackingFault

class atomman.defect.StackingFault(hkl: Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray], ucell: System, cutboxvector: str = 'c', maxindex: Optional[int] = None, a1vect_uvw: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, a2vect_uvw: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, conventional_setting: str = 'p', tol: float = 1e-08)

Bases: FreeSurface

Class for generating stacking fault atomic configurations.

property a1vect_cart: ndarray

One of the two shift vectors in Cartesian relative to system.

Type:

numpy.ndarray

property a1vect_uvw: ndarray

One of the two conventional lattice shift vectors in Miller or Miller-Bravais indices.

Type:

numpy.ndarray

property a2vect_cart: ndarray

One of the two shift vectors in Cartesian relative to system.

Type:

numpy.ndarray

property a2vect_uvw: ndarray

One of the two conventional lattice shift vectors in Miller or Miller-Bravais indices.

Type:

numpy.ndarray

property abovefault: list

Indices of all atoms in system above the slip plane.

Type:

list

fault(a1: Optional[float] = None, a2: Optional[float] = None, outofplane: Optional[float] = None, faultshift: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, minimum_r: Optional[float] = None, a1vect_uvw: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, a2vect_uvw: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, faultpos_cart: Optional[float] = None, faultpos_rel: Optional[float] = None) System

Generates a fault configuration by displacing all atoms above the slip plane.

Parameters:
  • a1 (float, optional) – The fractional coordinate of a1vect to shift by. Default value is 0.0.

  • a2 (float, optional) – The fractional coordinate of a2vect to shift by. Default value is 0.0.

  • outofplane (float, optional) – An out-of-plane shift, given in absolute units. Default value is 0.0.

  • faultshift (array-like object, optional) – The full shifting vector to displace the atoms above the slip plane by. Cannot be given with a1, a2, or outofplane.

  • minimum_r (float, optional) – Specifies the minimum allowed interatomic spacing across the slip plane. If any sets of atoms are closer than this value then the outofplane shift is increased. Default value is None, which performs no adjustment.

  • a1vect_uvw (array-like object, optional) – The crystal vector to use for one of the two shifting vectors. Included here for those wishing to override the values set during class initialization.

  • a2vect_uvw (array-like object, optional) – The crystal vector to use for one of the two shifting vectors. Included here for those wishing to override the values set during class initialization.

  • faultpos_rel (float, optional) – The position to place the slip plane within the system given as a relative coordinate along the out-of-plane direction. Included here for those wishing to override the value set when surface() was called. faultpos_rel and faultpos_cart cannot both be given.

  • faultpos_cart (float, optional) – The position to place the slip plane within the system given as a Cartesian coordinate along the out-of-plane direction. Included here for those wishing to override the value set when surface() was called. faultpos_rel and faultpos_cart cannot both be given.

Returns:

The atomic configuration with stacking fault shift

Return type:

atomman.System

property faultpos_cart: float

The Cartesian position of the slip plane.

Type:

float

property faultpos_rel: float

The fractional position of the slip plane.

Type:

float

iterfaultmap(num_a1: Optional[int] = None, num_a2: Optional[int] = None, outofplane: Optional[float] = None, minimum_r: Optional[float] = None, a1vect_uvw: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, a2vect_uvw: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, faultpos_cart: Optional[float] = None, faultpos_rel: Optional[float] = None) Generator[Tuple[float, float, System], None, None]

Iterates over generalized stacking fault configurations associated with a 2D map of equally spaced a1, a2 coordinates.

Parameters:
  • num_a1 (int) – The number of a1 values to generate systems for. Default value is 1 (only generate for a1=0.0).

  • num_a2 (int) – The number of a2 values to generate systems for. Default value is 1 (only generate for a2=0.0).

  • outofplane (float, optional) – An out-of-plane shift, given in absolute units. Default value is 0.0.

  • minimum_r (float, optional) – Specifies the minimum allowed interatomic spacing across the slip plane. If any sets of atoms are closer than this value then the outofplane shift is increased. Default value is None, which performs no adjustment.

  • a1vect_uvw (array-like object, optional) – The crystal vector to use for one of the two shifting vectors. Included here for those wishing to override the values set during class initialization.

  • a2vect_uvw (array-like object, optional) – The crystal vector to use for one of the two shifting vectors. Included here for those wishing to override the values set during class initialization.

  • faultpos_rel (float, optional) – The position to place the slip plane within the system given as a relative coordinate along the out-of-plane direction. Included here for those wishing to override the value set when surface() was called. faultpos_rel and faultpos_cart cannot both be given.

  • faultpos_cart (float, optional) – The position to place the slip plane within the system given as a Cartesian coordinate along the out-of-plane direction. Included here for those wishing to override the value set when surface() was called. faultpos_rel and faultpos_cart cannot both be given.

Yields:
  • a1 (float) – The a1 fractional coordinate of a1vect.

  • a2 (float) – The a2 fractional coordinate of a2vect.

  • atomman.System – The fault configuration associated with the a1, a2 shift.

surface(shift: Optional[Union[int, float, complex, str, bytes, generic, Sequence[Union[int, float, complex, str, bytes, generic]], Sequence[Sequence[Any]], _SupportsArray]] = None, vacuumwidth: Optional[float] = None, minwidth: Optional[float] = None, sizemults: Optional[list] = None, even: bool = False, faultpos_rel: Optional[float] = None, faultpos_cart: Optional[float] = None) System

Generates the free surface atomic system, which is used as the basis for generating the stacking fault configuration(s).

Parameters:
  • shift (array-like object, optional) – Applies a shift to all atoms. Different values allow for free surfaces with different termination planes to be selected.

  • vacuumwidth (float, optional) – If given, the free surface is created by modifying the system’s box to insert a region of vacuum with this width. This is typically used for DFT calculations where it is computationally preferable to insert a vacuum region and keep all dimensions periodic.

  • sizemults (list or tuple, optional) – The three System.supersize multipliers [a_mult, b_mult, c_mult] to use on the rotated cell to build the final system. Note that the cutboxvector sizemult must be an integer and not a tuple. Default value is [1, 1, 1].

  • minwidth (float, optional) – If given, the sizemult along the cutboxvector will be selected such that the width of the resulting final system in that direction will be at least this value. If both sizemults and minwidth are given, then the larger of the two in the cutboxvector direction will be used.

  • even (bool, optional) – A True value means that the sizemult for cutboxvector will be made an even number by adding 1 if it is odd. Default value is False.

  • faultpos_rel (float, optional) – The position to place the slip plane within the system given as a relative coordinate along the out-of-plane direction. faultpos_rel and faultpos_cart cannot both be given. Default value is 0.5 if faultpos_cart is also not given.

  • faultpos_cart (float, optional) – The position to place the slip plane within the system given as a Cartesian coordinate along the out-of-plane direction. faultpos_rel and faultpos_cart cannot both be given.

Returns:

The free surface atomic system.

Return type:

atomman.System