Add optional D3(BJ) dispersion to the DFTB+ engine - #89
Merged
Conversation
Add an opt-in Grimme D3 dispersion correction (Becke-Johnson damping) for the DFTB+ Hamiltonian, using the 3ob-recommended parameters from the DFTB+ manual (a1=0.5719, a2=3.6017, s6=1.0, s8=0.5883). Default is no dispersion so existing results are unchanged. - _dispersion_kwargs helper in calculator/dftbplus.py - dispersion argument on dftbplus_thermo (merged into the Geoopt/Hessian kwargs) - dispersion argument on screen and a --dispersion d3-bj CLI flag Closes #88
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
==========================================
+ Coverage 96.91% 96.93% +0.01%
==========================================
Files 28 28
Lines 1685 1695 +10
==========================================
+ Hits 1633 1643 +10
Misses 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Raise ValueError (not TSValueError) for an unknown dispersion model, to match _spin_kwargs/resolve_parameter_set in the same module. Add tests asserting dispersion is injected into both the Geoopt and Hessian steps and absent by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 3ob/mio DFTB+ Hamiltonians carry no dispersion, biasing conformer and non-covalent/redox energetics. This adds an opt-in Grimme D3(BJ) correction (default off, so existing results are unchanged), using the 3ob-recommended parameters straight from the DFTB+ manual:
a1=0.5719, a2=3.6017, s6=1.0, s8=0.5883._dispersion_kwargs("d3-bj")incalculator/dftbplus.pyemits theHamiltonian_Dispersion*blockdispersion=ondftbplus_thermo(merged into the Geoopt/Hessian kwargs like solvation)dispersion=onscreenand a--dispersion d3-bjCLI flagRequires a DFTB+ build with D3 support. Unit-tested (helper values / None / unknown-model error) and wiring-tested (screen →
dftbplus_thermo, CLI parse +run_screenforward). Full patch coverage.Closes #88