Skip to content

Commit 5a92937

Browse files
committed
update frame to freud func
1 parent 16ec68d commit 5a92937

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmeutils/gsd_utils.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,17 @@ def frame_to_freud_system(frame, ref_length=None):
2424
if ref_length is None:
2525
ref_length = 1
2626
box = frame.configuration.box
27+
freud_box = freud.box.Box(
28+
Lx=box[0] * ref_length,
29+
Ly=box[1] * ref_length,
30+
Lz=box[2] * ref_length,
31+
xy=box[3],
32+
xz=box[4],
33+
yz=box[5]
34+
)
2735
box[0:3] *= ref_length
2836
xyz = frame.particles.position * ref_length
29-
return freud.locality.NeighborQuery.from_system(system=(box, xyz))
37+
return freud.locality.AABBQuery(box=freud_box, points=xyz)
3038

3139

3240
def get_type_position(

0 commit comments

Comments
 (0)