pub fn pairs_within(
positions: &[[f32; 3]],
left: &AtomSelection,
right: &AtomSelection,
cutoff: f32,
backend: SpatialBackend,
periodic: Option<&PeriodicBox>,
context: &ExecutionContext,
) -> Result<Vec<NeighborPair>, SpatialError>Expand description
Enumerates unique unordered pairs no further apart than cutoff.
Results are sorted by (first, second) for every backend. Self-pairs are
excluded, including when the two selections overlap.
ยงErrors
Returns an error for an invalid cutoff or an out-of-range atom index.