Skip to content

Keep PySCF dispersion state consistent across molecule resets - #248

Merged
awvwgk merged 3 commits into
mainfrom
copilot/fix-pyscf-wrapper-reset-molecule
Oct 27, 2026
Merged

awvwgk merged 3 commits into
mainfrom
copilot/fix-pyscf-wrapper-reset-molecule

Conversation

Copilot AI commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PySCF dispersion corrections must track molecule changes during resets and scanner calls. No-argument resets currently clear the dispersion molecule, while Hessian resets are unimplemented.

  • Reset handling: Preserve the molecule on no-argument energy resets; propagate Hessian resets through the mean-field base. Gradient resets use the existing base propagation.
  • Regression coverage: Cover all three wrappers and compare energy/gradient scanners against fresh calculations after geometry changes.

Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix PySCF wrapper to reset molecule in scanner Keep PySCF dispersion state consistent across molecule resets Oct 26, 2026
Copilot AI requested a review from awvwgk October 26, 2026 19:06
@awvwgk
awvwgk marked this pull request as ready for review October 26, 2026 19:11
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.34%. Comparing base (4db8e3e) to head (0d4f9de).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
python/dftd3/pyscf.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
- Coverage   63.39%   63.34%   -0.06%     
==========================================
  Files          47       47              
  Lines        6844     6850       +6     
  Branches     2435     2435              
==========================================
  Hits         4339     4339              
- Misses       1191     1197       +6     
  Partials     1314     1314              

☔ 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.

Co-authored-by: awvwgk <28669218+awvwgk@users.noreply.github.com>
@awvwgk
awvwgk merged commit 2e437bd into main Oct 27, 2026
53 checks passed
@awvwgk
awvwgk deleted the copilot/fix-pyscf-wrapper-reset-molecule branch October 27, 2026 07:11
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.

PySCF wrapper does not reset molecule when used as scanner

2 participants