-
Notifications
You must be signed in to change notification settings - Fork 438
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
allow and prefer simple-dftd3 and mctc-gcp #2791
Conversation
@@ -149,7 +149,7 @@ | |||
} | |||
}, | |||
"dispersion": { | |||
"type": "d3bj", | |||
"type": "d3bj2b", |
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.
Worth checking if ATM should stay off. Can't recall what the paper recommended.
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.
According to eqns 42, 44, 52 in https://psi-k.net/download/highlights/Highlight_144.pdf , ATM is off, on, on for HF-3c, PBEh-3c, B97-3c. But I also realize I don't know if gCP could be covering that.
For the moment, this change is preserving the previous behavior. So there's still the opportunity for a deliberate fix to match the literature later.
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.
Agree with preserving the old behavior for now.
@@ -534,7 +534,7 @@ def get_pw6b95_tweaks(): | |||
}, | |||
"dispersion": { | |||
"nlc": False, | |||
"type": "d3bj", | |||
"type": "d3bj2b", |
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.
If it stays d3bj
then it depends on the engine if the 3-body term is included? Slightly confused about the aliases on the initial reading.
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.
The ATM default for classic dftd3 is off and s-dftd3 is on, so that's what a raw qcengine call would do since qcengine's mandate (approximately) is pass-through data rearrangement. Psi4's goal is an even interface over all the disp programs, so it pre-solves the parameters and makes a customized request to either qcengine harness. That way, the Psi4 default is 2-body, no matter whether dftd3 or s-dftd3 is available. If one requests b3lyp-d3bjatm and only classic dftd3 is around, it'll balk. Somewhere I'll need to document that better.
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.
Reading this again, I think I understand the question. If the user had an input with d3bj, no need to edit, as d3bj did and now continues to default to 2body-only, regardless of engine. I changed the type here (1) to emphasize that d3bj2b is the fundamental type rather than d3bj and (2) these definitions, as opposed to input files, don't get aliases applied so they need the fundamental type (possibly I relaxed this).
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.
I asked because of your point (2). We developers then need to pay attention to the correct type.
However users with old input files might get slightly different results if they use a custom functional. Likely a very very small number of users. Those probably read the changelog.
okay to not relax this.
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.
I've checked with the dft-custom test, and one can use the aliases in custom functionals, so old inputs will work and answers not change. Apparently the fundamental type requirement was an earlier version of the code.
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.
I appreciate the many tests!
Looks good overall, but I defer to Holger on the points he raised.
I only hope they're enough. there's 5 disp programs out there governed by 4 sets of logic and about 3 sets of defaults. :-) |
@@ -149,7 +149,7 @@ | |||
} | |||
}, | |||
"dispersion": { | |||
"type": "d3bj", | |||
"type": "d3bj2b", |
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.
Agree with preserving the old behavior for now.
@@ -534,7 +534,7 @@ def get_pw6b95_tweaks(): | |||
}, | |||
"dispersion": { | |||
"nlc": False, | |||
"type": "d3bj", | |||
"type": "d3bj2b", |
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.
I asked because of your point (2). We developers then need to pay attention to the correct type.
However users with old input files might get slightly different results if they use a custom functional. Likely a very very small number of users. Those probably read the changelog.
okay to not relax this.
Description
User API & Changelog headlines
psi4::dftd3
bin/dftd3
conda-forge::dftd3-python
import dftd3
conda-forge::simple-dftd3
bin/simple-dftd3
psi4::dftd4
bin/dftd4
,import dftd4
conda-forge::dftd4-python
import dftd4
conda-forge::dftd4
bin/dftd4
psi4::gcp
bin/gcp
conda-forge::gcp-correction
bin/mctc-gcp
dftd3
ands-dftd3
. In particular, the former can also do -D2 and the latter can do 3-body -D3 in the same call as 2-body -D3. All Psi4 calls will continue to do only 2-body -D3 as default (regardless ofdftd3
ors-dftd3
engine). That is,-d3
is still an alias to-d3zero
which is now an alias to a new extension-d3zero2b
, which can now be given explicitly disallow 3-body as a tweakable parameter (internally,s9:=0.0
). Whens-dftd3
is the engine, another set of new extensions, e.g.,-d3atm
alias of-d3zeroatm
turns on 3-body (s9=1.0
) and allows user tweaks. This latter is the same behavior as -D4, which turns on 3-body by default. If this seems confusing, state what calc you want — e.g.,energy("b3lyp-d3atm")
— and Psi4 will figure out if you have the right engine to do the job.dftd3
was scaled differently from that bys-dftd3
anddftd4
(any channel). This has been fixed. However, one must be consistent about QCEngine/Psi4/fsapt.py versions. A consistent set are QCEngine >=0.26.0 andEmpirical_Disp.dat
file generated in the course ofenergy("fisapt0-d")
by this PR or later Psi4 (approx. v1.7.0 Psi4) and scriptfsapt.py
released with Psi4 v1.7.0 or later. This is semi-enforced since v1.7 requires v0.26 (fsapt.py
is a free agent). Another consistent set is QCEngine <0.26.0 and Psi4 andfsapt.py
<v1.7. Mixing old Psi4 or fsapt.py with new QCEngine and classic dftd3 can yield wrong fisapt analysis, and this isn't trapped.psi4.core.Molecule.run_dftd3
andqcdb.Molecule.run_dftd3
don't work withs-dftd3
. Please file an issue if you really want this capability.run_gcp
will use classicgcp
ormctc-gcp
interchangeably, whichever you have available.Dev notes & details
_engine_can_do
and observe that compared to good ol' dftd3, s-dftd3 (aka simple-dftd3) can't do d2 and by default does d3 variants with ATM dispersion built in (s9=1.0)except for test_dftd3_mp2ddoesn't work at all -- WIPnow worksChecklist
Status