Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion deepmd/utils/neighbor_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ def get_stat(self,
self.place_holders['box']: np.array(data_set['box'])[kk].reshape([-1, 9]),
self.place_holders['default_mesh']: np.array(data.default_mesh[ii]),
})
dt = np.min(dt)
if dt.size != 0:
dt = np.min(dt)
else:
dt = self.rcut
log.warning("Atoms with no neighbors found in %s. Please make sure it's what you expected."%jj)

if dt < self.min_nbor_dist:
self.min_nbor_dist = dt
for ww in range(self.ntypes):
Expand Down