-
Notifications
You must be signed in to change notification settings - Fork 475
SAPT0-D4M #3172
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
SAPT0-D4M #3172
Conversation
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 the contribution!
| procedures['energy']['sapt0-' + disp] = proc.run_sapt | ||
| procedures['energy']['fisapt0-' + disp] = proc.run_fisapt | ||
|
|
||
| procedures['energy']['sapt0-d4'] = proc.run_sapt |
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.
Could this be leftover and unneeded? I'd think the block above could catch and define this.
Should fisapt0-d4 work?
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 have added a test for fsapt-d4 under ./tests/fsapt-d4 following similar tests of ./tests/fsapt-terms and /tests/fsaptd-terms.
| Han Solo: This is *not* gonna work. | ||
| Luke Skywalker: Why didn't you say so before? | ||
| Han Solo: I *did* say so before. | ||
| => HF-D4(BJ,EEQ)ATM: Empirical Dispersion <= |
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.
is this output.ref old (s9=1, ATM) and should be regenerated?
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 have updated the output.ref to be from the most recent updates. I have an evaluation for regular fisapt0-d4 (atm) and fisapt0-d4bj2b (no atm), so there are two locations where the HF-D4 information is printed. I believe you are looking for the second energy call. Would you prefer these two energy calls to be broken into two different tests, or could it be left as one test?
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.
sure, fine to leave as one test. I just spotted the ATM, recalled the changes we had made, and wanted to check with you.
Co-authored-by: Lori A. Burns <[email protected]>
Co-authored-by: Lori A. Burns <[email protected]>
| @@ -0,0 +1,4 @@ | |||
| include(TestingMacros) | |||
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.
this test dir needs a test_input.py file and make sure it has the using(dftd4) (approximate syntax) in it.
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 setup the tests/fsapt-d4/test_input.py to be similar to the tests/fsaptd-terms/test_input.py, switching the uusing from dftd3 to dftd4.
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, did this get pushed?
| # compare_values(fEref['fEedisp']) | ||
|
|
||
| for key in fkeys: #TEST | ||
| compare_values(fEref[key], fEnergies[key], 2, key) #TEST |
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.
are these checks so loose (0.01) for a reason?
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.
This compare_values tolerance is copied over from the tests/fsaptd-terms/test_input.py test for I believe that processing the fsapt values lowers the relevant precision. I have attached the snippet from fsaptd-terms below:
import os
import sys
import subprocess
os.chdir('fsapt')
with open('fA.dat', 'w') as fA: fA.write("MethylA 1 2 3 4 5")
with open('fB.dat', 'w') as fB: fB.write("MethylB 6 7 8 9 10")
subprocess.run([sys.executable, os.path.join('..', 'fsapt.py')], check=True)
fEnergies = {}
fkeys = ['fEelst', 'fEexch', 'fEindAB', 'fEindBA', 'fEdisp', 'fEedisp', 'fEtot'] #TEST
with open('fsapt.dat', 'r') as fsapt: #TEST
Energies = [float(x) for x in fsapt.readlines()[-2].split()[2:]] #TEST
for pair in zip(fkeys,Energies): #TEST
fEnergies[pair[0]] = pair[1] #TEST
fEref = { #TEST
'fEelst' : -0.002, #TEST
'fEexch' : 0.000, #TEST
'fEindAB': -0.000, #TEST
'fEindBA': -0.000, #TEST
'fEdisp' : 0.000, #TEST
'fEedisp': -0.033, #TEST
'fEtot' : -0.036} #TEST
for key in fkeys: #TEST
compare_values(fEref[key], fEnergies[key], 2, key) #TEST | Han Solo: This is *not* gonna work. | ||
| Luke Skywalker: Why didn't you say so before? | ||
| Han Solo: I *did* say so before. | ||
| => HF-D4(BJ,EEQ)ATM: Empirical Dispersion <= |
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.
sure, fine to leave as one test. I just spotted the ATM, recalled the changes we had made, and wanted to check with you.
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!
|
I did notice that I can call sapt0-d4bj. Which version is then chosen ? |
Description
Added SAPT0-D4 and SAPT0-D4M methods and parameters along with a test
User API & Changelog headlines
Dev notes & details
Questions
Checklist
Status