-
Notifications
You must be signed in to change notification settings - Fork 24
Updates species dictionary path for RMG #828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the species dictionary filename from "species_dictionary.txt" to "dictionary.txt" in the save_thermo_lib function to align with RMG 3.9+ conventions.
Changes:
- Modified
arc/plotter.pyto change the species dictionary filename for thermo libraries from "species_dictionary.txt" to "dictionary.txt" - Added a comment explaining the naming convention difference between kinetics and thermo libraries
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
arc/plotter.py
Outdated
| # RMG kinetics libraries expect dictionary.txt (thermo uses species_dictionary.txt). | ||
| species_dict_path = os.path.join(lib_path, 'dictionary.txt') |
Copilot
AI
Feb 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a critical discrepancy between the PR description and the code changes. The PR description states "Updates the species dictionary path to 'dictionary.txt' to align with the expected file name for RMG kinetics libraries, whereas thermo uses 'species_dictionary.txt'." This clearly states that kinetics libraries expect dictionary.txt and thermo uses species_dictionary.txt. However, this change is being made in the save_thermo_lib function (line 770 docstring confirms it "Save an RMG thermo library"), not the save_kinetics_lib function. The code change contradicts the PR description. Either the PR description is incorrect, or the change is being applied to the wrong function. Based on the documentation in docs/source/output.rst which shows kinetics libraries having dictionary.txt, it appears that save_kinetics_lib (line 909) should be updated instead of or in addition to this function.
5d5a2fa to
a033397
Compare
alongd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I added two minor comments
arc/plotter.py
Outdated
| with open(thermo_file, 'w') as f: | ||
| f.write(thermo_txt) | ||
|
|
||
| # Thermo libraries use species_dictionary.txt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove (or change?) the comment, thermo libraries don't use an external dictionary file. Looks like here we store the dictionary file for the user, for post-processing the ARC output. let's be consistent with the RMG naming and change the filename below to dictionary.txt
arc/plotter.py
Outdated
| f.write(reactions_txt) | ||
|
|
||
| species_dict_path = os.path.join(lib_path, 'species_dictionary.txt') | ||
| # RMG kinetics libraries expect dictionary.txt. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove this comment too
a033397 to
67ff4c9
Compare
Updates the species dictionary path to "dictionary.txt" to align with the expected file name for RMG kinetics libraries, whereas thermo uses "species_dictionary.txt". It appears that RMG, since 3.9, prefers it to be called dictionary.txt Removes redundant comments Removes comments that state the expected file name for species dictionaries in kinetics libraries. This information is either redundant or outdated.
Includes setuptools as a dependency in the environment file. This ensures that the package installation process has access to required tools and resources.
Updates the species dictionary path to "dictionary.txt" to align with the expected file name for RMG kinetics libraries, whereas thermo uses "species_dictionary.txt".
It appears that RMG, since 3.9, prefers it to be called dictionary.txt