MDAnalysis / cellgrid

MIT License
7 stars 6 forks source link

Performance of PBC distance searches #2

Open richardjgowers opened 8 years ago

richardjgowers commented 8 years ago

Currently the distance searches are done using cgmath.distance_array_with_pbc which always checks periodic boundaries for all pairs.

dx -= round(dx/box) * box

For larger (in volume) systems, this becomes increasingly annoying as only few pairs actually need this check.

Instead, there are two ways around this: