Skip to content

Commit

Permalink
BugFix: Only call conf_xyzs[min_index] if the length makes sense
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Aug 18, 2024
1 parent 0ff829a commit 82f6c48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arc/job/trsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1537,8 +1537,9 @@ def scan_quality_check(label: str,
# Find the dihedrals in degrees of the lowest conformer:
min_index = np.argmin(energies)
conf_xyzs = parse_1d_scan_coords(log_file)
actions = {'change conformer': conf_xyzs[min_index]}
return invalidate, invalidation_reason, message, actions
if len(conf_xyzs) > min_index:
actions = {'change conformer': conf_xyzs[min_index]}
return invalidate, invalidation_reason, message, actions

# 1.3 Check consistency
if 0 in changed_ic_dict.keys() and len(changed_ic_dict) == 1:
Expand Down

0 comments on commit 82f6c48

Please sign in to comment.