kups.core.neighborlist.changes
¶
Incremental neighbor list updates for Monte Carlo / patch-style moves.
neighborlist_changes
runs a single neighbor list query that simultaneously discovers edges removed
by replacing a subset of particles and edges added at their new positions,
returning both as
[NeighborListChangesResult][kups.core.neighborlist.changes.NeighborListChangesResult].
neighborlist_changes(neighborlist, lh, rh, systems, compaction=0.5)
¶
Compute added/removed edges from a particle change in a single call.
Appends proposed positions to the particle array and queries both old
and new interactions at once, then splits the result by filtering
edge indices into removed (before) and added (after) sets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
neighborlist
|
NeighborList[Literal[2]]
|
Neighbor list implementation. |
required |
lh
|
Table[ParticleId, NeighborListPoints]
|
Full original particle table. |
required |
rh
|
WithIndices[ParticleId, Table[ParticleId, NeighborListPoints]]
|
Proposed changes — |
required |
systems
|
Table[SystemId, NeighborListSystems]
|
Per-system data (cells, etc.). |
required |
compaction
|
float
|
Fraction of total edges allocated per output (0–1). 0.5 means each of added/removed gets half the buffer. 1.0 means no compaction — full buffer with masking only. |
0.5
|
Returns:
| Type | Description |
|---|---|
NeighborListChangesResult
|
|