Skip to content

Compute every E0 the TS energy check compares in one statmech run - #1065

Open
calvinp0 wants to merge 1 commit into
mainfrom
fix_rxn_e0_restart_corrections
Open

calvinp0 wants to merge 1 commit into
mainfrom
fix_rxn_e0_restart_corrections

Conversation

@calvinp0

@calvinp0 calvinp0 commented Oct 1, 2026

Copy link
Copy Markdown
Member

The TS E0 check compared E0 values computed under different corrections

compute_rxn_e0 skipped every species whose e0 was already set, and check_ts kept those values. On a restart, or when a reaction is added after the thermo Arkane run, the wells therefore carried the E0 of the thermo run, which applies bond additivity corrections whenever bac_type is set (the default is 'p'), while the TS E0 came from the check's own statmech run with bac_type=None. check_rxn_e0 then compared well and TS E0 values that differ by the wells' BAC, and could reject a valid TS or accept an inconsistent one. A fresh run is not affected, since the check runs before thermo.

compute_rxn_e0 now clears the E0 of every participant on its reaction copy and computes all of them in its one statmech run (atom corrections on, bond corrections off, as in the kinetics run). check_ts runs the check on that copy, copies the verdict back, and overwrites the TS E0 on the given reaction with the fresh value; the wells' E0 values already set on the given reaction are left intact.

Also fixed on the way:

  • A reaction with the same species on both sides (CH3 + CH4 ⇌ CH4 + CH3) passed that label to Arkane twice, which Arkane rejects; each label is now passed once.
  • The skip also compared every later TS guess against the first guess's E0, because switch_ts does not reset it; the TS E0 is now recomputed for every guess.

When consistent values cannot be computed (a frequency job not done, missing statmech inputs), the E0 check is left undetermined with a warning, and the electronic energy check runs without comparing the preset values. A participant with a yml_path keeps the E0 of its YAML file as is, with a warning.

Tests (arc/checks/ts_test.py, real frequency logs in a temporary project)

  • Preset well E0 values are ignored and all participants are computed together; the verdict uses those values (on main it compares the preset wells with the TS).
  • A preset well the statmech run does not produce leaves the copy's E0 unset rather than reusing the preset value.
  • A repeated species is passed to Arkane once.
  • When the values cannot be recomputed, or the statmech run yields nothing, no False verdict is given and a warning is logged.
  • A stale TS E0 is replaced by the computed one.

arc/checks/ts_test.py: 41 passed; arc/scheduler_test.py -k "e0 or check_ts": 2 passed.

🤖 Generated with Claude Code

compute_rxn_e0 skipped every species whose e0 was already set, and check_ts
then kept those values when copying the computed ones back. On a restart, or
when a reaction is added after the thermo Arkane run, the wells therefore
carried the E0 of the thermo run, which applies bond additivity corrections
when bac_type is set (the default is 'p'), while the TS E0 came from the
check's own statmech run with bac_type=None. check_rxn_e0 then compared E0
values computed under different corrections.

compute_rxn_e0 now clears the E0 of every participant on its reaction copy and
computes all of them in its single statmech run, passing one object per label
so that a reaction with a repeated species no longer makes Arkane reject
duplicate labels. check_ts runs the check on that copy and copies the verdict
back, and it overwrites the TS E0 on the given reaction with the freshly
computed one. The old skip also compared every later TS guess against the first
guess's E0, because switch_ts does not reset it on main, so the TS E0 is now
recomputed for every guess. The wells' E0 values already set on the given
reaction are left intact.

When the consistent E0 values cannot be computed (a freq calculation is not done
or the statmech inputs are missing), the E0 check is left undetermined with a
warning, and the electronic energy check runs without comparing the preset E0
values. A participant with a yml_path keeps the E0 of its yml file as is, and a
warning says so.
@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.05%. Comparing base (d9f47ab) to head (7c6aea4).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
- Coverage   67.12%   67.05%   -0.08%     
==========================================
  Files         123      123              
  Lines       43602    43659      +57     
  Branches    11144    11152       +8     
==========================================
+ Hits        29270    29275       +5     
- Misses      11194    11232      +38     
- Partials     3138     3152      +14     
Flag Coverage Δ
functionaltests 67.05% <ø> (-0.08%) ⬇️
unittests 67.05% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant