Skip to content

Add a G4 harmonic frequency scale factor entry (0.994) - #1004

Merged
alongd merged 1 commit into
mainfrom
i018-g4-scale-factor
Aug 21, 2026
Merged

Add a G4 harmonic frequency scale factor entry (0.994)#1004
alongd merged 1 commit into
mainfrom
i018-g4-scale-factor

Conversation

@alongd

@alongd alongd commented Aug 21, 2026

Copy link
Copy Markdown
Member

Prepared by the campaign manager (ticket I-001, dispatch D-002).

What this adds

One entry in data/freq_scale_factors.yml:

  'g4, software: gaussian':
    factor: 0.994
    source: 4
    note: '0.980 * 1.014, the 0.980 value is the ZPE scale factor of G4, fitted with Truhlar''s method over the 15-species standard set'

Nothing else in the file is touched, and no behaviour changes — this is data.

Why

G4 had no entry, so assign_frequency_scale_factor() returned None for
str(Level(repr='g4')) == 'g4, software: gaussian'. ARC then falls through to fitting the factor
on the fly, spawning quantum-chemistry jobs on every project that uses G4; Arkane, downstream,
assumes unity.

Where the number comes from

arc.utils.scale.determine_scaling_factors(['g4'], ess_settings={'gaussian': ['zeus']}) was run
over its fixed 15-species standard set (C2H2, CH2O, CH4, CO, CO2, Cl2, F2, H2, H2O, HCN, HF, N2,
N2O, NH3, OH). All 15 G4 composite jobs converged with Gaussian 16.

λ_ZPE = 0.98046, and 0.980 × 1.014 → 0.994.

Two notes on the fit:

  • The harmonic Zero-point correction= line was used, not the composite summary's E(ZPE).
    The latter already carries G4's built-in ZPE scale factor (0.9854, visible as the ratio between
    the two lines in every one of the 15 logs), and fitting against it would divide out the very
    quantity being measured.
  • The driver itself does not reach the fit for a composite level: scale.py:98 sets
    job_types['freq'] = False, so no frequency job runs, yet scale.py:107-112 reads
    output/Species/<label>/geometry/freq.out, which only a frequency job writes. It therefore
    raises FileNotFoundError after all 15 jobs have run. That defect is not addressed here — it
    is a separate ticket. The ZPEs were recovered offline from the raw
    calcs/Species/<label>/composite_a<N>/input.log files the scheduler had already downloaded, and
    the fit was reproduced from them.

Verifier that was run

  • assign_frequency_scale_factor(Level(repr='g4'))0.994, where it previously returned None.
    Same for the string form 'g4, software: gaussian'.
  • The offline recovery's per-species ZPEs and final λ_ZPE were cross-checked against ARC's own
    arc.parser.parser.parse_zpe_correction and arc.utils.scale.calculate_truhlar_scaling_factors
    to within 1e-9 relative — they agreed on all 15 species and on λ_ZPE.
  • pytest arc/level_test.py → 15 passed.

Sanity

0.994 sits between the published neighbouring methods (0.961, 0.967) and the CBS-QB3 arm's
0.99 × 1.014 = 1.004, nearer the latter. That is the expected neighbourhood for a composite
method whose own built-in ZPE factor is 0.9854.

Companion change

A matching one-entry addition to RMG-database's freq_dict
(input/quantum_corrections/data.py, keyed "LevelOfTheory(method='g4')", same value 0.994) is
committed locally and will be opened separately by the project owner. Without it Arkane still
computes zpe_scale_factor = 1.0 / 1.014 for G4.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.49%. Comparing base (ad80021) to head (ad99402).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1004      +/-   ##
==========================================
+ Coverage   64.46%   64.49%   +0.03%     
==========================================
  Files         119      119              
  Lines       39636    39636              
  Branches    10276    10276              
==========================================
+ Hits        25551    25565      +14     
+ Misses      11097    11091       -6     
+ Partials     2988     2980       -8     
Flag Coverage Δ
functionaltests 64.49% <ø> (+0.03%) ⬆️
unittests 64.49% <ø> (+0.03%) ⬆️

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a missing frequency scale factor mapping for G4 (Gaussian) so ARC can resolve the factor via assign_frequency_scale_factor() instead of falling back to on-the-fly fitting (and downstream tools defaulting to unity).

Changes:

  • Add a freq_scale_factors.yml entry for 'g4, software: gaussian' with factor: 0.994 (source 4) and an explanatory note.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@alongd
alongd force-pushed the i018-g4-scale-factor branch 2 times, most recently from 21c7a27 to 555b8fb Compare August 21, 2026 19:26
Add 'g4, software: gaussian' (factor 0.994) to data/freq_scale_factors.yml,
fitted with Truhlar's method over the 15-species standard set.

Update level_test.py::test_assign_frequency_scale_factor_from_str to use the
still-unlisted composite g4mp2 for the returns-None case, since g4 now resolves.
@alongd
alongd force-pushed the i018-g4-scale-factor branch from 555b8fb to ad99402 Compare August 21, 2026 20:07
@alongd
alongd merged commit 4b7e0e5 into main Aug 21, 2026
8 checks passed
@alongd
alongd deleted the i018-g4-scale-factor branch August 21, 2026 22:55
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.

2 participants