Skip to content

Add Thermo.temperature_scan reusing one Hessian - #91

Merged
galjos merged 2 commits into
mainfrom
temperature-scan
Jul 7, 2026
Merged

Add Thermo.temperature_scan reusing one Hessian#91
galjos merged 2 commits into
mainfrom
temperature-scan

Conversation

@galjos

@galjos galjos commented Jul 7, 2026

Copy link
Copy Markdown
Member

The electronic energy, geometry and frequencies are temperature-independent, so a single (expensive) DFTB+/Hessian run can serve a whole temperature scan.

Thermo.temperature_scan(temperatures) rebuilds a Thermo at each temperature, reusing the same System (and this object's pressure/engine/quasi_rrho), runs it, and returns the list — leaving the original object unchanged. Safe because run() doesn't mutate the system (coord() returns a fresh array; _transform_units is disabled).

Tested (reuse of the same System object, temperatures set, thermochemistry varies with T, empty list, negative-T raises). Docs + full patch coverage.

Closes #90

Recompute the thermochemistry across a list of temperatures from a single
DFTB+/Hessian run: temperature_scan reuses the same System (and this
object's pressure/engine/quasi_rrho) and returns a run Thermo per
temperature. run() does not mutate the system, so the reuse is safe.

Closes #90
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.94%. Comparing base (72239aa) to head (91404a6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
+ Coverage   96.93%   96.94%   +0.01%     
==========================================
  Files          28       28              
  Lines        1695     1702       +7     
==========================================
+ Hits         1643     1650       +7     
  Misses         52       52              
Flag Coverage Δ
unittests 96.94% <100.00%> (+0.01%) ⬆️

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 723c53e into main Jul 7, 2026
3 checks passed
@galjos
galjos deleted the temperature-scan branch July 7, 2026 09:21
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.

Temperature scan reusing a single Hessian

1 participant