pad_atoms

Contents

pad_atoms#

abtem.atoms.pad_atoms(atoms, margins, directions='xyz')[source]#

Repeat the atoms in the x and y directions, retaining only the repeated atoms within the margin distance from the cell boundary.

Parameters:
  • atoms (ase.Atoms) – The atoms that should be padded.

  • margins (one or tuple of three floats) – The padding margin. Can be specified either as a single value for all directions, or three separate values.

  • directions (str) – The directions to pad the atoms as a concatenation of one or more of x, y and z for each of the principal directions.

Returns:

padded – Padded atoms.

Return type:

ase.Atoms