RMG-Py
RMG-Py copied to clipboard
Merge Models: list out of range
Hi,
I am trying to merge two models with the scripts in RMG-Py. However, it seems that I always encountered the problem: list out of range. First I tried with the mechanism downloaded, which is AramcoMech2.0 with the dictionary.txt. The results is followed: **Loading model #1... Loading model #2... Traceback (most recent call last): File "rmgpy/chemkin.pyx", line 597, in rmgpy.chemkin._read_kinetics_line IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main
python(**vars(ns))
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python
scope = runpy.run_path(script, run_name="main")
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/zhuqiren/RMG-Py/scripts/mergeModels.py", line 52, in
I thought it could be the problem with the models so I then use the models built by RMG, again, it also has some problems. The error info is:
Loading model #1...
Loading model #2...
Ignoring common species and reactions from model #1...
Added 74 out of 74 (100.0%) unique species from model #1.
Added 183 out of 183 (100.0%) unique reactions from model #1.
Ignoring common species and reactions from model #2...
Species H2O2 thermo from model 1 did not match that of model 2.
Species OCHO thermo from model 1 did not match that of model 2.
Species CH3 thermo from model 1 did not match that of model 2.
Species CH3O2H thermo from model 1 did not match that of model 2.
Species CH2OH thermo from model 1 did not match that of model 2.
Species CH2O2H thermo from model 1 did not match that of model 2.
Species HOCHO thermo from model 1 did not match that of model 2.
Species C2H5 thermo from model 1 did not match that of model 2.
Added 448 out of 485 (92.4%) unique species from model #2.
Added 2556 out of 2556 (100.0%) unique reactions from model #2.
The merged model has 522 species and 2739 reactions
WARNING:root:Marked reaction C2H3(28) + CH3(12) <=> C3H6(124) as duplicate of C3H6(124) <=> C2H3(28) + CH3(12) for saving to Chemkin file.
**Traceback (most recent call last):
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main
python(**vars(ns))
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python
scope = runpy.run_path(script, run_name="main")
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "//home/zhuqiren/anaconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/zhuqiren/RMG-Py/scripts/mergeModels.py", line 52, in
I'm not very familiar with these errors, but it looks like you might be missing collider species (for the first error) and possibly inerts? (in the second error) in your species dictionary. For the first case, I would look at all your colliders in your chemkin file (CH4, C2H6, H2O, CO2 , CO, H2, HE) and make sure there is a matching species with that same label in you species dictionary. My guess is that HE may be missing. For the second case, if you used the rmg generated species dictionary, inert species (HE for example) should be in there, but you might want to double check.
Thank you for your explaining. You are right and it is the problem with the species list. Though it is not about HE. It is because when exporting the models there are some errors in the chem.inp. The label of N2 is N2 in the species list but is N#N in the other parts, thermo, and dictionary, causing the error. The exporting problem doesn't always happen but reconfirmation is needed.
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.