From 1edd654aa0dfd9737197d30f9ec19cf7eeda1e52 Mon Sep 17 00:00:00 2001 From: Calvin Pieters Date: Wed, 7 Jan 2026 16:21:19 +0200 Subject: [PATCH 1/2] Mutated conformer jobs issue It appears when there are many conf opts for a TS and then deduplicated due to similarity, the successful_tsgs was nto made aware of the deduplicaiton (which collapses duplicates and shirnks/reorders). So when ARC finishes conf_opt and tries to write results using hte old integers, it would report out of range and fail. --- arc/scheduler.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/arc/scheduler.py b/arc/scheduler.py index f53ee8eead..89c0a29270 100644 --- a/arc/scheduler.py +++ b/arc/scheduler.py @@ -1161,14 +1161,18 @@ def run_ts_conformer_jobs(self, label: str): successful_tsgs = [tsg for tsg in self.species_dict[label].ts_guesses if tsg.success] if len(successful_tsgs) > 1: self.job_dict[label]['conf_opt'] = dict() - for i, tsg in enumerate(successful_tsgs): + for tsg in successful_tsgs: + if tsg.index is None: + existing_indices = [guess.index for guess in self.species_dict[label].ts_guesses + if guess.index is not None] + tsg.index = max(existing_indices or [-1]) + 1 self.run_job(label=label, xyz=tsg.initial_xyz, level_of_theory=self.ts_guess_level, job_type='conf_opt', - conformer=i, + conformer=tsg.index, ) - tsg.conformer_index = i # Store the conformer index in the TSGuess object to match them later. + tsg.conformer_index = tsg.index # Use a stable identifier for mapping back to TSGuess. elif len(successful_tsgs) == 1: if 'opt' not in self.job_dict[label].keys() and 'composite' not in self.job_dict[label].keys(): # proceed only if opt (/composite) not already spawned @@ -1980,9 +1984,15 @@ def parse_conformer(self, xyz = parser.parse_geometry(log_file_path=job.local_path_to_output_file) energy = parser.parse_e_elect(log_file_path=job.local_path_to_output_file) if self.species_dict[label].is_ts: - self.species_dict[label].ts_guesses[i].energy = energy - self.species_dict[label].ts_guesses[i].opt_xyz = xyz - self.species_dict[label].ts_guesses[i].index = i + tsg = next((guess for guess in self.species_dict[label].ts_guesses + if guess.conformer_index == i), None) + if tsg is None: + logger.warning(f'Could not find TSGuess for conformer {i} of {label} ' + f'(expected a matching conformer_index); skipping.') + return False + tsg.energy = energy + tsg.opt_xyz = xyz + tsg.index = i if energy is not None: logger.debug(f'Energy for TSGuess {i} of {label} is {energy:.2f}') else: From 7d8d8618c13df0a9e6b0b75737a75c14797d08aa Mon Sep 17 00:00:00 2001 From: Calvin <56573970+calvinp0@users.noreply.github.com> Date: Sat, 10 Jan 2026 15:35:23 +0200 Subject: [PATCH 2/2] Update arc/scheduler.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- arc/scheduler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/arc/scheduler.py b/arc/scheduler.py index 89c0a29270..29c139dd49 100644 --- a/arc/scheduler.py +++ b/arc/scheduler.py @@ -1992,7 +1992,6 @@ def parse_conformer(self, return False tsg.energy = energy tsg.opt_xyz = xyz - tsg.index = i if energy is not None: logger.debug(f'Energy for TSGuess {i} of {label} is {energy:.2f}') else: