diff --git a/src/atomate2/common/jobs/approx_neb.py b/src/atomate2/common/jobs/approx_neb.py index 0db6aedc45..edd07d9b29 100644 --- a/src/atomate2/common/jobs/approx_neb.py +++ b/src/atomate2/common/jobs/approx_neb.py @@ -312,13 +312,24 @@ def get_images_and_relax( continue # potential place for uuid logic if depth first is desirable - pathfinder_output = get_pathfinder_results( - ep_structures[ini_ind], - ep_structures[fin_ind], - working_ion, - n_images[hop_idx], - host_chgcar, - ) + + try: + pathfinder_output = get_pathfinder_results( + ep_structures[ini_ind], + ep_structures[fin_ind], + working_ion, + n_images[hop_idx], + host_chgcar, + ) + except ValueError: + warnings.warn( + "NEBPathfinder can fail when the initial and final " + "images along a hop are nearly identical. " + "Excluding this hop.", + stacklevel=2, + ) + continue + images_list = pathfinder_output["images"] # add selective dynamics to structure