From 64e225d8c51e62afeaef4a8edea71edb06fbd7b6 Mon Sep 17 00:00:00 2001 From: "Lee, Kin Long Kelvin" Date: Sun, 17 Nov 2024 17:17:04 -0800 Subject: [PATCH] fix: correcting doubled up all_images check --- matsciml/datasets/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matsciml/datasets/utils.py b/matsciml/datasets/utils.py index e7a4942a..75884a12 100644 --- a/matsciml/datasets/utils.py +++ b/matsciml/datasets/utils.py @@ -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}" @@ -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}."