Skip to content

Commit 5277e5a

Browse files
committed
Invalidate scan jobs that failed with internal coordinate error (L103)
1 parent 65ee00d commit 5277e5a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

arc/scheduler.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,25 +2656,24 @@ def check_scan_job(self,
26562656
label (str): The species label.
26572657
job (JobAdapter): The rotor scan job object.
26582658
"""
2659-
# If the job has not converged, troubleshoot ESS.
2660-
# Besides, according to the experience, 'Internal coordinate error' cannot be handled by
2661-
# troubleshoot_ess() for scan jobs. It is usually related to bond or angle changes which
2662-
# messes up the internal coordinates during the scan. It can be resolved
2663-
# by conformer-based scan troubleshooting method, yet its energies are readable.
2664-
if job.job_status[1]['status'] != 'done' and job.job_status[1]['error'] != 'Internal coordinate error':
2665-
self.troubleshoot_ess(label=label,
2666-
job=job,
2667-
level_of_theory=job.level)
2668-
return None
2669-
# Otherwise, check the scan job quality.
26702659
invalidate, actions, energies, angles = False, list(), list(), list()
2660+
invalidation_reason, message = '', ''
2661+
if job.job_status[1]['status'] != 'done':
2662+
if job.job_status[1]['error'] == 'Internal coordinate error':
2663+
invalidate = True
2664+
invalidation_reason = 'Internal coordinate error; '
2665+
else:
2666+
self.troubleshoot_ess(label=label,
2667+
job=job,
2668+
level_of_theory=job.level)
2669+
return None
2670+
26712671
if job.rotor_index not in self.species_dict[label].rotors_dict.keys():
26722672
raise SchedulerError(f'Could not match rotor {job.rotor_index} of species {label} '
26732673
f'with pivots {self.species_dict[label].rotors_dict[job.rotor_index]["pivots"]} '
26742674
f'to any of the existing rotors in the species.\n'
26752675
f'The rotors dict of {label} is:\n{pprint.pformat(self.species_dict[label].rotors_dict)}')
26762676

2677-
invalidation_reason, message = '', ''
26782677
if self.species_dict[label].rotors_dict[job.rotor_index]['dimensions'] == 1:
26792678
# This is a 1D scan.
26802679
# Read energy profile (in kJ/mol), it may be used in the troubleshooting.
@@ -2728,7 +2727,7 @@ def check_scan_job(self,
27282727

27292728
if invalidate:
27302729
self.species_dict[label].rotors_dict[job.rotor_index]['success'] = False
2731-
self.species_dict[label].rotors_dict[job.rotor_index]['invalidation_reason'] = invalidation_reason
2730+
# self.species_dict[label].rotors_dict[job.rotor_index]['invalidation_reason'] = invalidation_reason
27322731
else:
27332732
self.species_dict[label].rotors_dict[job.rotor_index]['success'] = True
27342733
self.species_dict[label].rotors_dict[job.rotor_index]['symmetry'] = determine_rotor_symmetry(
@@ -2765,7 +2764,6 @@ def check_scan_job(self,
27652764
'original_dihedrals'],
27662765
)
27672766

2768-
# Save the restart dictionary
27692767
self.save_restart_dict()
27702768

27712769
def check_directed_scan(self, label, pivots, scan, energies):

0 commit comments

Comments
 (0)