You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ARC hands off to Arkane for thermochemistry, it needs to look up
atom energy corrections (AEC), bond additivity corrections (BAC), and
frequency scale factors from the RMG-database
quantum_corrections/data.py. That file uses RMG's own naming convention
— all lowercase, no hyphens, and sometimes year-suffixed variants like
b97d32023 alongside b97d3.
Previously, ARC did exact string matching against these entries. If a
user wrote CCSD(T)-F12/cc-pVTZ-F12 and the database had
ccsd(t)f12/ccpvtzf12, it wouldn't match. Users had to know RMG's
internal naming to get corrections applied.
## Changes
1. `Level.year` attribute
Adds an optional year (4-digit int) to the Level class. Validated on
construction, included in __str__, simple(), as_dict(), and build() for
serialization/restart support.
2. Fuzzy matching engine
- _normalize_method: lowercase, strip hyphens → DLPNO-CCSD(T)-F12
becomes dlpnoccsd(t)f12
- _normalize_basis: lowercase, strip hyphens and spaces → cc-pVTZ-F12
becomes ccpvtzf12
- _split_method_year: extracts trailing 4-digit year → b97d32023 →
(b97d3, 2023)
- _parse_lot_params: regex-extracts method/basis/software from
LevelOfTheory(...) strings
- _find_best_level_key_for_sp_level: core matcher — iterates all
LevelOfTheory(...) keys in a data.py section, normalizes both sides, and
selects by year priority:
- Explicit year → exact match only
- No year specified + no-year entry exists → prefer it
- No year specified + only year-suffixed entries → pick latest
- _find_best_across_files: searches multiple data.py locations in
priority order
- _warn_no_match / _all_available_years: actionable warnings listing
what years are available
- _extract_section: now supports section_end=None (read to EOF), fixing
the freq_dict section which is last in the file
3. `arkane_level_of_theory` changes in `input.yml`
The year is specified on arkane_level_of_theory, the Level object
dedicated to Arkane lookups:
```yml
arkane_level_of_theory:
method: b97d3
basis: def2tzvp
year: 2023
```
Most users won't need year at all — the fuzzy matching handles the
common case automatically.
4. Doc updates
Documents the year key on arkane_level_of_theory, warns against putting
year suffixes in level_of_theory, explains the fallback behavior.
0 commit comments