kups.core.neighborlist.dense
¶
Dense O(N²/K²) neighbor list respecting system boundaries.
DenseNearestNeighborList
¶
Dense O(N²) neighbor list respecting system boundaries.
This implementation generates all particle pairs within each system separately, avoiding cross-system interactions. Efficient when the cutoff is comparable to the box size (cutoff/box ~ 1).
Complexity: O(N² / K²) where N is total particles and K is number of systems.
Attributes:
| Name | Type | Description |
|---|---|---|
avg_candidates |
Capacity[int]
|
Capacity for candidate pair storage. |
avg_edges |
Capacity[int]
|
Capacity for final edge array. |
avg_image_candidates |
Capacity[int]
|
Capacity for image candidate pairs. |
When to use
- When cutoff/box_size ~ 1 (cutoff comparable to box dimensions)
- Small box relative to cutoff (few cells would fit)
- Non-periodic systems
Example
Source code in src/kups/core/neighborlist/dense.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
DenseSelector
¶
Selector for the per-system dense O(N²/K²) algorithm.
Source code in src/kups/core/neighborlist/dense.py
IsDenseNeighborlistParams
¶
Bases: Protocol
Protocol for parameters required by DenseNearestNeighborList.