Add mio as a selectable DFTB parameter set - #65
Merged
Merged
Conversation
Introduce a `parameter_set` selector so a run can pick between the 3ob (DFTB3) and mio (DFTB2) Slater-Koster sets while still needing only a structure + charge (+ optional spin). - calculator/dftbplus.py: add `dftb_mio_parameters` (second-order, no ThirdOrderFull/Hubbard derivatives) and a `DFTB_PARAMETER_SETS` registry with `resolve_parameter_set()`. `_spin_kwargs` now takes the spin-constant table so each set supplies its own. mio reuses the authoritative 3ob spin constants: mio ships none, and the atomic spin constant is only weakly functional-dependent for H/C/N/O/S, so the well-documented 3ob values (spinw.hsd, matching the DFTB+ manual's H2O example) are the best available choice. - thermo/api.py, thermo/screening.py, cli/thermo.py: thread the set selection through `dftbplus_thermo`, `screen`, and the `screen` CLI (`--parameter-set 3ob|mio`). - cli/dftb_setup.py: generalise the Slater-Koster downloader to any set; `setup-dftb --parameter-set mio` fetches mio-1-1 from its release. Validated end-to-end against real DFTB+: a mio OH radical runs colinear spin-polarised (DFTB2, UnpairedElectrons = 1) and produces sensible thermochemistry; 3ob is unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65 +/- ##
==========================================
+ Coverage 96.23% 96.31% +0.08%
==========================================
Files 22 22
Lines 1328 1358 +30
==========================================
+ Hits 1278 1308 +30
Misses 50 50
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:
|
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.
Adds a
parameter_setselector so a run can choose between the 3ob (DFTB3) and mio (DFTB2) Slater-Koster sets, while still needing only a structure + charge (+ optional spin) — spin polarisation and constants follow from the set automatically.What changed
calculator/dftbplus.py: newdftb_mio_parameters(second-order model — noThirdOrderFull/Hubbard derivatives) and aDFTB_PARAMETER_SETSregistry resolved viaresolve_parameter_set()._spin_kwargsnow accepts the spin-constant table so each set supplies its own.thermo/api.py,thermo/screening.py,cli/thermo.py: thread the selection throughdftbplus_thermo,screen, and the CLI (thermo screen --parameter-set 3ob|mio).cli/dftb_setup.py: generalise the Slater-Koster downloader —thermo setup-dftb --parameter-set miofetchesmio-1-1from its release.mio spin constants
mio is the LDA-based Elstner-1998 set and ships no spin constants of its own. The atomic spin constant is only weakly functional-dependent for H/C/N/O/S, and the only well-documented organic values (3ob's
spinw.hsd, matching the DFTB+ manual's own H₂O example: H-0.072, OWpp -0.028) are the authoritative choice — so mio reuses the 3ob constants. The real difference between the sets is the Hamiltonian (DFTB2 vs DFTB3).Validation
screen(parameter_set="mio"): an OH radical runs colinear spin-polarised (DFTB2,UnpairedElectrons = 1, constantsH -0.07174/O -0.02785) and yields sensible thermochemistry; 3ob is unchanged.mio-1-1release (36.skffiles).DFTB_PREFIXset (29 passed, 0 skips).