Repository navigation
pdep: reuse one raw level under either year spelling - #229
Conversation
The corrections database gained no-year wb97xd and dlpno-f12 keys beside the 2023 ones, so ARC now resolves a no-year request to a different key than older captures froze. - Admission: a capture is admissible when ARC resolves the same request, with its SP year removed or pinned to the capture's year, to the capture's model_chemistry. The energy-reference check (C4) is unchanged. - Emission: a hybrid network is written under this run's resolved level; a capture with no frequency scale factor gets the run's frequency-level factor. - The hybrid writer raises on a missing frequencyScaleFactor instead of omitting it. Tests request frozen ARC literals by the level that names their year, compute ARC's own literal at run time, pin the tie-break on a synthetic corrections database (skipping if ARC's section markers move), and guard against a reintroduced yeared literal.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
==========================================
+ Coverage 81.92% 81.99% +0.06%
==========================================
Files 78 78
Lines 12947 12982 +35
Branches 2732 2740 +8
==========================================
+ Hits 10607 10644 +37
+ Misses 1694 1689 -5
- Partials 646 649 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The regression tests can miss regressions in no-year capture adoption and model-chemistry relabeling because one requests the original yeared level and the other depends on installed database contents.
2 open issues
What changed in this PR
This PR makes pressure-dependent QM capture reuse tolerant of year-suffixed and yearless spellings that ARC resolves for the same raw level, while preserving energy-reference checks.
Changes:
- Broaden capture admission through ARC-resolved spelling variants.
- Emit hybrid networks under the run’s resolved level, fill missing frequency scale factors where available, and reject unresolved factors.
- Update frozen fixtures and regression tests for spelling compatibility and stricter emission requirements.
| File | Description |
|---|---|
tests/test_pdep/test_pes_qm.py |
Add spelling compatibility, emission, and frozen-expectation checks. |
tests/test_pdep/test_pes_loop_source_seed.py |
Supply a frequency scale factor in the source-seed fixture. |
tests/test_pdep/test_pes_loop_integration.py |
Read frozen chemistry from ARC output and explicitly request its year. |
tests/test_pdep/test_main_wiring.py |
Add a scale factor to the wiring fixture. |
tests/test_pdep/test_hybrid.py |
Test missing-factor rejection and update fixtures. |
tests/test_pdep/test_capture.py |
Add a scale factor to the capture fixture. |
t3/pdep/pes_qm.py |
Resolve admissible spelling variants and prepare run-specific emission settings. |
t3/pdep/hybrid.py |
Require a frequency scale factor when writing hybrid networks. |
Review effort: Balanced
[Medium impact] The changes affect the bounded P-dep capture-reuse and hybrid-network workflow. The PR appears safe to merge, with a non-blocking gap in the new adoption test. Findings
SummaryThe PR lets capture admission consider ARC's year and no-year spellings of the same requested level.
Intentional behavior acknowledged by
|

Summary
A no-year
wb97xdkey appeared in the corrections database beside thewb97xd2023one, so ARC nowresolves a no-year request to a different key than older captures froze. T3's side of that
resolution is made spelling-agnostic.
Evidence
Before:
tests/test_pdepwent red with no commit in this repository. RMG-database1a2c04686(PR #603, 2026-11-15) added a no-yearLevelOfTheory(method='wb97xd', basis='def2tzvp', software='gaussian')beside the existingwb97xd2023. ARC's tie-break prefers the no-year entry when the request carries no year, so theexpectations frozen against
wb97xd2023became the stale side of a comparison that used to hold.After: admission compares what ARC resolves rather than a literal, so either spelling of the
same raw level reuses the same capture. The tests no longer freeze ARC's answer: they request a
frozen literal by the level that names its year, compute ARC's own literal at run time, pin the
tie-break on a synthetic corrections database (skipping if ARC's section markers move), and carry a
guard against a yeared literal being reintroduced.
tests/test_pdep/test_pes_qm.pycarries the bulk of it (+344/-…); the suite is green on the branchand the 14 inherited failures on sibling branches are exactly this set.
Merge Danger
Door: two-way.
Blast Radius: capture reuse.
Admission decides which frozen QM captures a run may reuse, so a wrong widening would reuse a
capture computed at a genuinely different level. That is why the energy-reference check (C4) is
left untouched and the comparison is "ARC resolves the same request", not "the strings look
similar". The emission change makes a missing
frequencyScaleFactorraise rather than beomitted silently, which is a deliberate fail-closed: a network written without one is wrong in a
way nothing downstream would notice.
Scope of the repair
This repairs a round whose captures were all adopted under either spelling of the same raw
level. A round that mixes a new capture with an old-spelling one is still refused, and that
refusal is deliberate: the two were computed against different corrections entries, so reusing them
together would compare energies that do not share a reference.
The energy-reference check (C4) is untouched, and with the admission gate above the emitted level
label and the frozen atom energies agree by construction — admission only accepts a capture whose
model_chemistryis what this run's request resolves to, which is the same key the atom energieswere frozen under.