eon.geometry.neighbors¶
Neighbor lists.
A periodic cutoff list is :func:linkcell.pairs_within: one row per
atom-image, the caller’s shift S, and a squared distance strictly
below the cutoff squared. :func:neighbor_list unique-indexes those
rows. An open axis stays on :class:vesin.NeighborList, which accepts
per-axis periodicity. knearest is the k-nearest list, not a cutoff
list. The brute flag is retained for API compatibility and does not
select another algorithm.
Module Contents¶
Functions¶
Return neighbors within cutoff for each atom (PBC, full undirected list). |
|
Alias of :func: |
|
Neighbor list with minimum-image vectors from center → neighbor. |
|
Cutoff pair list with cell shifts (ASE/tonari |
|
Unique-index adjacency from :func: |
|
Indices of free atoms with the lowest coordination number. |
Data¶
API¶
- eon.geometry.neighbors.PeriodicSpec¶
None
- eon.geometry.neighbors.StructureLike¶
None
- eon.geometry.neighbors.neighbor_list(p: eon.geometry.neighbors.StructureLike, cutoff: float, brute: bool = False, periodic: eon.geometry.neighbors.PeriodicSpec | None = None) List[List[int]][source]¶
Return neighbors within cutoff for each atom (PBC, full undirected list).
Parameters
p Structure with
.r(N,3) and.box(3,3). Optional.periodic(bool or length-3 bools) is used when periodic is omitted. cutoff Pair cutoff distance. brute Ignored; kept so callers usingconfig.comp_brute_neighborsneed no change. periodic A single bool applies to all axes; a length-3 sequence is per-axis. Default isp.periodicor all-periodic. Fully periodic cells use :func:linkcell.pairs_within. An open axis uses vesin.
- eon.geometry.neighbors.brute_neighbor_list(p: eon.geometry.neighbors.StructureLike, cutoff: float) List[List[int]][source]¶
Alias of :func:
neighbor_list(historical name).
- eon.geometry.neighbors.neighbor_list_vectors(p: eon.geometry.neighbors.StructureLike, cutoff: float, brute: bool = False) List[List[numpy.ndarray]][source]¶
Neighbor list with minimum-image vectors from center → neighbor.
Unique-index adjacency is the historical eOn contract. Vectors are one MIC wrap of
r[j] - r[center]per neighbour index, computed in one :func:eon.geometry.pbccall (minimagewrap_manywhen installed). Multi-image pair lists belong on- Func:
neighbor_list_pairs.
- eon.geometry.neighbors.neighbor_list_pairs(p: eon.geometry.neighbors.StructureLike, cutoff: float, periodic: eon.geometry.neighbors.PeriodicSpec | None = None)[source]¶
Cutoff pair list with cell shifts (ASE/tonari
ijS).Returns
(i, j, S)with one row per atom-image pair, ordered by(i, j, S). Unlike :func:neighbor_list, this does not unique-index or apply a minimum-image reduction. Displacement isr[j] - r[i] + S @ box. A fully periodic cell uses- Func:
linkcell.pairs_within. An open axis uses vesin. A squared distance on a linkcell row is strictly below the cutoff squared.
- eon.geometry.neighbors.neighbor_list_linkcell(p: eon.geometry.neighbors.StructureLike, cutoff: float) List[List[int]][source]¶
Unique-index adjacency from :func:
linkcell.pairs_within.The cell is periodic.
knearestis a different query and is not called. An empty list is returned when linkcell has nopairs_within.