Skip to content

Commit 8fd4f32

Browse files
committed
Fix switch_ts resetting rotors convergence flag and stale rotors_dict
delete_all_species_jobs blanket-set all output job_types to False, including rotors and bde which are initialised to True by initialize_output_dict. For species with no torsional modes (e.g. cyclic TS from THF), no scan jobs are ever spawned, so rotors stays False and check_all_done incorrectly marks the TS as unconverged — even when opt, freq, sp, and IRC all passed. Additionally, switch_ts did not reset rotors_dict, so determine_rotors was never re-called for the new TS geometry and stale scan results from the previous guess carried over. Changes: - Preserve the True default for rotors/bde in delete_all_species_jobs, matching initialize_output_dict. - Reset rotors_dict and number_of_rotors in switch_ts when job_types['rotors'] is enabled, so the new geometry gets fresh rotor detection.
1 parent 05099fc commit 8fd4f32

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

arc/scheduler.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2773,6 +2773,10 @@ def switch_ts(self, label: str):
27732773
if os.path.isfile(freq_path):
27742774
os.remove(freq_path)
27752775
self.species_dict[label].populate_ts_checks() # Restart the TS checks dict.
2776+
if self.job_types['rotors']:
2777+
# Reset rotors so they are re-determined from the new TS geometry.
2778+
self.species_dict[label].rotors_dict = {}
2779+
self.species_dict[label].number_of_rotors = 0
27762780
if not self.species_dict[label].ts_guesses_exhausted and self.species_dict[label].chosen_ts is not None:
27772781
logger.info(f'Optimizing species {label} again using a different TS guess: '
27782782
f'conformer {self.species_dict[label].chosen_ts}')
@@ -3728,7 +3732,13 @@ def delete_all_species_jobs(self, label: str):
37283732
self.running_jobs[label] = list()
37293733
self.output[label]['paths'] = {key: '' if key != 'irc' else list() for key in self.output[label]['paths'].keys()}
37303734
for job_type in self.output[label]['job_types']:
3731-
self.output[label]['job_types'][job_type] = False
3735+
# rotors and bde are initialised to True (see initialize_output_dict) because
3736+
# species with no torsional modes / no BDE targets should not be blocked from
3737+
# convergence. Preserve that default when resetting for a TS guess switch.
3738+
if job_type in ['rotors', 'bde']:
3739+
self.output[label]['job_types'][job_type] = True
3740+
else:
3741+
self.output[label]['job_types'][job_type] = False
37323742
self.output[label]['convergence'] = None
37333743
self._pending_pipe_sp.discard(label)
37343744
self._pending_pipe_freq.discard(label)

0 commit comments

Comments
 (0)