RMG-Py
RMG-Py copied to clipboard
Mechanism diff doesn't work for surface reactions
Bug Description
It looks like the rmgpy/tools/diffmodels.py doesn't work for surface mechanisms. When I run it on chem_annotated-gas.inp files, it does fine, but then for the chem_annotated-surface.py, it errors out:
line 197 of rmgpy/kinetics/model.pyx
NotImplementedError('Unexpected call to KineticsModel.get_rate_coefficient(); '
'you should be using a class derived from KineticsModel.')
How To Reproduce
Run rmgpy/tools/diffmodels.py on the chem_annotated-surface.inp files of a surface mechanism and the diff will error out.
I've been calling the diff like this:
surf_results = diffmodels.execute(chemkin1=chemkin1_surf, species_dict1=species_dict1, thermo1=None, species_dict2=species_dict2, chemkin2=chemkin2_surf, thermo2=None)
(where chemkin_surf and species_dict are the respective chem_annotated-surface.inp and species_dictionary.txt files)
Expected Behavior
I was expecting to be able to feed the chem_annotated-surface.inp files into diffmodels.py to get a nice diff of two surface mechanisms, but it errors out.
Installation Information
Describe your installation method and system information.
- OS: Windows Subsystem Linux - Ubuntu 20.04.1 LTS
- Installation method: source, with anaconda
- RMG version information: 3.0.0-723-g7e5e56e25
- RMG-Py: forbidden_input
- RMG-database: meoh_3
Additional Context
It looks like chemkin.pyx is not reading the SITE blocks correctly since the site density is being included as a species: Species(label="SDEN/2.9430E-09/")
My guess is that nobody's implemented/debugged this yet for surface species, but it's also possible I'm just using this incorrectly and there's some way to combine the gas and surface chemkin files into one big chemkin file that chemkin.pyx has no trouble reading