-
Notifications
You must be signed in to change notification settings - Fork 85
Implement support for DFT-D4 #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- implement harness for dftd4 Python API
Can |
|
don't worry about nwchem::test_error_correction -- it's ~20% flaky |
This should be the way to go, for now I want to just flesh out the Python API of I would be more interesting if the proposed interface is optimal for your purpose. I'm using the keywords to specify the damping parameters or the method name that should be looked up in the internal database. For |
The Python API alone will be great, thank you. No need for file + cmdline route -- that was just the only way circa 2012. If it's all the same to you, would you adapt the fields toward https://github.com/psi4/psi4/blob/master/psi4/driver/procrouting/empirical_dispersion.py#L193-L209 ? Main changes are:
d3/d4 don't fit too well into the AtomicInput layout, unfortunately, but the above would be helpful in integrating into psi if it's not too much trouble. |
|
Sounds good to me, DFT-D4 will provide this interface in the Python API for running QCSchema input. The only particularity, I don't allow to overwrite individual damping parameters, so either a method name or all parameters are required. |
That's no problem for psi, as once user input passes through the resolver, a full set of parameters is always provided. Thanks for the changes. |
|
DFT-D4 3.1.0 is rolled out to conda-forge, just another hour until it propagates through the CDN and we can use it here to setup the testing environment. |
|
What is the current status of this patch? It has been stale for a while now, is there anything I can do to help move this forward? |
I think it's great and good to merge. I'm sorry for the delay; I was hoping to get awvwgk#63 merged into this beforehand, but then I got a cycle behind you on dftd4 revisions and didn't revisit. Shall we get this merged sooner, and then I'll propose updates once I've rechecked the abovementioned harness PR and psi4/psi4#2142 ? |
|
This pull request introduces 1 alert when merging 8fdefe5 into 43639f2 - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging e805d1b into 43639f2 - view on LGTM.com new alerts:
|
|
@loriab, sorry, I didn't see the PR against my fork, I usually don't watch my own forks because I have bots syncing them with upstream via PRs, so 99% of the activity there is usually noise (or myself). I had a quick look over your changes and added a few adjustments to the parameter reading. I also wonder why qcng is calling it |
|
There are a few tests from test_dftd3 now failing, but I guess those are the added tests for dftd4. I think we should come up with a clearer naming here, otherwise this is just confusing. Any idea why those fail? Did I break something upstream already? |
|
This pull request introduces 1 alert when merging f83605a into 43639f2 - view on LGTM.com new alerts:
|
|
I might have to look into the damping parameter generation again, we might be propagating a bad API decision from the C or Python layer up into qcng here (see dftd4/dftd4#98). It might be worth to make both method and param_tweaks input an error at the Python level in dftd4, catch in the qcschema runner in dftd4 and send it back as ComputeError to qcng at some point until dftd4 is actually able to handle this case (load method first, overwrite parameters one by one). |
loriab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for merging and all the patching. I've made a couple suggestions, but with those, the psi4 PR seems to be working, too. Will rebase psi4 and do another check tomorrow.
| "citation": " Caldeweyher, E.; Ehlert, S.; Hansen, A.; Neugebauer, H.; Spicher, S.; Bannwarth, C.; Grimmme, S., J. Chem. Phys. 150, 154122 (2019)\n", | ||
| "bibtex": "Caldeweyher:2019:154122", | ||
| "doi": "10.1063/1.5090222150", | ||
| "default": collections.OrderedDict([("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("s9", 1.0)]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "default": collections.OrderedDict([("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("s9", 1.0)]), | |
| "default": collections.OrderedDict([("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("s9", 1.0)]), | |
| "default": collections.OrderedDict( | |
| [("s8", 1.0), ("a1", 1.0), ("a2", 1.0), ("s9", 1.0), ("s6", 1.0), ("alp", 16.0)] | |
| ), |
|
Was renaming the reference values like 89f4676#diff-c24ed775befa47b0b9de0da35810c7a47d5a6c5aa7c35b3e892a8b12abb09de6L78 solely to get the tests to work? Or do you very much not want the current definition of D4 to appear under the D4(BJ) label? I ask because I think that renaming of the refs is hiding another problem. Right now without I can fix all this up. But I'd like to (1) not have |
|
Naming the dashlevel D4(BJ) is not completely accurate actually, we defined D4 as alias for D4(BJ, EEQ)-ATM in the original DFT-D4 publication, which was one of four potential methods we tested in the course of that work (D4(BJ, GFN2-xTB)-ATM, D4(BJ, GFN2-xTB)-MBD and D4(BJ, EEQ)-MBD were the other three). Therefore, I'm not completely happy with D4(BJ) because it misses the actual important information on the dispersion model. |
Makes sense. Not recording the 3-body aspect was worrying me a bit, too. See what you think of awvwgk#65, please. It gives me a clean test suite for qcng and for psi4 psi4/psi4#2142. Also feel free to rebase to incorporate #297 test suite fixes. |
|
Thanks for the merge. I've push a commit directly to try to fix the d4 CI. |
loriab
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Thanks for all the extra features and your patience with changes for psi4.
Ready to merge in your view?
|
FYI, upon |
|
Maybe this will not trip off the check in Psi4? I have to admit it's a bit hacky. diff --git a/qcengine/programs/empirical_dispersion_resources.py b/qcengine/programs/empirical_dispersion_resources.py
index f89bfd7..adbe4f1 100644
--- a/qcengine/programs/empirical_dispersion_resources.py
+++ b/qcengine/programs/empirical_dispersion_resources.py
@@ -866,7 +866,7 @@ def _get_d4bj_definitions() -> dict:
citation = params.pop("doi", None)
definitions[method] = dict(
params=params,
- citation=citation,
+ citation=" " + citation + "\n",
)
except KeyError:
continue |
Yes, that works nicely, thanks. |
|
Thanks a lot for your help. It took a long way to finally make DFT-D4 available here, but I think the |
Description
dftd4Python API (closes Implement DFT-D4 harness #174)dftd4release)Note:
The Python API must be explicitly enabled when building
dftd4or can exist separately from adftd4installation.The harness can therefore fail to use
dftd4even if adftd4installation is present, in this case it could have a fallback for a FIFO calculator (xyz + command line input, JSON dump output), but this is work for a different PR.Changelog description
Implement support for DFT-D4
Status