From 27707586d1306f267b59bb625165611e2f389463 Mon Sep 17 00:00:00 2001 From: Jose Borreguero Date: Mon, 18 Sep 2017 12:11:48 -0400 Subject: [PATCH] Acknowledgments to Parvalli --- package/MDAnalysis/lib/pkdtree.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/MDAnalysis/lib/pkdtree.py b/package/MDAnalysis/lib/pkdtree.py index b0ae245c4ba..4d795b57060 100644 --- a/package/MDAnalysis/lib/pkdtree.py +++ b/package/MDAnalysis/lib/pkdtree.py @@ -48,8 +48,9 @@ class PeriodicKDTree(object): A tree is first constructed with the coordinates wrapped onto the central cell. A query for neighbors around a center point is performed first by wrapping the center point coordinates to the central cell, then generating - images of this wrapped center point and finally searching for neighbors - close to the images. + images of this wrapped center point (thanks to + https://github.com/patvarilly/periodic_kdtree for the idea) and finally + searching for neighbors close to the images. Only the necessary number of center point images is generated for each case. For instance, if the wrapped center point lies well within the cell @@ -146,7 +147,8 @@ def set_coords(self, coords): def find_centers(self, center_point, radius): """ - Find relevant images of a center point. + Find relevant images of a center point, inspired by + https://github.com/patvarilly/periodic_kdtree Parameters ----------