1 /*
2  Copyright (C) 2017 Susi Lehtola
3 
4  This Source Code Form is subject to the terms of the Mozilla Public
5  License, v. 2.0. If a copy of the MPL was not distributed with this
6  file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8 
9 #include "util.h"
10 
11 #define XC_HYB_MGGA_XC_MPW1KCIS    566 /* Modified Perdew-Wang + KCIS hybrid */
12 #define XC_HYB_MGGA_XC_MPWKCIS1K   567 /* Modified Perdew-Wang + KCIS hybrid with more exact exchange */
13 #define XC_HYB_MGGA_XC_PBE1KCIS    568 /* Perdew-Burke-Ernzerhof + KCIS hybrid */
14 #define XC_HYB_MGGA_XC_TPSS1KCIS   569 /* TPSS hybrid with KCIS correlation */
15 
16 static void
hyb_mgga_xc_kcis_init(xc_func_type * p)17 hyb_mgga_xc_kcis_init(xc_func_type *p)
18 {
19   /* Exchange functional */
20   int xid;
21   /* Fraction of exact exchange */
22   double exx;
23   /* Array */
24   int funcs_id[2];
25   double funcs_coef[2];
26 
27   switch(p->info->number){
28   case XC_HYB_MGGA_XC_MPW1KCIS:
29     xid=XC_GGA_X_MPW91;
30     exx=0.15;
31     break;
32   case XC_HYB_MGGA_XC_MPWKCIS1K:
33     xid=XC_GGA_X_MPW91;
34     exx=0.41;
35     break;
36   case XC_HYB_MGGA_XC_PBE1KCIS:
37     xid=XC_GGA_X_PBE;
38     exx=0.22;
39     break;
40   case XC_HYB_MGGA_XC_TPSS1KCIS:
41     xid=XC_MGGA_X_TPSS;
42     exx=0.13;
43     break;
44   default:
45     fprintf(stderr, "Internal error in hyb_mgga_xc_kcis\n");
46     exit(1);
47   }
48 
49   /* Initialize mix */
50   funcs_id[0] = xid;
51   funcs_coef[0] = 1.0-exx;
52 
53   funcs_id[1] = XC_MGGA_C_KCIS;
54   funcs_coef[1] = 1.0;
55 
56   xc_mix_init(p, 2, funcs_id, funcs_coef);
57   p->cam_alpha = exx;
58 }
59 
60 #ifdef __cplusplus
61 extern "C"
62 #endif
63 const xc_func_info_type xc_func_info_hyb_mgga_xc_mpw1kcis = {
64   XC_HYB_MGGA_XC_MPW1KCIS,
65   XC_EXCHANGE_CORRELATION,
66   "MPW1KCIS for barrier heights",
67   XC_FAMILY_HYB_MGGA,
68   {&xc_ref_Zhao2005_2012, NULL, NULL, NULL, NULL},
69   XC_FLAGS_3D | XC_FLAGS_I_HAVE_ALL,
70   1e-32,
71   {0, NULL, NULL, NULL, NULL},
72   hyb_mgga_xc_kcis_init,
73   NULL, NULL, NULL, NULL /* this is taken care of by the generic routine */
74 };
75 
76 #ifdef __cplusplus
77 extern "C"
78 #endif
79 const xc_func_info_type xc_func_info_hyb_mgga_xc_mpwkcis1k = {
80   XC_HYB_MGGA_XC_MPWKCIS1K,
81   XC_EXCHANGE_CORRELATION,
82   "MPWKCIS1K for barrier heights",
83   XC_FAMILY_HYB_MGGA,
84   {&xc_ref_Zhao2005_2012, NULL, NULL, NULL, NULL},
85   XC_FLAGS_3D | XC_FLAGS_I_HAVE_ALL,
86   1e-32,
87   {0, NULL, NULL, NULL, NULL},
88   hyb_mgga_xc_kcis_init,
89   NULL, NULL, NULL, NULL /* this is taken care of by the generic routine */
90 };
91 
92 #ifdef __cplusplus
93 extern "C"
94 #endif
95 const xc_func_info_type xc_func_info_hyb_mgga_xc_pbe1kcis = {
96   XC_HYB_MGGA_XC_PBE1KCIS,
97   XC_EXCHANGE_CORRELATION,
98   "PBE1KCIS for binding energies",
99   XC_FAMILY_HYB_MGGA,
100   {&xc_ref_Zhao2005_415, NULL, NULL, NULL, NULL},
101   XC_FLAGS_3D | XC_FLAGS_I_HAVE_ALL,
102   1e-32,
103   {0, NULL, NULL, NULL, NULL},
104   hyb_mgga_xc_kcis_init,
105   NULL, NULL, NULL, NULL /* this is taken care of by the generic routine */
106 };
107 
108 #ifdef __cplusplus
109 extern "C"
110 #endif
111 const xc_func_info_type xc_func_info_hyb_mgga_xc_tpss1kcis = {
112   XC_HYB_MGGA_XC_TPSS1KCIS,
113   XC_EXCHANGE_CORRELATION,
114   "TPSS1KCIS for thermochemistry and kinetics",
115   XC_FAMILY_HYB_MGGA,
116   {&xc_ref_Zhao2005_43, NULL, NULL, NULL, NULL},
117   XC_FLAGS_3D | XC_FLAGS_I_HAVE_ALL,
118   1e-32,
119   {0, NULL, NULL, NULL, NULL},
120   hyb_mgga_xc_kcis_init,
121   NULL, NULL, NULL, NULL /* this is taken care of by the generic routine */
122 };
123 
124