structuretoolkit.analyse.neighbors.get_neighbors#
- structuretoolkit.analyse.neighbors.get_neighbors(structure: Atoms, num_neighbors: int = 12, tolerance: int = 2, id_list: list | None = None, cutoff_radius: float = inf, width_buffer: float = 1.2, mode: str = 'filled', norm_order: int = 2) Neighbors[source]#
Get the neighbors of atoms in a structure.
- Parameters:
structure (Atoms) – The structure to analyze.
num_neighbors (int) – The number of neighbors to find for each atom.
tolerance (int) – The tolerance (round decimal points) used for computing neighbor shells.
id_list (list) – The list of atoms for which neighbors are to be found.
cutoff_radius (float) – The upper bound of the distance to which the search must be done.
width_buffer (float) – The width of the layer to be added to account for periodic boundary conditions.
mode (str) – The representation of per-atom quantities (distances etc.). Choose from ‘filled’, ‘ragged’, and ‘flattened’.
norm_order (int) – The norm to use for the neighborhood search and shell recognition.
- Returns:
An instance of the Neighbors class with the neighbor indices, distances, and vectors.
- Return type: