ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
380 stars 226 forks source link

Species labeling in the output doesn't work properly #2627

Closed bjkreitz closed 3 weeks ago

bjkreitz commented 5 months ago

Bug Description

When generating mechanisms for surface reactions, there is a bug in the naming of the species in the output file. RMG used to replace the SMILES string of the species for example C[Pt] has the label CH3X(8) in the final mechanism. This still works for some species. However, for a bunch of species RMG uses now the SMILES string in the final mechanism e.g. [Pt]CC[Pt] is [Pt]CC[Pt](26) instead of C2H4X2(26).

How To Reproduce

Run the catalysis/ch4_o2 example

Installation Information

Describe your installation method and system information.

rwest commented 4 months ago

I think what it does, or used to do, is

  1. use a name from the input file (so the user has ultimate control over things they care about)
  2. then try the thermo libraries (in order specified), so most people get a sensible name
  3. then make up things with chemical formula or SMILES, depending on label length, etc. (I forget, off hand, the exact details).

I guess a couple of questions.

  1. In what way has this changed recently?
  2. What would you like it to do?
rwest commented 4 months ago

Oh, one thing that would probably be an improvement would be to replace "[Pt]" with "X" when it reverts to SMILES? Or someone could try to code up your algorithm you describe at https://github.com/ReactionMechanismGenerator/RMG-database/pull/640

X indicates a bond to the surface. It is always on the left hand site of an atom that is bonded to the surface e.g. XCCH2 it means that C is bonded to the surface. If the X is on the right hand side and at the end of a label, it means that this species is physisorbed e.g. H2OX.

Although if the "use names from thermo libraries" works as intended, at least all your species will already be named well.

github-actions[bot] commented 1 month ago

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.