rogers.neighbors.NeighborCalculator

class rogers.neighbors.NeighborCalculator

Bases: object

Calculates neighbor lists for a set of points in 3D space.

__init__()
Return type:

None

Methods

__init__()

build_neighbor_list(pos, cutoff[, cell, ...])

Compute a neighbor list for a single molecule.

build_neighbor_list(pos, cutoff, cell=None, valid=None, single_count=True)

Compute a neighbor list for a single molecule.

Parameters:
  • pos (Float[Array, 'n_tot 3']) – (n_tot, 3) Array of positions of all points in 3D Cartesian coordinates.

  • cutoff (float) – Cutoff radius within which to consider two particles neighbors. If using periodic boundary conditions, must be less than half the box size.

  • cell (Float[Array, '3 3']) – (3, 3) Array of unit cell box vectors, one per column. If not using periodic boundary conditions, pass None.

  • valid (Bool[Array, 'n_tot']) – (n_tot,) Boolean array indicating whether to include (True) each point in the neighbor search. This is intended to be used with padded arrays; if None, all points are assumed valid.

  • single_count (bool) – If True (default), only returns pairs with i <= j

Returns:

py:class`NeighborList`

Return type:

NeighborList