Skip to content

Commit 03c87b7

Browse files
committed
Use the existing SA path in rmg_constantTP adatper
1 parent 1bc1772 commit 03c87b7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

t3/simulate/rmg_constantTP.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,16 @@ def get_sa_coefficients(self) -> Optional[dict]:
235235
sa_dict (Optional[dict]): An SA dictionary, structure is given in the docstring for T3/t3/main.py
236236
"""
237237
chem_to_rmg_rxn_index_map = get_chem_to_rmg_rxn_index_map(chem_annotated_path=self.paths['chem annotated'])
238-
solver_path = os.path.join(self.paths['SA'], 'solver')
239-
if not os.path.exists(solver_path):
240-
self.logger.error("Could not find the path to RMG's SA solver output folder.")
238+
if not os.path.exists(self.paths['SA solver']):
239+
self.logger.error(f"Could not find the path to RMG's SA solver output folder:\n{self.paths['SA solver']}.")
241240
return None
242241
sa_files = list()
243-
for file_ in os.listdir(solver_path):
242+
for file_ in os.listdir(self.paths['SA solver']):
244243
if 'sensitivity' in file_ and file_.endswith(".csv"):
245244
sa_files.append(file_)
246245
sa_dict = {'kinetics': dict(), 'thermo': dict(), 'time': list()}
247246
for sa_file in sa_files:
248-
df = pd.read_csv(os.path.join(solver_path, sa_file))
247+
df = pd.read_csv(os.path.join(self.paths['SA solver'], sa_file))
249248
for header in df.columns:
250249
sa_type = None
251250
if 'Time' in header:

0 commit comments

Comments
 (0)