Skip to content

Commit

Permalink
fix nlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Wang committed Oct 23, 2024
1 parent fa7e103 commit 11b0440
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deepmd/dpmodel/utils/nlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def extend_coord_with_ghosts(
to_face = to_face_distance(cell)
nbuff = xp.astype(xp.ceil(rcut / to_face), xp.int64)
nbuff = xp.max(nbuff, axis=0)
xi = xp.arange(-int(nbuff[0]), int(nbuff[0]) + 1, 1, dtype=nbuff.dtype)
yi = xp.arange(-int(nbuff[1]), int(nbuff[1]) + 1, 1, dtype=nbuff.dtype)
zi = xp.arange(-int(nbuff[2]), int(nbuff[2]) + 1, 1, dtype=nbuff.dtype)
xi = xp.arange(-int(nbuff[0]), int(nbuff[0]) + 1, 1, dtype=xp.int64)
yi = xp.arange(-int(nbuff[1]), int(nbuff[1]) + 1, 1, dtype=xp.int64)
zi = xp.arange(-int(nbuff[2]), int(nbuff[2]) + 1, 1, dtype=xp.int64)
xyz = xp.linalg.outer(xi, xp.asarray([1, 0, 0]))[:, xp.newaxis, xp.newaxis, :]
xyz = (
xyz
Expand Down

0 comments on commit 11b0440

Please sign in to comment.