amep.pbc#

Periodic Boundary Conditions#

The AMEP module amep.pbc contains methods that apply periodic boundary condictions and calculate distances and difference vectors considering periodic boundaries.

Functions

distance_matrix(coords, box_boundary[, ...])

Calculates the distance matrix.

distance_matrix_parallel(coords, box_boundary)

Calculates the distance matrix.

distances(coords[, other_coords])

Returns a 1D array of all pairwise distances.

find_pairs(coords, box_boundary[, ids, ...])

Identifies pairs of particles based on the pairwise distance.

fold(coords, box_boundary)

Applies periodic boundary conditions to the given coordinates, i.e. folds the coordinates back into the box if they are not inside the box.

kdtree(coords, box_boundary[, pbc])

Creates a scipy.spatial._kdtree.KDTree object with and without considering periodic boundary conditions.

mirror_points(coords, box_boundary[, width, ...])

Returns the points and their first periodic mirrors.

pbc_diff(v1, v2, box_boundary[, pbc])

Calculates the difference vector(s) between v1 and v2 considering periodic boundary conditions.

pbc_diff_rect(v1, v2, box_boundary)

Calculate the difference of two vectors, considering periodic boundary conditions within a rectangular box.

pbc_points(coords, box_boundary[, ...])

Returns the points and their first periodic images.