atoms

atoms#

Module for modifying ASE Atoms objects for use in abTEM.

Functions

atoms_in_cell(atoms[, margin])

Crop atoms outside the cell.

best_orthogonal_cell(cell[, ...])

Find the closest orthogonal cell for a given cell given a maximum number of repetitions in all directions.

cut_cell(atoms[, cell, plane, origin, margin])

Fit the given atoms into a given cell by cropping atoms that are outside the cell, ignoring periodicity.

decompose_affine_transform(affine_transform)

Decompose an affine transform into rotation, scale and shear.

euler_sequence(axes, convention)

type axes:

str

euler_to_rotation(ai, aj, ak[, axes, convention])

Convert sequence of Euler angles to Cartesian rotation matrix.

flip_atoms(atoms[, axis])

Inverts the positions of atoms along a given axis.

is_cell_hexagonal(atoms)

Check whether the cell of given atoms is hexagonal.

is_cell_orthogonal(cell[, tol])

Check whether atoms have an orthogonal cell.

is_cell_valid(atoms[, tol])

Check whether the cell of given atoms can be converted to a structure usable by abTEM.

merge_close_atoms(atoms[, tol])

Merge atoms that are closer in distance to each other than the given tolerance.

orthogonalize_cell(atoms[, max_repetitions, ...])

Make the cell of the given atoms orthogonal.

pad_atoms(atoms, margins[, directions])

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

plane_to_axes(plane)

Convert string representation of Cartesian axes to numerical.

pretty_print_transform(decomposed)

Print a decomposed transformation in an easy-to-read manner.

rotate_atoms(atoms[, axes, angles, convention])

Rotate the positions and cell vectors of atoms using Euler angles.

rotate_atoms_to_plane(atoms[, plane])

Rotate atoms so that their xy plane is rotated into a given plane.

rotation_matrix_from_plane([plane])

Give the rotation matrix corresponding to a rotation from a given plane to the xy plane.

rotation_matrix_to_euler(R[, axes, ...])

Convert a Cartesian rotation matrix to Euler angles.

shrink_cell(atoms[, repetitions, tol])

Find and return the smallest non-repeating cell for the given atoms.

standardize_cell(atoms[, tol])

Standardize the cell of given atoms.

wrap_with_tolerance(atoms[, tol])

Wrap atoms that are closer to cell boundaries than the given tolerance.