Skip to content

Commit

Permalink
Fix alter.unbunch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hexane360 committed Jan 12, 2024
1 parent d927da9 commit 4ace406
Show file tree
Hide file tree
Showing 2 changed files with 2,501 additions and 2,500 deletions.
1 change: 1 addition & 0 deletions atomlib/alter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def unbunch(structure: HasAtomsT, threshold: float = 0.4, *,
tree = KDTree(coords, compact_nodes=False, balanced_tree=False)

pairs = tree.query_pairs(threshold, output_type='ndarray')
pairs.sort(axis=0, kind='quicksort') # required to ensure deterministicity
for (i, j) in pairs:
v_ij = coords[j] - coords[i]
r = numpy.linalg.norm(v_ij)
Expand Down
Loading

0 comments on commit 4ace406

Please sign in to comment.