NeighborList

class atomman.NeighborList(**kwargs)

Bases: object

Class that finds and stores the neighbor atoms for a system.

build(system, cutoff: float, initialsize: int = 20, deltasize: int = 10)

Builds the neighbor list for a system.

Parameters:
  • system (atomman.System) – The system to calculate the neighbor list for.

  • cutoff (float) – Radial cutoff distance for identifying neighbors.

  • initialsize (int, optional) – The number of neighbor positions to initially assign to each atom. Default value is 20.

  • deltasize (int, optional) – Specifies the number of extra neighbor positions to allow each atom when the number of neighbors exceeds the underlying array size. Default value is 10.

property coord: ndarray

The atomic coordination numbers

Type:

numpy.ndarray

dump(fname: str)

Saves the neighbor list to a file.

Parameters:

fname (str) – The file name to save the content to.

load(model: str | IOBase)

Read in a neighbor list from a file.

Parameters:

model (str or file-like object) – Gives the file path or content to load.

property nlist: ndarray

The underlying numpy array of coord + neighbor ids

Type:

numpy.ndarray