-
Notifications
You must be signed in to change notification settings - Fork 252
Description
Bug Description
In my RMG input file, I'm trying to use the Surface/Methane/Deutschmann_Ni reaction library as a seed mechanism for a simulation involving a SurfaceReactor but I'm getting a ValueError saying that 'site' is not in list. This is what the full traceback looks like:
File "/home/RMG-Py/rmg.py", line 118, in <module>
main()
File "/home/RMG-Py/rmg.py", line 112, in main
rmg.execute(**kwargs)
File "/home/RMG-Py/rmgpy/rmg/main.py", line 760, in execute
self.initialize(**kwargs)
File "/home/RMG-Py/rmgpy/rmg/main.py", line 624, in initialize
self.reaction_model.add_seed_mechanism_to_core(seed_mechanism, react=False)
File "/home/RMG-Py/rmgpy/rmg/model.py", line 1692, in add_seed_mechanism_to_core
self.add_reaction_to_core(rxn)
File "/home/RMG-Py/rmgpy/rmg/model.py", line 1502, in add_reaction_to_core
self.core.phase_system.interfaces[frozenset({"Default", "Surface"})].add_reaction(rxn, species_names, rms_species_list)
File "/home/RMG-Py/rmgpy/rmg/reactors.py", line 340, in add_reaction
self.reactions.append(to_rms(rxn, species_names=species_names, rms_species_list=rms_species_list))
File "/home/RMG-Py/rmgpy/rmg/reactors.py", line 754, in to_rms
reactantinds = [species_names.index(spc.label) for spc in obj.reactants]
File "/home/RMG-Py/rmgpy/rmg/reactors.py", line 754, in <listcomp>
reactantinds = [species_names.index(spc.label) for spc in obj.reactants]
ValueError: 'site' is not in list
How To Reproduce
I'm using the methane steam reforming example in the RMG docs here, except I'm using Surface/Methane/Deutschmann_Ni as a seed mechanism instead of a reaction library:
database(
thermoLibraries=['surfaceThermoNi111', 'surfaceThermoPt111', 'primaryThermoLibrary', 'thermo_DFT_CCSDTF12_BAC'],
seedMechanisms = ['Surface/Methane/Deutschmann_Ni'],
kineticsDepositories = ['training'],
kineticsFamilies = ['surface','default'],
kineticsEstimator = 'rate rules',
)
Expected Behavior
I expect add_seed_mechanism_to_core to add all of the species in my seed mechanism into the core, however it doesn't seem to be working correctly because the model can't find 'site' in the species list. I also have 'site' as an input species since it's required for a SurfaceReactor, but it looks like having it as an input species doesn't add it into the core either.
species(
label='site',
reactive=True,
structure=adjacencyList("1 X u0"),
)
#----------
# Reaction systems
surfaceReactor(
temperature=(1000,'K'),
initialPressure=(1.0, 'bar'),
initialGasMoleFractions={
"CH4": 1.0,
"O2": 0.0,
"CO2": 1.2,
"H2O": 1.2,
"H2": 0.0,
"CH3OH": 0.0,
"C2H4": 0.0,
},
initialSurfaceCoverages={
"site": 1.0,
},
surfaceVolumeRatio=(1.e5, 'm^-1'),
terminationConversion = { "CH4":0.9,},
terminationTime=(0.01, 's'),
)
Installation Information
- OS (include version if known): Ubuntu 18.04
- Installation method: Installation from source with Anaconda
- RMG version information:
- RMG-Py: 3.2.0-230-gbfaee1cad
- RMG-database: 3.2.0-5-gcfb4910cf