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
10 changes: 5 additions & 5 deletions psi4/driver/procrouting/dft_funcs/double_hyb_superfuncs.py
Expand Up @@ -209,14 +209,14 @@ def build_pbe0_dh_superfunctional(name, npoints, deriv, restricted):
X.set_alpha(0.5)
sup.add_x_functional(X)
C = core.LibXCFunctional('XC_GGA_C_PBE', restricted)
C.set_alpha(0.125)
C.set_alpha(0.875)
sup.add_c_functional(C)

# Set GKS up after adding functionals
sup.set_x_omega(0.0)
sup.set_c_omega(0.0)
sup.set_x_alpha(0.5)
sup.set_c_alpha(0.875)
sup.set_c_alpha(0.125)

# => End User-Customization <= #

Expand Down Expand Up @@ -285,14 +285,14 @@ def build_scan0_dh_superfunctional(name, npoints, deriv, restricted):
X.set_alpha(0.5)
sup.add_x_functional(X)
C = core.LibXCFunctional('XC_MGGA_C_SCAN', restricted)
C.set_alpha(0.125)
C.set_alpha(0.875)
sup.add_c_functional(C)

# Set GKS up after adding functionals
sup.set_x_omega(0.0)
sup.set_c_omega(0.0)
sup.set_x_alpha(0.5)
sup.set_c_alpha(0.875)
sup.set_c_alpha(0.125)

# => End User-Customization <= #

Expand Down Expand Up @@ -524,7 +524,7 @@ def build_ptpss_superfunctional(name, npoints, deriv, restricted):
double_hyb_superfunc_list = {
"b2plyp": build_b2plyp_superfunctional,
"pbe0-2": build_pbe0_2_superfunctional,
# "pbe0-dh": build_pbe0_dh_superfunctional, # no test available
# "pbe0-dh": build_pbe0_dh_superfunctional, # test compared to Gaussian16 fails
# "scan0-2": build_scan0_2_superfunctional, # XC_MGGA_C_SCAN not present in LibXC 3.0.0
# "scan0-dh": build_scan0_dh_superfunctional, # XC_MGGA_C_SCAN not present in LibXC 3.0.0
"dsd-blyp": build_dsd_blyp_superfunctional,
Expand Down
15 changes: 14 additions & 1 deletion tests/dft-custom-dhdf/input.dat
Expand Up @@ -9,6 +9,13 @@
#ESOS−PT2 −0.062530 −0.066777
#Etot −128.920697 −76.412502


#PBE0-DH from Gaussian 16: "cc-pvdz 5d int=grid=99770 pbe0dh sp"
#ESCF -128.773106818
#ESOS−PT2 -0.02641704539
#Etot −128.79952386314


# Others from ORCA v.4.0.1, cc-pVTZ, RI-MP2, no FC, GRID7

# from WATER27 test set
Expand Down Expand Up @@ -61,7 +68,6 @@ clean()
#compare_values(, edhdf, 6, 'Ne: DSD-BLYP') #TEST
#clean()


set freeze_core true
edhdf = energy('dsd-blyp')
e_dft=get_variable('SCF TOTAL ENERGY')
Expand All @@ -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.

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?

e_dft=get_variable('SCF TOTAL ENERGY')
e_mp2=get_variable('DOUBLE-HYBRID CORRECTION ENERGY')
compare_values(-128.773106818, e_dft, 5, 'Ne: PBE0-DH') #TEST
compare_values(-0.02641704539, e_mp2, 5, 'Ne: PBE0-DH') #TEST
compare_values(-128.79952386314, edhdf, 5, 'Ne: PBE0-DH') #TEST
clean()

# =========== former dft-pbe0-2 ==========
# internal match
Expand Down
244 changes: 244 additions & 0 deletions tests/dft-custom-dhdf/ref_outputs/g16_pbe0dh.ref
@@ -0,0 +1,244 @@
Entering Link 1 = C:\G16W\l1.exe PID= 12120.

Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2009,2016,
Gaussian, Inc. All Rights Reserved.

This is part of the Gaussian(R) 16 program. It is based on
the Gaussian(R) 09 system (copyright 2009, Gaussian, Inc.),
the Gaussian(R) 03 system (copyright 2003, Gaussian, Inc.),
the Gaussian(R) 98 system (copyright 1998, Gaussian, Inc.),
the Gaussian(R) 94 system (copyright 1995, Gaussian, Inc.),
the Gaussian 92(TM) system (copyright 1992, Gaussian, Inc.),
the Gaussian 90(TM) system (copyright 1990, Gaussian, Inc.),
the Gaussian 88(TM) system (copyright 1988, Gaussian, Inc.),
the Gaussian 86(TM) system (copyright 1986, Carnegie Mellon
University), and the Gaussian 82(TM) system (copyright 1983,
Carnegie Mellon University). Gaussian is a federally registered
trademark of Gaussian, Inc.

This software contains proprietary and confidential information,
including trade secrets, belonging to Gaussian, Inc.

This software is provided under written license and may be
used, copied, transmitted, or stored only in accord with that
written license.

The following legend is applicable only to US Government
contracts under FAR:

RESTRICTED RIGHTS LEGEND

Use, reproduction and disclosure by the US Government is
subject to restrictions as set forth in subparagraphs (a)
and (c) of the Commercial Computer Software - Restricted
Rights clause in FAR 52.227-19.

Gaussian, Inc.
340 Quinnipiac St., Bldg. 40, Wallingford CT 06492


---------------------------------------------------------------
Warning -- This program may not be used in any manner that
competes with the business of Gaussian, Inc. or will provide
assistance to any competitor of Gaussian, Inc. The licensee
of this program is prohibited from giving any competitor of
Gaussian, Inc. access to this program. By using this program,
the user acknowledges that Gaussian, Inc. is engaged in the
business of creating and licensing software in the field of
computational chemistry and represents and warrants to the
licensee that it is not a competitor of Gaussian, Inc. and that
it will not use this program in any manner prohibited above.
---------------------------------------------------------------


Cite this work as:
Gaussian 16, Revision A.03,
M. J. Frisch, G. W. Trucks, H. B. Schlegel, G. E. Scuseria,
M. A. Robb, J. R. Cheeseman, G. Scalmani, V. Barone,
G. A. Petersson, H. Nakatsuji, X. Li, M. Caricato, A. V. Marenich,
J. Bloino, B. G. Janesko, R. Gomperts, B. Mennucci, H. P. Hratchian,
J. V. Ortiz, A. F. Izmaylov, J. L. Sonnenberg, D. Williams-Young,
F. Ding, F. Lipparini, F. Egidi, J. Goings, B. Peng, A. Petrone,
T. Henderson, D. Ranasinghe, V. G. Zakrzewski, J. Gao, N. Rega,
G. Zheng, W. Liang, M. Hada, M. Ehara, K. Toyota, R. Fukuda,
J. Hasegawa, M. Ishida, T. Nakajima, Y. Honda, O. Kitao, H. Nakai,
T. Vreven, K. Throssell, J. A. Montgomery, Jr., J. E. Peralta,
F. Ogliaro, M. J. Bearpark, J. J. Heyd, E. N. Brothers, K. N. Kudin,
V. N. Staroverov, T. A. Keith, R. Kobayashi, J. Normand,
K. Raghavachari, A. P. Rendell, J. C. Burant, S. S. Iyengar,
J. Tomasi, M. Cossi, J. M. Millam, M. Klene, C. Adamo, R. Cammi,
J. W. Ochterski, R. L. Martin, K. Morokuma, O. Farkas,
J. B. Foresman, and D. J. Fox, Gaussian, Inc., Wallingford CT, 2016.

******************************************
Gaussian 16: IA32W-G16RevA.03 25-Dec-2016
02-Feb-2018
******************************************
-------------------------------------
# cc-pvdz 5d int=grid=99770 pbe0dh sp
-------------------------------------
1/38=1,172=1/1;
2/12=2,17=6,18=5,40=1/2;
3/5=16,8=1,11=9,25=1,30=1,74=-78,75=99770/1,2,3;
4//1;
5/5=2,38=5/2;
8/10=1/1;
9/16=-3/6;
6/7=2,8=2,9=2,10=2/1;
99/5=1,9=1/99;
--
Ne
--
Symbolic Z-matrix:
Charge = 0 Multiplicity = 1
Ne 0. 0. 0.

Input orientation:
---------------------------------------------------------------------
Center Atomic Atomic Coordinates (Angstroms)
Number Number Type X Y Z
---------------------------------------------------------------------
1 10 0 0.000000 0.000000 0.000000
---------------------------------------------------------------------
Stoichiometry Ne
Framework group OH[O(Ne)]
Deg. of freedom 0
Full point group OH NOp 48
Largest Abelian subgroup D2H NOp 8
Largest concise Abelian subgroup C1 NOp 1
Standard orientation:
---------------------------------------------------------------------
Center Atomic Atomic Coordinates (Angstroms)
Number Number Type X Y Z
---------------------------------------------------------------------
1 10 0 0.000000 0.000000 0.000000
---------------------------------------------------------------------
Standard basis: CC-pVDZ (5D, 7F)
There are 6 symmetry adapted cartesian basis functions of AG symmetry.
There are 1 symmetry adapted cartesian basis functions of B1G symmetry.
There are 1 symmetry adapted cartesian basis functions of B2G symmetry.
There are 1 symmetry adapted cartesian basis functions of B3G symmetry.
There are 0 symmetry adapted cartesian basis functions of AU symmetry.
There are 2 symmetry adapted cartesian basis functions of B1U symmetry.
There are 2 symmetry adapted cartesian basis functions of B2U symmetry.
There are 2 symmetry adapted cartesian basis functions of B3U symmetry.
There are 5 symmetry adapted basis functions of AG symmetry.
There are 1 symmetry adapted basis functions of B1G symmetry.
There are 1 symmetry adapted basis functions of B2G symmetry.
There are 1 symmetry adapted basis functions of B3G symmetry.
There are 0 symmetry adapted basis functions of AU symmetry.
There are 2 symmetry adapted basis functions of B1U symmetry.
There are 2 symmetry adapted basis functions of B2U symmetry.
There are 2 symmetry adapted basis functions of B3U symmetry.
14 basis functions, 33 primitive gaussians, 15 cartesian basis functions
5 alpha electrons 5 beta electrons
nuclear repulsion energy 0.0000000000 Hartrees.
NAtoms= 1 NActive= 1 NUniq= 1 SFac= 1.00D+00 NAtFMM= 60 NAOKFM=F Big=F
Integral buffers will be 262144 words long.
Regular integral format.
Two-electron integral symmetry is turned on.
One-electron integrals computed using PRISM.
NBasis= 14 RedAO= T EigKep= 2.11D-01 NBF= 5 1 1 1 0 2 2 2
NBsUse= 14 1.00D-06 EigRej= -1.00D+00 NBFU= 5 1 1 1 0 2 2 2
ExpMin= 4.32D-01 ExpMax= 1.79D+04 ExpMxC= 6.12D+02 IAcc=4 IRadAn= 199770 AccDes= 0.00D+00
Harris functional with IExCor= 1009 and IRadAn= 199770 diagonalized for initial guess.
HarFok: IExCor= 1009 AccDes= 0.00D+00 IRadAn= 199770 IDoV= 1 UseB2=F ITyADJ=14
ICtDFT= 3500011 ScaDFX= 1.000000 1.000000 1.000000 1.000000
FoFCou: FMM=F IPFlag= 0 FMFlag= 100000 FMFlg1= 0
NFxFlg= 0 DoJE=T BraDBF=F KetDBF=T FulRan=T
wScrn= 0.000000 ICntrl= 500 IOpCl= 0 I1Cent= 200000004 NGrid= 0
NMat0= 1 NMatS0= 1 NMatT0= 0 NMatD0= 1 NMtDS0= 0 NMtDT0= 0
Petite list used in FoFCou.
Initial guess orbital symmetries:
Occupied (A1G) (A1G) (T1U) (T1U) (T1U)
Virtual (T1U) (T1U) (T1U) (A1G) (EG) (EG) (T2G) (T2G)
(T2G)
The electronic state of the initial guess is 1-A1G.
Keep R1 ints in memory in symmetry-blocked form, NReq=865958.
Requested convergence on RMS density matrix=1.00D-08 within 128 cycles.
Requested convergence on MAX density matrix=1.00D-06.
Requested convergence on energy=1.00D-06.
No special actions if energy rises.
Integral accuracy reduced to 1.0D-05 until final iterations.
Initial convergence to 1.0D-05 achieved. Increase integral accuracy.
SCF Done: E(RPBE0DH) = -128.773106818 A.U. after 6 cycles
NFock= 6 Conv=0.28D-08 -V/T= 2.0027
DoSCS=T DFT=T ScalE2(SS,OS)= 0.125000 0.125000
ExpMin= 4.32D-01 ExpMax= 1.79D+04 ExpMxC= 6.12D+02 IAcc=4 IRadAn= 199770 AccDes= 0.00D+00
HarFok: IExCor= 205 AccDes= 0.00D+00 IRadAn= 199770 IDoV=-2 UseB2=F ITyADJ=14
ICtDFT= 12500011 ScaDFX= 1.000000 1.000000 1.000000 1.000000
Range of M.O.s used for correlation: 2 14
NBasis= 14 NAE= 5 NBE= 5 NFC= 1 NFV= 0
NROrb= 13 NOA= 4 NOB= 4 NVA= 9 NVB= 9
DoSCS=T DFT=T ScalE2(SS,OS)= 0.125000 0.125000
Fully in-core method, ICMem= 6025296.
JobTyp=1 Pass 1 fully in-core, NPsUse= 1.
Spin components of T(2) and E(2):
alpha-alpha T2 = 0.4884296092D-02 E2= -0.3612562526D-02
alpha-beta T2 = 0.2577501317D-01 E2= -0.1919192034D-01
beta-beta T2 = 0.4884296092D-02 E2= -0.3612562526D-02
E2(PBE0DH) = -0.2641704539D-01 E(PBE0DH) = -0.12879952386314D+03

**********************************************************************

Population analysis using the SCF density.

**********************************************************************

Orbital symmetries:
Occupied (A1G) (A1G) (T1U) (T1U) (T1U)
Virtual (T1U) (T1U) (T1U) (A1G) (EG) (EG) (T2G) (T2G)
(T2G)
The electronic state is 1-A1G.
Alpha occ. eigenvalues -- -31.62497 -1.62331 -0.65406 -0.65406 -0.65406
Alpha virt. eigenvalues -- 1.49103 1.49103 1.49103 1.94543 4.88798
Alpha virt. eigenvalues -- 4.88798 4.88798 4.88798 4.88798
Condensed to atoms (all electrons):
1
1 Ne 10.000000
Mulliken charges:
1
1 Ne 0.000000
Sum of Mulliken charges = 0.00000
Mulliken charges with hydrogens summed into heavy atoms:
1
1 Ne 0.000000
Electronic spatial extent (au): <R**2>= 9.0735
Charge= 0.0000 electrons
Dipole moment (field-independent basis, Debye):
X= 0.0000 Y= 0.0000 Z= 0.0000 Tot= 0.0000
Quadrupole moment (field-independent basis, Debye-Ang):
XX= -4.0681 YY= -4.0681 ZZ= -4.0681
XY= 0.0000 XZ= 0.0000 YZ= 0.0000
Traceless Quadrupole moment (field-independent basis, Debye-Ang):
XX= 0.0000 YY= 0.0000 ZZ= 0.0000
XY= 0.0000 XZ= 0.0000 YZ= 0.0000
Octapole moment (field-independent basis, Debye-Ang**2):
XXX= 0.0000 YYY= 0.0000 ZZZ= 0.0000 XYY= 0.0000
XXY= 0.0000 XXZ= 0.0000 XZZ= 0.0000 YZZ= 0.0000
YYZ= 0.0000 XYZ= 0.0000
Hexadecapole moment (field-independent basis, Debye-Ang**3):
XXXX= -1.7051 YYYY= -1.7051 ZZZZ= -1.7051 XXXY= 0.0000
XXXZ= 0.0000 YYYX= 0.0000 YYYZ= 0.0000 ZZZX= 0.0000
ZZZY= 0.0000 XXYY= -0.5684 XXZZ= -0.5684 YYZZ= -0.5684
XXYZ= 0.0000 YYXZ= 0.0000 ZZXY= 0.0000
N-N= 0.000000000000D+00 E-N=-3.110406132965D+02 KE= 1.284234347917D+02
Symmetry AG KE= 1.028582595447D+02
Symmetry B1G KE= 1.523912270273D-61
Symmetry B2G KE= 1.902577095038D-61
Symmetry B3G KE= 1.944476951706D-61
Symmetry AU KE= 0.000000000000D+00
Symmetry B1U KE= 8.521725082336D+00
Symmetry B2U KE= 8.521725082336D+00
Symmetry B3U KE= 8.521725082336D+00
1|1|UNPC-THIRTY|SP|RPBE0DH-FC|CC-pVDZ|Ne1|DANIEL OBENCHAIN|02-Feb-2018
|0||# cc-pvdz 5d int=grid=99770 pbe0dh sp||Ne||0,1|Ne,0,0.,0.,0.||Vers
ion=IA32W-G16RevA.03|State=1-A1G|HF=-128.7731068|MP2=-128.7995239|RMSD
=2.841e-009|PG=OH [O(Ne1)]||@


COLLEGE PROFESSOR: SOMEONE WHO TALKS IN OTHER PEOPLE'S SLEEP.
Job cpu time: 0 days 0 hours 1 minutes 34.0 seconds.
Elapsed time: 0 days 0 hours 0 minutes 2.0 seconds.
File lengths (MBytes): RWF= 5 Int= 0 D2E= 0 Chk= 1 Scr= 1
Normal termination of Gaussian 16 at Fri Feb 02 10:53:04 2018.
5 changes: 5 additions & 0 deletions tests/dft-custom-hybrid/input.dat
Expand Up @@ -10,6 +10,8 @@
# wb97x
# SOGGA11
# SOGGA11-X
##Gaussian 16: cc-pvdz 5D SP int=(grid=99770)
# MN15

# MISSING:
# "wpbe" : build_wpbe_superfunctional,
Expand Down Expand Up @@ -52,6 +54,9 @@ clean()
edft = energy('sogga11-x')
compare_values(-128.876075275, edft, 4, 'Ne: SOGGA11-X')
clean()
edft = energy('mn15')
compare_values(-128.825480424, edft, 4, 'Ne: MN15')
clean()

#edft = energy('b5050lyp')
#compare_values(, edft, 5, 'Ne: B5050LYP')
Expand Down