Skip to content

Commit 59a21e6

Browse files
committed
update loader tool to include surface mech paths
1 parent 2776e3a commit 59a21e6

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

rmgpy/tools/loader.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def load_rmg_job(
5050
use_java=False,
5151
use_chemkin_names=False,
5252
check_duplicates=True,
53+
surface_path=None,
5354
):
5455
# The argument is an RMG-Py input file
5556
rmg = load_rmg_py_job(
@@ -59,13 +60,14 @@ def load_rmg_job(
5960
generate_images,
6061
use_chemkin_names=use_chemkin_names,
6162
check_duplicates=check_duplicates,
63+
surface_path=surface_path,
6264
)
6365

6466
return rmg
6567

6668

6769
def load_rmg_py_job(input_file, chemkin_file=None, species_dict=None, generate_images=True,
68-
use_chemkin_names=False, check_duplicates=True):
70+
use_chemkin_names=False, check_duplicates=True, surface_path=None):
6971
"""
7072
Load the results of an RMG-Py job generated from the given `input_file`.
7173
"""
@@ -83,7 +85,8 @@ def load_rmg_py_job(input_file, chemkin_file=None, species_dict=None, generate_i
8385
species_dict = os.path.join(os.path.dirname(input_file), 'chemkin', 'species_dictionary.txt')
8486
species_list, reaction_list = load_chemkin_file(chemkin_file, species_dict,
8587
use_chemkin_names=use_chemkin_names,
86-
check_duplicates=check_duplicates)
88+
check_duplicates=check_duplicates,
89+
surface_path=surface_path)
8790

8891
# Created "observed" versions of all reactive species that are not explicitly
8992
# identified as "constant" species

rmgpy/tools/uncertainty.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def load_database(self, kinetics_families='all', kinetics_depositories=None, the
336336
family.add_rules_from_training(thermo_database=self.database.thermo)
337337
family.fill_rules_by_averaging_up(verbose=True)
338338

339-
def load_model(self, chemkin_path, dictionary_path, transport_path=None):
339+
def load_model(self, chemkin_path, dictionary_path, transport_path=None, surface_path=None):
340340
"""
341341
Load a RMG-generated model into the Uncertainty class
342342
`chemkin_path`: path to the chem_annotated.inp CHEMKIN mechanism
@@ -351,7 +351,8 @@ def load_model(self, chemkin_path, dictionary_path, transport_path=None):
351351

352352
self.species_list, self.reaction_list = load_chemkin_file(chemkin_path,
353353
dictionary_path=dictionary_path,
354-
transport_path=transport_path)
354+
transport_path=transport_path,
355+
surface_path=surface_path)
355356

356357
def retrieve_saturated_species_from_list(self, species):
357358
"""

0 commit comments

Comments
 (0)