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

Added some functionals #904

Merged
merged 13 commits into from Feb 3, 2018
Merged

Added some functionals #904

merged 13 commits into from Feb 3, 2018

Conversation

PeterKraus
Copy link
Contributor

Description

Added and tested the following functionals. For the last two, unfortunately no bench value is provided.

           Functional:            libxc :      rob    qchem
Comparison    SOGGA11:   -76.3720792686 :      nan 3.84e-05 
Comparison  SOGGA11-X:   -76.3569745367 :      nan 1.10e-05 
Comparison      M06-L:   -76.3766432198 :      nan 1.95e-06 
Comparison     MN12-L:   -76.3109178757 :      nan 3.84e-05 
Comparison     MN15-L:   -76.3001901669 :      nan 5.49e-06 
Comparison       MN15:   -76.3017521834 :      nan      nan 
Comparison    PBE0-DH:   -76.1613318950 :      nan      nan 

Added worker functions for SCAN family of functionals, however without XC_MGGA_C_SCAN (which is available in LibXC 3.0.1) they won't work - commented out.

See http://forum.psicode.org/t/libxc-density-functionals/589/

@hokru
Copy link
Member

hokru commented Jan 29, 2018

Unfortunately, SCAN doesn't work with LibXC 3.0.1, either. #863

Copy link
Member

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

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

This looks great, thank you. Can you add tests for the new functionals as well? I believe we have the nice new dft-custom-mgga/ and dft-custom-dhdf/ tests to add to from @hokru.

@@ -239,7 +232,6 @@ def build_hf3c_superfunctional(name, npoints, deriv, restricted):
sup.allocate()
return (sup, ('HF3C', '-d3bj'))


Copy link
Member

Choose a reason for hiding this comment

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

There should be two spaces between these functions. Can you format your files with YAPF (pip install yapf)?

@PeterKraus
Copy link
Contributor Author

@dgasmith, is just the Ne test enough? I don't have ORCA, but I have access to G09.D01 (SOGGA, SOGGA11-X, M06-L, MN12-L) and a colleague of mine has G16 (MN15, MN15-L and PBE0-DH), that should be good enough.

Copy link
Member

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

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

Neon is good with me, typically any issues can be found in these easy test cases to help you find mixing errors. Anything systematic usually occurs in the DFT tech itself which is reasonably well tested.

@@ -87,6 +93,13 @@ compare_values(-0.062529936, e_mp2, 5, 'Ne: PWPB95_PT2') #TEST
compare_values(-128.920706595202, edhdf, 5, 'Ne: PWPB95') #TEST
clean()

edhdf = energy('pbe0-dh')
Copy link
Member

Choose a reason for hiding this comment

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

Does it fail already for the SCF part, or at the MP2 part?
Your G16 test has frozen-core is on for the MP2 part, which is actually recommended for DHDFs. But my test has it globally off. Maybe that is the reason the test fails? The RI-MP2 error should be small enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already the DFT reference energy fails. I am a bit at a loss as to why this is. I've checked the original paper and the handy reference table from Q-Chem [1] and I think I set it up correctly, but apparently not...

[1] http://www.q-chem.com/qchem-website/manual/qchem44_manual/sect-DFT.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Attached out file from the current version (frozen core set to true).
dhdf.txt

Copy link
Member

Choose a reason for hiding this comment

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

I used the cc-pVTZ basis set for the DHDF tests to reproduce values from a publication. The other tests used cc-pVDZ. My bad for the confusion, sorry.
PSI4 should be much closer with the correct basis ;-). If you check my PBE values in dft-custom-gga, you can see that only TM reproduces the PSI4 values to the 5th decimal. ORCA and Gaussian deviate a bit. Very sensitive to the constants used, i think.

This comparison with ORCA passes:
https://gist.github.com/hokru/fd97a2cc67404be4a8835925c06616a4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I see. I need to learn how to read. The DSD-BLYP is also with FC=TRUE already, so I'll just lump them together.

@PeterKraus
Copy link
Contributor Author

This should be all.

Copy link
Member

@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.

Looking good, thanks for the functionals!

'm062x' : {'s6': 1.0, 's8': 0.00 , 'sr6': 1.619, 'alpha6': 14.0},
'm06hf' : {'s6': 1.0, 's8': 0.00 , 'sr6': 1.446, 'alpha6': 14.0},
'm06-l' : {'s6': 1.0, 's8': 0.00 , 'sr6': 1.581, 'alpha6': 14.0},
'm06l' : {'s6': 1.0, 's8': 0.00 , 'sr6': 1.581, 'alpha6': 14.0},
Copy link
Member

Choose a reason for hiding this comment

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

Looks like some duplicates m06l and m062x probably from when I copied over Grimme's parameter tables. Since these are now actually hooked up to fctls with - keys, go ahead and remove the duplicates.

REACH OF DESTRUCTION. MEN ARE MORTAL; BUT IDEAS
ARE IMMORTAL.
-- WALTER LIPPMANN
Job cpu time: 0 days 0 hours 0 minutes 14.0 seconds.
Copy link
Member

Choose a reason for hiding this comment

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

This program can be sensitive. It'd be good to remove the "Job cpu time" lines from the output files. And you may want to zip these files. And if you're not the license holder, you may want to make sure the license holder is ok with posting the files.

compare_values(-128.882490613961, edhdf, 6, 'Ne: DSD-BLYP') #TEST
clean()

edhdf = energy('pbe0-dh')
Copy link
Member

Choose a reason for hiding this comment

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

In definition above says pbe0-dh is disabled, and it is disabled in the superfuncs dict. Yet testing it here. Is there an inconsistency or how does this work?

Copy link
Member

@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.

Looks great and ready to go for my part. We just need to check something, and I don't want this to get inadvertently merged in the meantime.

Copy link
Member

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

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

Thanks for the new functionals and tests!

@dgasmith dgasmith merged commit d74df95 into psi4:master Feb 3, 2018
@PeterKraus PeterKraus deleted the functionals branch February 11, 2018 14:50
@loriab loriab added this to the Psi4 1.2 milestone Apr 13, 2018
@dgasmith dgasmith mentioned this pull request Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants