Skip to content

Add Grimme's quasi-RRHO vibrational entropy option - #67

Merged
galjos merged 1 commit into
mainfrom
quasi-rrho-entropy
Jul 5, 2026
Merged

Add Grimme's quasi-RRHO vibrational entropy option#67
galjos merged 1 commit into
mainfrom
quasi-rrho-entropy

Conversation

@galjos

@galjos galjos commented Jul 5, 2026

Copy link
Copy Markdown
Member

Adds a quasi_rrho option (CLI --quasi-rrho) for the vibrational entropy.

Why

The rigid-rotor-harmonic-oscillator entropy of a mode diverges as its frequency → 0, so low-frequency modes (floppy torsions, weak/hindered rotors, non-covalent complexes) get a spuriously large entropy — a well-known RRHO weakness. This is also the dominant error left in implicit-solvent free energies (#66).

What

Grimme's quasi-RRHO (Chem. Eur. J. 2012, 18, 9955): each mode's entropy is interpolated between the harmonic-oscillator and free-rotor values, weighted by w = 1 / (1 + (100/ν)^4). High-frequency modes stay harmonic; low-frequency modes approach the finite free-rotor limit.

  • thermo/thermo.pyThermo(..., quasi_rrho=False); _compute_vibrational_entropy uses the new _quasi_rrho_entropy interpolation when enabled. The harmonic path is numerically unchanged, so the default preserves existing results.
  • thermo/api.py, thermo/screening.py, cli/thermo.py — thread quasi_rrho through run_thermo, dftbplus_thermo, screen, and screen --quasi-rrho.

Engine-independent (it acts on the frequencies), so it also applies to a future xTB engine.

Usage

thermo screen mols/ --solvent water --quasi-rrho

Validation

  • Physics: a molecule with 25/40 cm⁻¹ modes has its entropy reduced by ~3.4 cal/mol/K (≈ +1 kcal/mol in G) — the spurious low-mode entropy is tamed; a high-frequency-only case is unchanged (ΔS ≈ 0.01).
  • Real DFTB+: ethane (lowest real vibration 277 cm⁻¹, all > 100) gives qRRHO ≈ harmonic, and the harmonic S = 54.5 cal/mol/K matches the experimental ~54.8 — confirming the correct mode set is used.
  • Offline suite green (206 passed); real-DFTB+ integration green (54 passed, 0 skips); codecov patch fully covered.

The rigid-rotor-harmonic-oscillator entropy diverges as a vibrational mode's
frequency goes to zero, so low-frequency modes (floppy torsions, weak rotors)
get a spuriously large entropy. Add Grimme's quasi-RRHO treatment
(Chem. Eur. J. 2012, 18, 9955): each mode's entropy is interpolated between the
harmonic-oscillator and free-rotor values with weight 1/(1+(100/nu)^4), so
high-frequency modes are unchanged while low-frequency modes approach the finite
free-rotor limit.

- thermo/thermo.py: `Thermo(..., quasi_rrho=False)`; `_compute_vibrational_entropy`
  uses the new `_quasi_rrho_entropy` interpolation when enabled. The harmonic
  path is numerically unchanged, so the default preserves existing results.
- thermo/api.py, thermo/screening.py, cli/thermo.py: thread `quasi_rrho` through
  `run_thermo`, `dftbplus_thermo`, `screen`, and `screen --quasi-rrho`.

Applies to every engine (it acts on the frequencies) and pairs with implicit
solvation, where low-mode entropy is the main RRHO weakness. Validated: modes
above ~100 cm^-1 are unchanged (real DFTB+ ethane matches the harmonic result),
while a molecule with 25/40 cm^-1 modes has its entropy reduced by ~3 cal/mol/K.
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.47%. Comparing base (f6cdc58) to head (0efbf1c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   96.43%   96.47%   +0.03%     
==========================================
  Files          22       22              
  Lines        1404     1419      +15     
==========================================
+ Hits         1354     1369      +15     
  Misses         50       50              
Flag Coverage Δ
unittests 96.47% <100.00%> (+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.

@galjos
galjos merged commit c403e97 into main Jul 5, 2026
3 checks passed
@galjos
galjos deleted the quasi-rrho-entropy branch July 5, 2026 10:51
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