Skip to content
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

Implement harness for DFT-D3 Python API #343

Merged
merged 2 commits into from Jul 7, 2022
Merged

Conversation

awvwgk
Copy link
Contributor

@awvwgk awvwgk commented Jan 24, 2022

Closes #341

Description

Implement harness for DFT-D3 Python API with native QCSchema support. Allows access to the parameter database and adds those entries to the definitions in the dispersion resources.

Changelog description

Implement harness for DFT-D3 Python API

Status

  • Code base linted
  • Ready to go

@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #343 (63d12dc) into master (113d1e8) will increase coverage by 0.52%.
The diff coverage is 94.17%.

@awvwgk

This comment has been minimized.

@loriab
Copy link
Collaborator

loriab commented Feb 10, 2022

At first read-through, this lgtm. Thanks very much for working on this! I am hopefully finishing up libint2 work soon. Then shifting psi4 to the new d3 and gcp implementations is next on my agenda.

@awvwgk
Copy link
Contributor Author

awvwgk commented May 14, 2022

Friendly bump, what is necessary to move this patch forward?

@loriab loriab added the Feature Add a new feature to the project label Jun 24, 2022
@loriab
Copy link
Collaborator

loriab commented Jun 24, 2022

lgtm, thank you!

Fwiw, I don't find any interference wrt the older implementations in downstream testing so far. Would you like to rebase so correct CI lanes run, or would you like me to rebase and force-push to your branch?

Friendly bump, what is necessary to move this patch forward?

Apologies, the Psi4 release got busy. I held out hope until the beginning of May that we could transition to the new harnesses, but I didn't make it.

- fetch D3 damping parameters from dftd3.parameters if available
- adjust CI to allow testing of DFT-D3 Python API
@loriab
Copy link
Collaborator

loriab commented Jun 24, 2022

btw, if you do the rebase, be aware I added this to get tests to pass https://github.com/MolSSI/QCEngine/blob/master/devtools/conda-envs/opt-disp.yaml#L14 . Possibly it interferes with this PR.

@awvwgk
Copy link
Contributor Author

awvwgk commented Jun 24, 2022

Will have to check, I had the idea to update the CODATA version in all our programs, however the test accuracy is lower than the change in conversion factors...

@loriab
Copy link
Collaborator

loriab commented Jun 24, 2022

From what I remember differences were quite small. Maybe physconst change effect on the geometry -- I don't remember if it originates in angstroms.

@awvwgk
Copy link
Contributor Author

awvwgk commented Jun 25, 2022

Small enough to trip off the contributed tests unfortunately, I'll have to check the reference values for DFT-D3 and DFT-D4 to make sure the CODATA change doesn't affect any energy / gradient in the last digits.

@loriab
Copy link
Collaborator

loriab commented Jul 5, 2022

Small enough to trip off the contributed tests unfortunately, I'll have to check the reference values for DFT-D3 and DFT-D4 to make sure the CODATA change doesn't affect any energy / gradient in the last digits.

Any suggestions on solving the test failure? Do reference results or physconst need adjusting here?

@awvwgk
Copy link
Contributor Author

awvwgk commented Jul 6, 2022

Any suggestions on solving the test failure? Do reference results or physconst need adjusting here?

I need to update the reference results, which is quite unfortunate.

Has been a while since I looked last into this patch, currently have a couple of other projects I want to move forward now that my only have three months of my PhD time in Bonn left. Hopefully I'll come back to this one soon.

@loriab
Copy link
Collaborator

loriab commented Jul 6, 2022

I need to update the reference results, which is quite unfortunate.

Has been a while since I looked last into this patch, currently have a couple of other projects I want to move forward now that my only have three months of my PhD time in Bonn left. Hopefully I'll come back to this one soon.

Understood -- finishing up definitely takes priority.

If it's a matter of reference values, not correctness, would it be reasonable if I loosened the checks and filed an issue to be revisited later? Or was it contributions from physconst vs. correctness that you wanted to check up on first?

@awvwgk
Copy link
Contributor Author

awvwgk commented Jul 6, 2022

Loosening the thresholds is an option.

@loriab loriab mentioned this pull request Jul 6, 2022
Copy link
Collaborator

@loriab loriab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you for unifying these!

If the test loosening is tolerable, I think this is RTG.

@@ -662,6 +662,21 @@
"hf": {"params": {"s6": 1.000, "s8": 0.713190, "a1": 0.079541, "a2": 3.627854}}, # JBS 01/2021
},
},
"d3op": {
"formal": "D3(op)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"formal": "D3(op)",
"formal": "D3(OP)",

can this be all-caps for consistency? I suspect psi4 is expecting it so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was called D3(op) with lowercase op in the original publication: https://pubs.acs.org/doi/10.1021/acs.jctc.7b00176.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think D3(bj) was published with mixed-case, too. Maybe that's the better direction. Deferred for now.


However, we are not happy with the structure of the dict and
therefore do some restructuring. The below solution tries to bend
the data returned by dftd3 into the right shape to make qcng happy.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. and sorry for the historical necessity.

Copy link
Contributor Author

@awvwgk awvwgk Jul 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least I learned something about the things one can do with dict-comprehension in Python.

@loriab loriab merged commit 4348720 into MolSSI:master Jul 7, 2022
@awvwgk awvwgk deleted the dftd3 branch November 5, 2022 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Add a new feature to the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Harness for DFT-D3 Python API
2 participants