1 /*
2 Copyright (C) 2008 M.A.L. Marques
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
10 #include "util.h"
11
12 #define XC_MGGA_X_TAU_HCTH 205 /* tau-HCTH from Boese and Handy */
13 #define XC_HYB_MGGA_X_BMK 279 /* Boese-Martin for kinetics */
14 #define XC_HYB_MGGA_X_TAU_HCTH 282 /* Hybrid version of tau-HCTH */
15
16 const double tHCTH_cx_local [4] = {1.10734, -1.0534, 6.3491, -2.5531};
17 const double tHCTH_cx_nlocal[4] = {0.00110, -0.3041, 6.9543, -0.7235};
18
19 const double BMK_cx_local [4] = { 0.474302, 2.77701, -11.4230, 11.7167};
20 const double BMK_cx_nlocal[4] = {-0.192212, 4.73936, -26.6188, 22.4891};
21
22 const double hyb_tHCTH_cx_local [4] = { 0.86735, 0.3008, 1.2208, 0.1574};
23 const double hyb_tHCTH_cx_nlocal[4] = {-0.00230, -0.2849, 5.4146, -10.909};
24
25 typedef struct{
26 double cx_local[4];
27 double cx_nlocal[4];
28 } mgga_x_tau_hcth_params;
29
30
31 static void
mgga_x_tau_hcth_init(xc_func_type * p)32 mgga_x_tau_hcth_init(xc_func_type *p)
33 {
34 mgga_x_tau_hcth_params *params;
35 int ii;
36
37 assert(p != NULL);
38 assert(p->params == NULL);
39
40 p->params = libxc_malloc(sizeof(mgga_x_tau_hcth_params));
41 params = (mgga_x_tau_hcth_params *)(p->params);
42
43 for(ii = 0; ii < 4; ii++){
44 switch(p->info->number){
45 case XC_MGGA_X_TAU_HCTH:
46 params->cx_local[ii] = tHCTH_cx_local[ii];
47 params->cx_nlocal[ii] = tHCTH_cx_nlocal[ii];
48 break;
49 case XC_HYB_MGGA_X_BMK:
50 p->cam_alpha = 0.42;
51 params->cx_local[ii] = BMK_cx_local[ii];
52 params->cx_nlocal[ii] = BMK_cx_nlocal[ii];
53 break;
54 case XC_HYB_MGGA_X_TAU_HCTH:
55 p->cam_alpha = 0.15;
56 params->cx_local[ii] = hyb_tHCTH_cx_local[ii];
57 params->cx_nlocal[ii] = hyb_tHCTH_cx_nlocal[ii];
58 break;
59 default:
60 fprintf(stderr, "Internal error in mgga_tau_hcth\n");
61 exit(1);
62 break;
63 }
64 }
65
66 }
67
68 #include "decl_mgga.h"
69 #include "maple2c/mgga_exc/mgga_x_tau_hcth.c"
70 #include "work_mgga.c"
71
72 #ifdef __cplusplus
73 extern "C"
74 #endif
75 const xc_func_info_type xc_func_info_mgga_x_tau_hcth = {
76 XC_MGGA_X_TAU_HCTH,
77 XC_EXCHANGE,
78 "tau-HCTH from Boese and Handy",
79 XC_FAMILY_MGGA,
80 {&xc_ref_Boese2002_9559, NULL, NULL, NULL, NULL},
81 XC_FLAGS_3D | MAPLE2C_FLAGS,
82 1.0e-23,
83 {0, NULL, NULL, NULL, NULL},
84 mgga_x_tau_hcth_init, NULL,
85 NULL, NULL, work_mgga,
86 };
87
88 #ifdef __cplusplus
89 extern "C"
90 #endif
91 const xc_func_info_type xc_func_info_hyb_mgga_x_bmk = {
92 XC_HYB_MGGA_X_BMK,
93 XC_EXCHANGE,
94 "Boese-Martin for kinetics",
95 XC_FAMILY_HYB_MGGA,
96 {&xc_ref_Boese2004_3405, NULL, NULL, NULL, NULL},
97 XC_FLAGS_3D | MAPLE2C_FLAGS,
98 1.0e-15,
99 {0, NULL, NULL, NULL, NULL},
100 mgga_x_tau_hcth_init, NULL,
101 NULL, NULL, work_mgga,
102 };
103
104 #ifdef __cplusplus
105 extern "C"
106 #endif
107 const xc_func_info_type xc_func_info_hyb_mgga_x_tau_hcth = {
108 XC_HYB_MGGA_X_TAU_HCTH,
109 XC_EXCHANGE,
110 "Hybrid version of tau-HCTH",
111 XC_FAMILY_HYB_MGGA,
112 {&xc_ref_Boese2002_9559, NULL, NULL, NULL, NULL},
113 XC_FLAGS_3D | MAPLE2C_FLAGS,
114 1.0e-23,
115 {0, NULL, NULL, NULL, NULL},
116 mgga_x_tau_hcth_init, NULL,
117 NULL, NULL, work_mgga,
118 };
119