From 9f5be318e02df112e5706ad28afcde10780c31e8 Mon Sep 17 00:00:00 2001 From: Calvin Date: Sun, 9 Apr 2023 12:15:52 +0300 Subject: [PATCH] Fixed grammar and added Index Error --- arc/job/adapters/ts/heuristics.py | 2 +- arc/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arc/job/adapters/ts/heuristics.py b/arc/job/adapters/ts/heuristics.py index ba282a3483..3bc213a268 100644 --- a/arc/job/adapters/ts/heuristics.py +++ b/arc/job/adapters/ts/heuristics.py @@ -1011,7 +1011,7 @@ def h_abstraction(arc_reaction: 'ARCReaction', d3=d3, reactants_reversed=reactants_reversed, ) - except ValueError as e: + except (ValueError, IndexError) as e: logger.error(f'Could not generate a guess using Heuristics for H abstraction reaction, got:\n{e}') if xyz_guess is not None and not colliding_atoms(xyz_guess): diff --git a/arc/main.py b/arc/main.py index 050622a0b4..dd169a9e88 100644 --- a/arc/main.py +++ b/arc/main.py @@ -553,7 +553,7 @@ def execute(self) -> dict: logger.info('\n') for rxn in self.reactions: if not isinstance(rxn, ARCReaction): - raise ValueError(f'All reactions be ARCReaction objects. Got {type(rxn)}') + raise ValueError(f'All reactions must be ARCReaction objects. Got {type(rxn)}') self.scheduler = Scheduler(project=self.project, species_list=self.species, rxn_list=self.reactions,