From 96c8dac7d70ba8536cf6f5fd9b9b4dea473846a2 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Thu, 2 May 2024 11:33:42 +0300 Subject: [PATCH] Use the existing SA path in rmg_constantTP adatper --- t3/simulate/rmg_constantTP.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/t3/simulate/rmg_constantTP.py b/t3/simulate/rmg_constantTP.py index 71e53cb2..88f4cf2c 100755 --- a/t3/simulate/rmg_constantTP.py +++ b/t3/simulate/rmg_constantTP.py @@ -235,17 +235,16 @@ def get_sa_coefficients(self) -> Optional[dict]: sa_dict (Optional[dict]): An SA dictionary, structure is given in the docstring for T3/t3/main.py """ chem_to_rmg_rxn_index_map = get_chem_to_rmg_rxn_index_map(chem_annotated_path=self.paths['chem annotated']) - solver_path = os.path.join(self.paths['SA'], 'solver') - if not os.path.exists(solver_path): - self.logger.error("Could not find the path to RMG's SA solver output folder.") + if not os.path.exists(self.paths['SA solver']): + self.logger.error(f"Could not find the path to RMG's SA solver output folder:\n{self.paths['SA solver']}.") return None sa_files = list() - for file_ in os.listdir(solver_path): + for file_ in os.listdir(self.paths['SA solver']): if 'sensitivity' in file_ and file_.endswith(".csv"): sa_files.append(file_) sa_dict = {'kinetics': dict(), 'thermo': dict(), 'time': list()} for sa_file in sa_files: - df = pd.read_csv(os.path.join(solver_path, sa_file)) + df = pd.read_csv(os.path.join(self.paths['SA solver'], sa_file)) for header in df.columns: sa_type = None if 'Time' in header: