From 69f605c1d1ecbed3b17819da93f470f6b52b1dcf Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 14 Nov 2023 13:48:10 +0200 Subject: [PATCH] Changed if logic slightly --- arc/job/adapters/qchem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arc/job/adapters/qchem.py b/arc/job/adapters/qchem.py index accc2fa621..464533dd7c 100644 --- a/arc/job/adapters/qchem.py +++ b/arc/job/adapters/qchem.py @@ -340,7 +340,8 @@ def write_input_file(self) -> None: input_dict['job_type_1'] = 'freq' if self.irc_direction == 'forward': irc_direction_value = 1 - elif self.irc_direction == 'reverse': + else: # We assume that if it is not forward, then it must be reverse self.irc_direction == 'reverse' - + # this also fixes any CodeQL errors regarding the irc_direction_value not being defined irc_direction_value = -1 input_dict['job_type_2'] = f"\n\n@@@\n$molecule\nread\n$end\n$rem" \ f"\n JOBTYPE rpath" \ @@ -431,7 +432,6 @@ def generate_qchem_scan_angles(self,start_angle: int, step: int) -> (int, int, i # We will need to find the starting angle that when added by the step size will be 180 target_sum = 180 quotient = target_sum // step - remainder = target_sum % step starting_number = target_sum - (quotient * step) scan1_start = starting_number scan1_end = 180