Skip to content

Commit

Permalink
fix: correcting doubled up all_images check
Browse files Browse the repository at this point in the history
  • Loading branch information
laserkelvin committed Nov 18, 2024
1 parent b5252cf commit 64e225d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matsciml/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def _all_sites_have_neighbors(neighbors):
all_images.append(site.image)
# determine if we terminate the site loop earlier
site_count += 1
if any([len(obj) == 0 for obj in [all_images, all_dst, all_images]]):
if any([len(obj) == 0 for obj in [all_src, all_dst, all_images]]):
raise ValueError(
f"No images or edges to work off for cutoff {cutoff}."
f" Please inspect your structure and neighbors: {structure} {neighbors} {structure.cart_coords}"
Expand Down Expand Up @@ -864,7 +864,7 @@ def _all_sites_have_neighbors(neighbors):
# determine if we terminate the site loop earlier
site_count += 1

if any([len(obj) == 0 for obj in [all_images, all_dst, all_images]]):
if any([len(obj) == 0 for obj in [all_src, all_dst, all_images]]):
raise ValueError(
f"No images or edges to work off for cutoff {cutoff}."
f" Please inspect your atoms object and neighbors: {atoms}."
Expand Down

0 comments on commit 64e225d

Please sign in to comment.