Skip to content

Commit

Permalink
Merge pull request #2656 from sevyharris/diffmodels_surf_regression_p…
Browse files Browse the repository at this point in the history
…atch

Patch for surface regression diffmodels
  • Loading branch information
JacksonBurns authored May 7, 2024
2 parents 49301c9 + afd00ae commit 2753ed8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions rmgpy/tools/diffmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,23 @@ def execute(chemkin1, species_dict1, thermo1, chemkin2, species_dict2, thermo2,
model1 = ReactionModel()
model2 = ReactionModel()

# check if this is supposed to be comparing surface mechanisms
chemkin_gas1 = chemkin1.replace('.inp', '-gas.inp')
chemkin_surface1 = chemkin1.replace('.inp', '-surface.inp')
if not os.path.exists(chemkin1) and \
os.path.exists(chemkin_surface1) and \
os.path.exists(chemkin_gas1):
chemkin1 = chemkin_gas1
kwargs['surface_path1'] = chemkin_surface1

chemkin_gas2 = chemkin2.replace('.inp', '-gas.inp')
chemkin_surface2 = chemkin2.replace('.inp', '-surface.inp')
if not os.path.exists(chemkin2) and \
os.path.exists(chemkin_surface2) and \
os.path.exists(chemkin_gas2):
chemkin2 = chemkin_gas2
kwargs['surface_path2'] = chemkin_surface2

try:
surface_path1 = kwargs['surface_path1']
surface_path2 = kwargs['surface_path2']
Expand Down
2 changes: 1 addition & 1 deletion test/regression/minimal_surface/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
units='si',
generateOutputHTML=False,
generatePlots=False, # Enable to make plots of core and edge size etc. But takes a lot of the total runtime!
saveEdgeSpecies=False,
saveEdgeSpecies=True,
saveSimulationProfiles=False,
)
generatedSpeciesConstraints(
Expand Down

0 comments on commit 2753ed8

Please sign in to comment.