Skip to content
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

Relative file paths caused difficulty debugging Arkane issue #2746

Open
sevyharris opened this issue Dec 31, 2024 · 0 comments
Open

Relative file paths caused difficulty debugging Arkane issue #2746

sevyharris opened this issue Dec 31, 2024 · 0 comments
Assignees

Comments

@sevyharris
Copy link
Contributor

Bug Description

I ran an Arkane kinetics job that kept giving me this error:
The species in reaction HO2(16) + C[CH]CC(23) <=> O2(2) + butane(1) do not have adequate information for TST, using default kinetics values.

I kept getting zero for the reaction rate, and it turned out that the problem was actually how I was structuring/naming my input files. It was using the transition state's energy file in place of the species' energy files because I had wrongly assumed that Arkane would check for the species's energy file relative to the directory in which that species's input file is defined.

To give more of a visual, I had this directory structure:

my_reaction
    input.py
    TS.py <-------------------------- defines TS energy file as 'energy.out'
    energy.out
    species_1
        species_1.py <--------------- defines species 1 energy file as 'energy.out' but ends up grabbing the TS energy.out
        energy.out
    species_2
        species_2.py <--------------- defines species 2 energy file as 'energy.out' but ends up grabbing the TS energy.out
        energy.out

When it needed to be like this:

my_reaction
    input.py
    TS
        TS.py <-------------------------- defines TS energy file as 'energy.out'
        energy.out
    species_1
        species_1.py <--------------- defines species 1 energy file as 'energy.out' and reads the correct energy file
        energy.out
    species_2
        species_2.py <--------------- defines species 2 energy file as 'energy.out' and reads the correct energy file
        energy.out

How To Reproduce

This one's a little tricky to reproduce exactly. You get different error messages depending on how much replacing the species e_elec with the TS e_elec changes the reaction e0. For example, I tried using the reactions/rate_demo example rearranged to the first directory structure shown above and it actually produces no official errors, but gives you absurd kinetics with an A factor of 10^34 cm^3/mol/s. You can find that example here: https://github.com/sevyharris/rmg_tools/tree/main/arkane/relative_paths_error

Expected Behavior

I don't know if this strictly counts as a bug. I think I was particularly creative with my file structure and hopefully most users will have more sense than I did and realize that the TS deserves its own directory.

But also I do think it makes sense for paths to be read in as relative to the file in which they are defined. I'll see if I can find an appropriate place in the code to suggest a change. The answer may be a warning in the documentation not to structure your directories the way I did, or to not name files in the same folder as input.py using the same basename as something else in a deeper folder.

Or maybe just making this issue is enough of a papertrail that the next person to have this problem (most likely me again in 6 months' time) will have a much easier time debugging.

Installation Information

Describe your installation method and system information.

  • OS (include version if known): WSL: Ubuntu 20.04 LTS
  • Installation method: source
  • RMG version information: 3.2.0-515-g2a1f91003
    • RMG-Py: 2a1f910
    • RMG-database: 0add9cdee2dd2e0677c765086dbcd471d1377cb4
@sevyharris sevyharris self-assigned this Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant