ReactionMechanismGenerator / ReactionMechanismGenerator/RMG-Py

Duplicate reactions added when library included in libraries and seed

Open
#2,979 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Python
Stars
530
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
8

Description

Bug Description

I'm getting some duplicate reactions when I run an input file that has BurkeH2O2inArHe listed as both a seed and a library.

O(5)+H2(13)<=>H(14)+OH(15) is supposed to appear twice but appears 4x. I think there may be two other MultiArrhenius reactions in this example that also get incorrectly duplicated.

! Reaction index: Chemkin #2; RMG #2
! Library reaction: BurkeH2O2inArHe
O(5)+H2(13)<=>H(14)+OH(15)                          3.818000e+12 0.000     7.948
DUPLICATE
! Reaction index: Chemkin #3; RMG #2
! Library reaction: BurkeH2O2inArHe
O(5)+H2(13)<=>H(14)+OH(15)                          8.792000e+14 0.000     19.170
DUPLICATE

...

! Reaction index: Chemkin #42; RMG #39
! Library reaction: BurkeH2O2inArHe
O(5)+H2(13)<=>H(14)+OH(15)                          3.818000e+12 0.000     7.948
DUPLICATE
! Reaction index: Chemkin #43; RMG #39
! Library reaction: BurkeH2O2inArHe
O(5)+H2(13)<=>H(14)+OH(15)                          8.792000e+14 0.000     19.170
DUPLICATE



chem_annotated.inp.txt
species_dictionary.txt

How To Reproduce

Here's the input file that causes the duplicates: input.py.txt

Try python ~/rmg/RMG-Py/rmg.py input.py -t=00:00:02:00 to run for 2 minutes and produce a relatively small example mechanism

Then to fix the error you can remove BurkeH2O2inArHe from the libraries but keep it in the seed.

Expected Behavior

I would expect RMG to catch any duplicates before adding them, or at least produce an error if you're not supposed to include something as both a library and a seed. Or maybe have louder documentation about not doing this.

Installation Information

Describe your installation method and system information.

  • OS: Ubuntu 24.04.4 LTS
  • Installation method: source
  • RMG version information:
    • RMG-Py: 99019681568b26514ca4ae3b2de4d2e6fcfcfbc8
    • RMG-database: a956fac64a696b84b1183c617e07fc3c1b5ff6a6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with input.py.txt and run rmg.py using the provided command to reproduce the duplicated BurkeH2O2inArHe reactions. Trace how seed and library reactions are added, then add coverage showing that duplicates are prevented or that an invalid seed/library overlap produces a clear error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.