neighbormodels.neighbors.count_neighbors

count_neighbors(cell_structure: pymatgen.core.structure.Structure, r: float, unordered_pairs: bool = True) → neighbormodels.neighbors.NeighborData[source]

Builds a data frame containing neighbor counts grouped over site-index pairs and separation distances.

Parameters:
  • cell_structure – A pymatgen Structure object.
  • r – Radius of sphere.
  • unordered_pairs – Treat site-index pairs as unordered if True (default True).
Returns:

A named tuple with three field names:

data_frame

A pandas DataFrame of neighbor counts aggregated over site-index pairs and separation distances.

bins_data_frame

A pandas DataFrame of neighbor distances mapped to unique bin intervals.

structure

A copy of the Structure object defining the crystal structure.