25#ifndef __XC_FUNCTIONAL_BASE_HPP__
26#define __XC_FUNCTIONAL_BASE_HPP__
39const std::map<std::string, int> libxc_functionals = {
41 {
"XC_LDA_X", XC_LDA_X},
43#if defined(XC_LDA_C_WIGNER)
44 {
"XC_LDA_C_WIGNER", XC_LDA_C_WIGNER},
46#if defined(XC_LDA_C_RPA)
47 {
"XC_LDA_C_RPA", XC_LDA_C_RPA},
49#if defined(XC_LDA_C_HL)
50 {
"XC_LDA_C_HL", XC_LDA_C_HL},
52#if defined(XC_LDA_C_GL)
53 {
"XC_LDA_C_GL", XC_LDA_C_GL},
55#if defined(XC_LDA_C_XALPHA)
56 {
"XC_LDA_C_XALPHA", XC_LDA_C_XALPHA},
58#if defined(XC_LDA_C_VWN)
59 {
"XC_LDA_C_VWN", XC_LDA_C_VWN},
61#if defined(XC_LDA_C_VWN_RPA)
62 {
"XC_LDA_C_VWN_RPA", XC_LDA_C_VWN_RPA},
64#if defined(XC_LDA_C_PZ)
65 {
"XC_LDA_C_PZ", XC_LDA_C_PZ},
67#if defined(XC_LDA_C_PZ_MOD)
68 {
"XC_LDA_C_PZ_MOD", XC_LDA_C_PZ_MOD},
70#if defined(XC_LDA_C_OB_PZ)
71 {
"XC_LDA_C_OB_PZ", XC_LDA_C_OB_PZ},
73#if defined(XC_LDA_C_PW)
74 {
"XC_LDA_C_PW", XC_LDA_C_PW},
76#if defined(XC_LDA_C_PW_MOD)
77 {
"XC_LDA_C_PW_MOD", XC_LDA_C_PW_MOD},
79#if defined(XC_LDA_C_OB_PW)
80 {
"XC_LDA_C_OB_PW", XC_LDA_C_OB_PW},
82#if defined(XC_LDA_C_2D_AMGB)
83 {
"XC_LDA_C_2D_AMGB", XC_LDA_C_2D_AMGB},
85#if defined(XC_LDA_C_2D_PRM)
86 {
"XC_LDA_C_2D_PRM", XC_LDA_C_2D_PRM},
88#if defined(XC_LDA_C_vBH)
89 {
"XC_LDA_C_vBH", XC_LDA_C_vBH},
91#if defined(XC_LDA_C_1D_CSC)
92 {
"XC_LDA_C_1D_CSC", XC_LDA_C_1D_CSC},
94#if defined(XC_LDA_X_2D)
95 {
"XC_LDA_X_2D", XC_LDA_X_2D},
97#if defined(XC_LDA_XC_TETER93)
98 {
"XC_LDA_XC_TETER93", XC_LDA_XC_TETER93},
100#if defined(XC_LDA_X_1D)
101 {
"XC_LDA_X_1D", XC_LDA_X_1D},
103#if defined(XC_LDA_C_ML1)
104 {
"XC_LDA_C_ML1", XC_LDA_C_ML1},
106#if defined(XC_LDA_C_ML2)
107 {
"XC_LDA_C_ML2", XC_LDA_C_ML2},
109#if defined(XC_LDA_C_GOMBAS)
110 {
"XC_LDA_C_GOMBAS", XC_LDA_C_GOMBAS},
112#if defined(XC_LDA_C_PW_RPA)
113 {
"XC_LDA_C_PW_RPA", XC_LDA_C_PW_RPA},
115#if defined(XC_LDA_C_1D_LOOS)
116 {
"XC_LDA_C_1D_LOOS", XC_LDA_C_1D_LOOS},
118#if defined(XC_LDA_C_RC04)
119 {
"XC_LDA_C_RC04", XC_LDA_C_RC04},
121#if defined(XC_LDA_C_VWN_1)
122 {
"XC_LDA_C_VWN_1", XC_LDA_C_VWN_1},
124#if defined(XC_LDA_C_VWN_2)
125 {
"XC_LDA_C_VWN_2", XC_LDA_C_VWN_2},
127#if defined(XC_LDA_C_VWN_3)
128 {
"XC_LDA_C_VWN_3", XC_LDA_C_VWN_3},
130#if defined(XC_LDA_C_VWN_4)
131 {
"XC_LDA_C_VWN_4", XC_LDA_C_VWN_4},
133#if defined(XC_LDA_XC_ZLP)
134 {
"XC_LDA_XC_ZLP", XC_LDA_XC_ZLP},
136#if defined(XC_LDA_K_TF)
137 {
"XC_LDA_K_TF", XC_LDA_K_TF},
139#if defined(XC_LDA_K_LP)
140 {
"XC_LDA_K_LP", XC_LDA_K_LP},
142#if defined(XC_LDA_XC_KSDT)
143 {
"XC_LDA_XC_KSDT", XC_LDA_XC_KSDT},
145#if defined(XC_LDA_C_CHACHIYO)
146 {
"XC_LDA_C_CHACHIYO", XC_LDA_C_CHACHIYO},
148#if defined(XC_LDA_C_LP96)
149 {
"XC_LDA_C_LP96", XC_LDA_C_LP96},
151#if defined(XC_LDA_X_REL)
152 {
"XC_LDA_X_REL", XC_LDA_X_REL},
154#if defined(XC_LDA_XC_1D_EHWLRG_1)
155 {
"XC_LDA_XC_1D_EHWLRG_1", XC_LDA_XC_1D_EHWLRG_1},
157#if defined(XC_LDA_XC_1D_EHWLRG_2)
158 {
"XC_LDA_XC_1D_EHWLRG_2", XC_LDA_XC_1D_EHWLRG_2},
160#if defined(XC_LDA_XC_1D_EHWLRG_3)
161 {
"XC_LDA_XC_1D_EHWLRG_3", XC_LDA_XC_1D_EHWLRG_3},
163#if defined(XC_LDA_X_ERF)
164 {
"XC_LDA_X_ERF", XC_LDA_X_ERF},
166#if defined(XC_LDA_XC_LP_A)
167 {
"XC_LDA_XC_LP_A", XC_LDA_XC_LP_A},
169#if defined(XC_LDA_XC_LP_B)
170 {
"XC_LDA_XC_LP_B", XC_LDA_XC_LP_B},
172#if defined(XC_LDA_X_RAE)
173 {
"XC_LDA_X_RAE", XC_LDA_X_RAE},
175#if defined(XC_LDA_K_ZLP)
176 {
"XC_LDA_K_ZLP", XC_LDA_K_ZLP},
178#if defined(XC_LDA_C_MCWEENY)
179 {
"XC_LDA_C_MCWEENY", XC_LDA_C_MCWEENY},
181#if defined(XC_LDA_C_BR78)
182 {
"XC_LDA_C_BR78", XC_LDA_C_BR78},
184#if defined(XC_LDA_C_PK09)
185 {
"XC_LDA_C_PK09", XC_LDA_C_PK09},
187#if defined(XC_LDA_C_OW_LYP)
188 {
"XC_LDA_C_OW_LYP", XC_LDA_C_OW_LYP},
190#if defined(XC_LDA_C_OW)
191 {
"XC_LDA_C_OW", XC_LDA_C_OW},
193#if defined(XC_LDA_XC_GDSMFB)
194 {
"XC_LDA_XC_GDSMFB", XC_LDA_XC_GDSMFB},
196#if defined(XC_LDA_C_GK72)
197 {
"XC_LDA_C_GK72", XC_LDA_C_GK72},
199#if defined(XC_LDA_C_KARASIEV)
200 {
"XC_LDA_C_KARASIEV", XC_LDA_C_KARASIEV},
202#if defined(XC_LDA_K_LP96)
203 {
"XC_LDA_K_LP96", XC_LDA_K_LP96},
205#if defined(XC_GGA_X_GAM)
206 {
"XC_GGA_X_GAM", XC_GGA_X_GAM},
208#if defined(XC_GGA_C_GAM)
209 {
"XC_GGA_C_GAM", XC_GGA_C_GAM},
211#if defined(XC_GGA_X_HCTH_A)
212 {
"XC_GGA_X_HCTH_A", XC_GGA_X_HCTH_A},
214#if defined(XC_GGA_X_EV93)
215 {
"XC_GGA_X_EV93", XC_GGA_X_EV93},
217#if defined(XC_GGA_X_BCGP)
218 {
"XC_GGA_X_BCGP", XC_GGA_X_BCGP},
220#if defined(XC_GGA_C_BCGP)
221 {
"XC_GGA_C_BCGP", XC_GGA_C_BCGP},
223#if defined(XC_GGA_X_LAMBDA_OC2_N)
224 {
"XC_GGA_X_LAMBDA_OC2_N", XC_GGA_X_LAMBDA_OC2_N},
226#if defined(XC_GGA_X_B86_R)
227 {
"XC_GGA_X_B86_R", XC_GGA_X_B86_R},
229#if defined(XC_GGA_X_LAMBDA_CH_N)
230 {
"XC_GGA_X_LAMBDA_CH_N", XC_GGA_X_LAMBDA_CH_N},
232#if defined(XC_GGA_X_LAMBDA_LO_N)
233 {
"XC_GGA_X_LAMBDA_LO_N", XC_GGA_X_LAMBDA_LO_N},
235#if defined(XC_GGA_X_HJS_B88_V2)
236 {
"XC_GGA_X_HJS_B88_V2", XC_GGA_X_HJS_B88_V2},
238#if defined(XC_GGA_C_Q2D)
239 {
"XC_GGA_C_Q2D", XC_GGA_C_Q2D},
241#if defined(XC_GGA_X_Q2D)
242 {
"XC_GGA_X_Q2D", XC_GGA_X_Q2D},
244#if defined(XC_GGA_X_PBE_MOL)
245 {
"XC_GGA_X_PBE_MOL", XC_GGA_X_PBE_MOL},
247#if defined(XC_GGA_K_TFVW)
248 {
"XC_GGA_K_TFVW", XC_GGA_K_TFVW},
250#if defined(XC_GGA_K_REVAPBEINT)
251 {
"XC_GGA_K_REVAPBEINT", XC_GGA_K_REVAPBEINT},
253#if defined(XC_GGA_K_APBEINT)
254 {
"XC_GGA_K_APBEINT", XC_GGA_K_APBEINT},
256#if defined(XC_GGA_K_REVAPBE)
257 {
"XC_GGA_K_REVAPBE", XC_GGA_K_REVAPBE},
259#if defined(XC_GGA_X_AK13)
260 {
"XC_GGA_X_AK13", XC_GGA_X_AK13},
262#if defined(XC_GGA_K_MEYER)
263 {
"XC_GGA_K_MEYER", XC_GGA_K_MEYER},
265#if defined(XC_GGA_X_LV_RPW86)
266 {
"XC_GGA_X_LV_RPW86", XC_GGA_X_LV_RPW86},
268#if defined(XC_GGA_X_PBE_TCA)
269 {
"XC_GGA_X_PBE_TCA", XC_GGA_X_PBE_TCA},
271#if defined(XC_GGA_X_PBEINT)
272 {
"XC_GGA_X_PBEINT", XC_GGA_X_PBEINT},
274#if defined(XC_GGA_C_ZPBEINT)
275 {
"XC_GGA_C_ZPBEINT", XC_GGA_C_ZPBEINT},
277#if defined(XC_GGA_C_PBEINT)
278 {
"XC_GGA_C_PBEINT", XC_GGA_C_PBEINT},
280#if defined(XC_GGA_C_ZPBESOL)
281 {
"XC_GGA_C_ZPBESOL", XC_GGA_C_ZPBESOL},
283#if defined(XC_GGA_XC_OPBE_D)
284 {
"XC_GGA_XC_OPBE_D", XC_GGA_XC_OPBE_D},
286#if defined(XC_GGA_XC_OPWLYP_D)
287 {
"XC_GGA_XC_OPWLYP_D", XC_GGA_XC_OPWLYP_D},
289#if defined(XC_GGA_XC_OBLYP_D)
290 {
"XC_GGA_XC_OBLYP_D", XC_GGA_XC_OBLYP_D},
292#if defined(XC_GGA_X_VMT84_GE)
293 {
"XC_GGA_X_VMT84_GE", XC_GGA_X_VMT84_GE},
295#if defined(XC_GGA_X_VMT84_PBE)
296 {
"XC_GGA_X_VMT84_PBE", XC_GGA_X_VMT84_PBE},
298#if defined(XC_GGA_X_VMT_GE)
299 {
"XC_GGA_X_VMT_GE", XC_GGA_X_VMT_GE},
301#if defined(XC_GGA_X_VMT_PBE)
302 {
"XC_GGA_X_VMT_PBE", XC_GGA_X_VMT_PBE},
304#if defined(XC_GGA_C_N12_SX)
305 {
"XC_GGA_C_N12_SX", XC_GGA_C_N12_SX},
307#if defined(XC_GGA_C_N12)
308 {
"XC_GGA_C_N12", XC_GGA_C_N12},
310#if defined(XC_GGA_X_N12)
311 {
"XC_GGA_X_N12", XC_GGA_X_N12},
313#if defined(XC_GGA_C_REGTPSS)
314 {
"XC_GGA_C_REGTPSS", XC_GGA_C_REGTPSS},
316#if defined(XC_GGA_C_OP_XALPHA)
317 {
"XC_GGA_C_OP_XALPHA", XC_GGA_C_OP_XALPHA},
319#if defined(XC_GGA_C_OP_G96)
320 {
"XC_GGA_C_OP_G96", XC_GGA_C_OP_G96},
322#if defined(XC_GGA_C_OP_PBE)
323 {
"XC_GGA_C_OP_PBE", XC_GGA_C_OP_PBE},
325#if defined(XC_GGA_C_OP_B88)
326 {
"XC_GGA_C_OP_B88", XC_GGA_C_OP_B88},
328#if defined(XC_GGA_C_FT97)
329 {
"XC_GGA_C_FT97", XC_GGA_C_FT97},
331#if defined(XC_GGA_C_SPBE)
332 {
"XC_GGA_C_SPBE", XC_GGA_C_SPBE},
334#if defined(XC_GGA_X_SSB_SW)
335 {
"XC_GGA_X_SSB_SW", XC_GGA_X_SSB_SW},
337#if defined(XC_GGA_X_SSB)
338 {
"XC_GGA_X_SSB", XC_GGA_X_SSB},
340#if defined(XC_GGA_X_SSB_D)
341 {
"XC_GGA_X_SSB_D", XC_GGA_X_SSB_D},
343#if defined(XC_GGA_XC_HCTH_407P)
344 {
"XC_GGA_XC_HCTH_407P", XC_GGA_XC_HCTH_407P},
346#if defined(XC_GGA_XC_HCTH_P76)
347 {
"XC_GGA_XC_HCTH_P76", XC_GGA_XC_HCTH_P76},
349#if defined(XC_GGA_XC_HCTH_P14)
350 {
"XC_GGA_XC_HCTH_P14", XC_GGA_XC_HCTH_P14},
352#if defined(XC_GGA_XC_B97_GGA1)
353 {
"XC_GGA_XC_B97_GGA1", XC_GGA_XC_B97_GGA1},
355#if defined(XC_GGA_C_HCTH_A)
356 {
"XC_GGA_C_HCTH_A", XC_GGA_C_HCTH_A},
358#if defined(XC_GGA_X_BPCCAC)
359 {
"XC_GGA_X_BPCCAC", XC_GGA_X_BPCCAC},
361#if defined(XC_GGA_C_REVTCA)
362 {
"XC_GGA_C_REVTCA", XC_GGA_C_REVTCA},
364#if defined(XC_GGA_C_TCA)
365 {
"XC_GGA_C_TCA", XC_GGA_C_TCA},
367#if defined(XC_GGA_X_PBE)
368 {
"XC_GGA_X_PBE", XC_GGA_X_PBE},
370#if defined(XC_GGA_X_PBE_R)
371 {
"XC_GGA_X_PBE_R", XC_GGA_X_PBE_R},
373#if defined(XC_GGA_X_B86)
374 {
"XC_GGA_X_B86", XC_GGA_X_B86},
376#if defined(XC_GGA_X_HERMAN)
377 {
"XC_GGA_X_HERMAN", XC_GGA_X_HERMAN},
379#if defined(XC_GGA_X_B86_MGC)
380 {
"XC_GGA_X_B86_MGC", XC_GGA_X_B86_MGC},
382#if defined(XC_GGA_X_B88)
383 {
"XC_GGA_X_B88", XC_GGA_X_B88},
385#if defined(XC_GGA_X_G96)
386 {
"XC_GGA_X_G96", XC_GGA_X_G96},
388#if defined(XC_GGA_X_PW86)
389 {
"XC_GGA_X_PW86", XC_GGA_X_PW86},
391#if defined(XC_GGA_X_PW91)
392 {
"XC_GGA_X_PW91", XC_GGA_X_PW91},
394#if defined(XC_GGA_X_OPTX)
395 {
"XC_GGA_X_OPTX", XC_GGA_X_OPTX},
397#if defined(XC_GGA_X_DK87_R1)
398 {
"XC_GGA_X_DK87_R1", XC_GGA_X_DK87_R1},
400#if defined(XC_GGA_X_DK87_R2)
401 {
"XC_GGA_X_DK87_R2", XC_GGA_X_DK87_R2},
403#if defined(XC_GGA_X_LG93)
404 {
"XC_GGA_X_LG93", XC_GGA_X_LG93},
406#if defined(XC_GGA_X_FT97_A)
407 {
"XC_GGA_X_FT97_A", XC_GGA_X_FT97_A},
409#if defined(XC_GGA_X_FT97_B)
410 {
"XC_GGA_X_FT97_B", XC_GGA_X_FT97_B},
412#if defined(XC_GGA_X_PBE_SOL)
413 {
"XC_GGA_X_PBE_SOL", XC_GGA_X_PBE_SOL},
415#if defined(XC_GGA_X_RPBE)
416 {
"XC_GGA_X_RPBE", XC_GGA_X_RPBE},
418#if defined(XC_GGA_X_WC)
419 {
"XC_GGA_X_WC", XC_GGA_X_WC},
421#if defined(XC_GGA_X_MPW91)
422 {
"XC_GGA_X_MPW91", XC_GGA_X_MPW91},
424#if defined(XC_GGA_X_AM05)
425 {
"XC_GGA_X_AM05", XC_GGA_X_AM05},
427#if defined(XC_GGA_X_PBEA)
428 {
"XC_GGA_X_PBEA", XC_GGA_X_PBEA},
430#if defined(XC_GGA_X_MPBE)
431 {
"XC_GGA_X_MPBE", XC_GGA_X_MPBE},
433#if defined(XC_GGA_X_XPBE)
434 {
"XC_GGA_X_XPBE", XC_GGA_X_XPBE},
436#if defined(XC_GGA_X_2D_B86_MGC)
437 {
"XC_GGA_X_2D_B86_MGC", XC_GGA_X_2D_B86_MGC},
439#if defined(XC_GGA_X_BAYESIAN)
440 {
"XC_GGA_X_BAYESIAN", XC_GGA_X_BAYESIAN},
442#if defined(XC_GGA_X_PBE_JSJR)
443 {
"XC_GGA_X_PBE_JSJR", XC_GGA_X_PBE_JSJR},
445#if defined(XC_GGA_X_2D_B88)
446 {
"XC_GGA_X_2D_B88", XC_GGA_X_2D_B88},
448#if defined(XC_GGA_X_2D_B86)
449 {
"XC_GGA_X_2D_B86", XC_GGA_X_2D_B86},
451#if defined(XC_GGA_X_2D_PBE)
452 {
"XC_GGA_X_2D_PBE", XC_GGA_X_2D_PBE},
454#if defined(XC_GGA_C_PBE)
455 {
"XC_GGA_C_PBE", XC_GGA_C_PBE},
457#if defined(XC_GGA_C_LYP)
458 {
"XC_GGA_C_LYP", XC_GGA_C_LYP},
460#if defined(XC_GGA_C_P86)
461 {
"XC_GGA_C_P86", XC_GGA_C_P86},
463#if defined(XC_GGA_C_PBE_SOL)
464 {
"XC_GGA_C_PBE_SOL", XC_GGA_C_PBE_SOL},
466#if defined(XC_GGA_C_PW91)
467 {
"XC_GGA_C_PW91", XC_GGA_C_PW91},
469#if defined(XC_GGA_C_AM05)
470 {
"XC_GGA_C_AM05", XC_GGA_C_AM05},
472#if defined(XC_GGA_C_XPBE)
473 {
"XC_GGA_C_XPBE", XC_GGA_C_XPBE},
475#if defined(XC_GGA_C_LM)
476 {
"XC_GGA_C_LM", XC_GGA_C_LM},
478#if defined(XC_GGA_C_PBE_JRGX)
479 {
"XC_GGA_C_PBE_JRGX", XC_GGA_C_PBE_JRGX},
481#if defined(XC_GGA_X_OPTB88_VDW)
482 {
"XC_GGA_X_OPTB88_VDW",
483 XC_GGA_X_OPTB88_VDW},
485#if defined(XC_GGA_X_PBEK1_VDW)
486 {
"XC_GGA_X_PBEK1_VDW", XC_GGA_X_PBEK1_VDW},
488#if defined(XC_GGA_X_OPTPBE_VDW)
489 {
"XC_GGA_X_OPTPBE_VDW", XC_GGA_X_OPTPBE_VDW},
491#if defined(XC_GGA_X_RGE2)
492 {
"XC_GGA_X_RGE2", XC_GGA_X_RGE2},
494#if defined(XC_GGA_C_RGE2)
495 {
"XC_GGA_C_RGE2", XC_GGA_C_RGE2},
497#if defined(XC_GGA_X_RPW86)
498 {
"XC_GGA_X_RPW86", XC_GGA_X_RPW86},
500#if defined(XC_GGA_X_KT1)
501 {
"XC_GGA_X_KT1", XC_GGA_X_KT1},
503#if defined(XC_GGA_XC_KT2)
504 {
"XC_GGA_XC_KT2", XC_GGA_XC_KT2},
506#if defined(XC_GGA_C_WL)
507 {
"XC_GGA_C_WL", XC_GGA_C_WL},
509#if defined(XC_GGA_C_WI)
510 {
"XC_GGA_C_WI", XC_GGA_C_WI},
512#if defined(XC_GGA_X_MB88)
513 {
"XC_GGA_X_MB88", XC_GGA_X_MB88},
515#if defined(XC_GGA_X_SOGGA)
516 {
"XC_GGA_X_SOGGA", XC_GGA_X_SOGGA},
518#if defined(XC_GGA_X_SOGGA11)
519 {
"XC_GGA_X_SOGGA11", XC_GGA_X_SOGGA11},
521#if defined(XC_GGA_C_SOGGA11)
522 {
"XC_GGA_C_SOGGA11", XC_GGA_C_SOGGA11},
524#if defined(XC_GGA_C_WI0)
525 {
"XC_GGA_C_WI0", XC_GGA_C_WI0},
527#if defined(XC_GGA_XC_TH1)
528 {
"XC_GGA_XC_TH1", XC_GGA_XC_TH1},
530#if defined(XC_GGA_XC_TH2)
531 {
"XC_GGA_XC_TH2", XC_GGA_XC_TH2},
533#if defined(XC_GGA_XC_TH3)
534 {
"XC_GGA_XC_TH3", XC_GGA_XC_TH3},
536#if defined(XC_GGA_XC_TH4)
537 {
"XC_GGA_XC_TH4", XC_GGA_XC_TH4},
539#if defined(XC_GGA_X_C09X)
540 {
"XC_GGA_X_C09X", XC_GGA_X_C09X},
542#if defined(XC_GGA_C_SOGGA11_X)
543 {
"XC_GGA_C_SOGGA11_X", XC_GGA_C_SOGGA11_X},
545#if defined(XC_GGA_X_LB)
546 {
"XC_GGA_X_LB", XC_GGA_X_LB},
548#if defined(XC_GGA_XC_HCTH_93)
549 {
"XC_GGA_XC_HCTH_93", XC_GGA_XC_HCTH_93},
551#if defined(XC_GGA_XC_HCTH_120)
552 {
"XC_GGA_XC_HCTH_120", XC_GGA_XC_HCTH_120},
554#if defined(XC_GGA_XC_HCTH_147)
555 {
"XC_GGA_XC_HCTH_147", XC_GGA_XC_HCTH_147},
557#if defined(XC_GGA_XC_HCTH_407)
558 {
"XC_GGA_XC_HCTH_407", XC_GGA_XC_HCTH_407},
560#if defined(XC_GGA_XC_EDF1)
561 {
"XC_GGA_XC_EDF1", XC_GGA_XC_EDF1},
563#if defined(XC_GGA_XC_XLYP)
564 {
"XC_GGA_XC_XLYP", XC_GGA_XC_XLYP},
566#if defined(XC_GGA_XC_KT1)
567 {
"XC_GGA_XC_KT1", XC_GGA_XC_KT1},
569#if defined(XC_GGA_XC_B97_D)
570 {
"XC_GGA_XC_B97_D", XC_GGA_XC_B97_D},
572#if defined(XC_GGA_XC_PBE1W)
573 {
"XC_GGA_XC_PBE1W", XC_GGA_XC_PBE1W},
575#if defined(XC_GGA_XC_MPWLYP1W)
576 {
"XC_GGA_XC_MPWLYP1W", XC_GGA_XC_MPWLYP1W},
578#if defined(XC_GGA_XC_PBELYP1W)
579 {
"XC_GGA_XC_PBELYP1W", XC_GGA_XC_PBELYP1W},
581#if defined(XC_GGA_X_LBM)
582 {
"XC_GGA_X_LBM", XC_GGA_X_LBM},
584#if defined(XC_GGA_X_OL2)
585 {
"XC_GGA_X_OL2", XC_GGA_X_OL2},
587#if defined(XC_GGA_X_APBE)
588 {
"XC_GGA_X_APBE", XC_GGA_X_APBE},
590#if defined(XC_GGA_K_APBE)
591 {
"XC_GGA_K_APBE", XC_GGA_K_APBE},
593#if defined(XC_GGA_C_APBE)
594 {
"XC_GGA_C_APBE", XC_GGA_C_APBE},
596#if defined(XC_GGA_K_TW1)
597 {
"XC_GGA_K_TW1", XC_GGA_K_TW1},
599#if defined(XC_GGA_K_TW2)
600 {
"XC_GGA_K_TW2", XC_GGA_K_TW2},
602#if defined(XC_GGA_K_TW3)
603 {
"XC_GGA_K_TW3", XC_GGA_K_TW3},
605#if defined(XC_GGA_K_TW4)
606 {
"XC_GGA_K_TW4", XC_GGA_K_TW4},
608#if defined(XC_GGA_X_HTBS)
609 {
"XC_GGA_X_HTBS", XC_GGA_X_HTBS},
611#if defined(XC_GGA_X_AIRY)
612 {
"XC_GGA_X_AIRY", XC_GGA_X_AIRY},
614#if defined(XC_GGA_X_LAG)
615 {
"XC_GGA_X_LAG", XC_GGA_X_LAG},
617#if defined(XC_GGA_XC_MOHLYP)
618 {
"XC_GGA_XC_MOHLYP", XC_GGA_XC_MOHLYP},
620#if defined(XC_GGA_XC_MOHLYP2)
621 {
"XC_GGA_XC_MOHLYP2", XC_GGA_XC_MOHLYP2},
623#if defined(XC_GGA_XC_TH_FL)
624 {
"XC_GGA_XC_TH_FL", XC_GGA_XC_TH_FL},
626#if defined(XC_GGA_XC_TH_FC)
627 {
"XC_GGA_XC_TH_FC", XC_GGA_XC_TH_FC},
629#if defined(XC_GGA_XC_TH_FCFO)
630 {
"XC_GGA_XC_TH_FCFO", XC_GGA_XC_TH_FCFO},
632#if defined(XC_GGA_XC_TH_FCO)
633 {
"XC_GGA_XC_TH_FCO", XC_GGA_XC_TH_FCO},
635#if defined(XC_GGA_C_OPTC)
636 {
"XC_GGA_C_OPTC", XC_GGA_C_OPTC},
638#if defined(XC_GGA_C_PBELOC)
639 {
"XC_GGA_C_PBELOC", XC_GGA_C_PBELOC},
641#if defined(XC_GGA_XC_VV10)
642 {
"XC_GGA_XC_VV10", XC_GGA_XC_VV10},
644#if defined(XC_GGA_C_PBEFE)
645 {
"XC_GGA_C_PBEFE", XC_GGA_C_PBEFE},
647#if defined(XC_GGA_C_OP_PW91)
648 {
"XC_GGA_C_OP_PW91", XC_GGA_C_OP_PW91},
650#if defined(XC_GGA_X_PBEFE)
651 {
"XC_GGA_X_PBEFE", XC_GGA_X_PBEFE},
653#if defined(XC_GGA_X_CAP)
654 {
"XC_GGA_X_CAP", XC_GGA_X_CAP},
656#if defined(XC_GGA_X_EB88)
657 {
"XC_GGA_X_EB88", XC_GGA_X_EB88},
659#if defined(XC_GGA_C_PBE_MOL)
660 {
"XC_GGA_C_PBE_MOL", XC_GGA_C_PBE_MOL},
662#if defined(XC_GGA_K_ABSP3)
663 {
"XC_GGA_K_ABSP3", XC_GGA_K_ABSP3},
665#if defined(XC_GGA_K_ABSP4)
666 {
"XC_GGA_K_ABSP4", XC_GGA_K_ABSP4},
668#if defined(XC_GGA_C_BMK)
669 {
"XC_GGA_C_BMK", XC_GGA_C_BMK},
671#if defined(XC_GGA_C_TAU_HCTH)
672 {
"XC_GGA_C_TAU_HCTH", XC_GGA_C_TAU_HCTH},
674#if defined(XC_GGA_C_HYB_TAU_HCTH)
675 {
"XC_GGA_C_HYB_TAU_HCTH", XC_GGA_C_HYB_TAU_HCTH},
677#if defined(XC_GGA_X_BEEFVDW)
678 {
"XC_GGA_X_BEEFVDW", XC_GGA_X_BEEFVDW},
680#if defined(XC_GGA_XC_BEEFVDW)
681 {
"XC_GGA_XC_BEEFVDW", XC_GGA_XC_BEEFVDW},
683#if defined(XC_GGA_X_PBETRANS)
684 {
"XC_GGA_X_PBETRANS", XC_GGA_X_PBETRANS},
686#if defined(XC_GGA_X_CHACHIYO)
687 {
"XC_GGA_X_CHACHIYO", XC_GGA_X_CHACHIYO},
689#if defined(XC_GGA_K_VW)
690 {
"XC_GGA_K_VW", XC_GGA_K_VW},
692#if defined(XC_GGA_K_GE2)
693 {
"XC_GGA_K_GE2", XC_GGA_K_GE2},
695#if defined(XC_GGA_K_GOLDEN)
696 {
"XC_GGA_K_GOLDEN", XC_GGA_K_GOLDEN},
698#if defined(XC_GGA_K_YT65)
699 {
"XC_GGA_K_YT65", XC_GGA_K_YT65},
701#if defined(XC_GGA_K_BALTIN)
702 {
"XC_GGA_K_BALTIN", XC_GGA_K_BALTIN},
704#if defined(XC_GGA_K_LIEB)
705 {
"XC_GGA_K_LIEB", XC_GGA_K_LIEB},
707#if defined(XC_GGA_K_ABSP1)
708 {
"XC_GGA_K_ABSP1", XC_GGA_K_ABSP1},
710#if defined(XC_GGA_K_ABSP2)
711 {
"XC_GGA_K_ABSP2", XC_GGA_K_ABSP2},
713#if defined(XC_GGA_K_GR)
714 {
"XC_GGA_K_GR", XC_GGA_K_GR},
716#if defined(XC_GGA_K_LUDENA)
717 {
"XC_GGA_K_LUDENA", XC_GGA_K_LUDENA},
719#if defined(XC_GGA_K_GP85)
720 {
"XC_GGA_K_GP85", XC_GGA_K_GP85},
722#if defined(XC_GGA_K_PEARSON)
723 {
"XC_GGA_K_PEARSON", XC_GGA_K_PEARSON},
725#if defined(XC_GGA_K_OL1)
726 {
"XC_GGA_K_OL1", XC_GGA_K_OL1},
728#if defined(XC_GGA_K_OL2)
729 {
"XC_GGA_K_OL2", XC_GGA_K_OL2},
731#if defined(XC_GGA_K_FR_B88)
732 {
"XC_GGA_K_FR_B88", XC_GGA_K_FR_B88},
734#if defined(XC_GGA_K_FR_PW86)
735 {
"XC_GGA_K_FR_PW86", XC_GGA_K_FR_PW86},
737#if defined(XC_GGA_K_DK)
738 {
"XC_GGA_K_DK", XC_GGA_K_DK},
740#if defined(XC_GGA_K_PERDEW)
741 {
"XC_GGA_K_PERDEW", XC_GGA_K_PERDEW},
743#if defined(XC_GGA_K_VSK)
744 {
"XC_GGA_K_VSK", XC_GGA_K_VSK},
746#if defined(XC_GGA_K_VJKS)
747 {
"XC_GGA_K_VJKS", XC_GGA_K_VJKS},
749#if defined(XC_GGA_K_ERNZERHOF)
750 {
"XC_GGA_K_ERNZERHOF", XC_GGA_K_ERNZERHOF},
752#if defined(XC_GGA_K_LC94)
753 {
"XC_GGA_K_LC94", XC_GGA_K_LC94},
755#if defined(XC_GGA_K_LLP)
756 {
"XC_GGA_K_LLP", XC_GGA_K_LLP},
758#if defined(XC_GGA_K_THAKKAR)
759 {
"XC_GGA_K_THAKKAR", XC_GGA_K_THAKKAR},
761#if defined(XC_GGA_X_WPBEH)
762 {
"XC_GGA_X_WPBEH", XC_GGA_X_WPBEH},
764#if defined(XC_GGA_X_HJS_PBE)
765 {
"XC_GGA_X_HJS_PBE", XC_GGA_X_HJS_PBE},
767#if defined(XC_GGA_X_HJS_PBE_SOL)
768 {
"XC_GGA_X_HJS_PBE_SOL", XC_GGA_X_HJS_PBE_SOL},
770#if defined(XC_GGA_X_HJS_B88)
771 {
"XC_GGA_X_HJS_B88", XC_GGA_X_HJS_B88},
773#if defined(XC_GGA_X_HJS_B97X)
774 {
"XC_GGA_X_HJS_B97X", XC_GGA_X_HJS_B97X},
776#if defined(XC_GGA_X_ITYH)
777 {
"XC_GGA_X_ITYH", XC_GGA_X_ITYH},
779#if defined(XC_GGA_X_SFAT)
780 {
"XC_GGA_X_SFAT", XC_GGA_X_SFAT},
782#if defined(XC_GGA_X_SG4)
783 {
"XC_GGA_X_SG4", XC_GGA_X_SG4},
785#if defined(XC_GGA_C_SG4)
786 {
"XC_GGA_C_SG4", XC_GGA_C_SG4},
788#if defined(XC_GGA_X_GG99)
789 {
"XC_GGA_X_GG99", XC_GGA_X_GG99},
791#if defined(XC_GGA_X_PBEpow)
792 {
"XC_GGA_X_PBEpow", XC_GGA_X_PBEpow},
794#if defined(XC_GGA_X_KGG99)
795 {
"XC_GGA_X_KGG99", XC_GGA_X_KGG99},
797#if defined(XC_GGA_XC_HLE16)
798 {
"XC_GGA_XC_HLE16", XC_GGA_XC_HLE16},
800#if defined(XC_GGA_C_SCAN_E0)
801 {
"XC_GGA_C_SCAN_E0", XC_GGA_C_SCAN_E0},
803#if defined(XC_GGA_C_GAPC)
804 {
"XC_GGA_C_GAPC", XC_GGA_C_GAPC},
806#if defined(XC_GGA_C_GAPLOC)
807 {
"XC_GGA_C_GAPLOC", XC_GGA_C_GAPLOC},
809#if defined(XC_GGA_C_ZVPBEINT)
810 {
"XC_GGA_C_ZVPBEINT", XC_GGA_C_ZVPBEINT},
812#if defined(XC_GGA_C_ZVPBESOL)
813 {
"XC_GGA_C_ZVPBESOL", XC_GGA_C_ZVPBESOL},
815#if defined(XC_GGA_C_TM_LYP)
816 {
"XC_GGA_C_TM_LYP", XC_GGA_C_TM_LYP},
818#if defined(XC_GGA_C_TM_PBE)
819 {
"XC_GGA_C_TM_PBE", XC_GGA_C_TM_PBE},
821#if defined(XC_GGA_C_W94)
822 {
"XC_GGA_C_W94", XC_GGA_C_W94},
824#if defined(XC_GGA_C_CS1)
825 {
"XC_GGA_C_CS1", XC_GGA_C_CS1},
827#if defined(XC_GGA_X_B88M)
828 {
"XC_GGA_X_B88M", XC_GGA_X_B88M},
830#if defined(XC_GGA_K_PBE3)
831 {
"XC_GGA_K_PBE3", XC_GGA_K_PBE3},
833#if defined(XC_GGA_K_PBE4)
834 {
"XC_GGA_K_PBE4", XC_GGA_K_PBE4},
836#if defined(XC_GGA_K_EXP4)
837 {
"XC_GGA_K_EXP4", XC_GGA_K_EXP4},
839#if defined(XC_HYB_GGA_X_N12_SX)
840 {
"XC_HYB_GGA_X_N12_SX", XC_HYB_GGA_X_N12_SX},
842#if defined(XC_HYB_GGA_XC_B97_1p)
843 {
"XC_HYB_GGA_XC_B97_1p", XC_HYB_GGA_XC_B97_1p},
845#if defined(XC_HYB_GGA_XC_PBE_MOL0)
846 {
"XC_HYB_GGA_XC_PBE_MOL0", XC_HYB_GGA_XC_PBE_MOL0},
848#if defined(XC_HYB_GGA_XC_PBE_SOL0)
849 {
"XC_HYB_GGA_XC_PBE_SOL0", XC_HYB_GGA_XC_PBE_SOL0},
851#if defined(XC_HYB_GGA_XC_PBEB0)
852 {
"XC_HYB_GGA_XC_PBEB0", XC_HYB_GGA_XC_PBEB0},
854#if defined(XC_HYB_GGA_XC_PBE_MOLB0)
855 {
"XC_HYB_GGA_XC_PBE_MOLB0", XC_HYB_GGA_XC_PBE_MOLB0},
857#if defined(XC_HYB_GGA_XC_PBE50)
858 {
"XC_HYB_GGA_XC_PBE50", XC_HYB_GGA_XC_PBE50},
860#if defined(XC_HYB_GGA_XC_B3PW91)
861 {
"XC_HYB_GGA_XC_B3PW91", XC_HYB_GGA_XC_B3PW91},
863#if defined(XC_HYB_GGA_XC_B3LYP)
864 {
"XC_HYB_GGA_XC_B3LYP", XC_HYB_GGA_XC_B3LYP},
866#if defined(XC_HYB_GGA_XC_B3P86)
867 {
"XC_HYB_GGA_XC_B3P86", XC_HYB_GGA_XC_B3P86},
869#if defined(XC_HYB_GGA_XC_O3LYP)
870 {
"XC_HYB_GGA_XC_O3LYP", XC_HYB_GGA_XC_O3LYP},
872#if defined(XC_HYB_GGA_XC_MPW1K)
873 {
"XC_HYB_GGA_XC_MPW1K", XC_HYB_GGA_XC_MPW1K},
875#if defined(XC_HYB_GGA_XC_PBEH)
876 {
"XC_HYB_GGA_XC_PBEH", XC_HYB_GGA_XC_PBEH},
878#if defined(XC_HYB_GGA_XC_B97)
879 {
"XC_HYB_GGA_XC_B97", XC_HYB_GGA_XC_B97},
881#if defined(XC_HYB_GGA_XC_B97_1)
882 {
"XC_HYB_GGA_XC_B97_1", XC_HYB_GGA_XC_B97_1},
884#if defined(XC_HYB_GGA_XC_B97_2)
885 {
"XC_HYB_GGA_XC_B97_2", XC_HYB_GGA_XC_B97_2},
887#if defined(XC_HYB_GGA_XC_X3LYP)
888 {
"XC_HYB_GGA_XC_X3LYP", XC_HYB_GGA_XC_X3LYP},
890#if defined(XC_HYB_GGA_XC_B1WC)
891 {
"XC_HYB_GGA_XC_B1WC", XC_HYB_GGA_XC_B1WC},
893#if defined(XC_HYB_GGA_XC_B97_K)
894 {
"XC_HYB_GGA_XC_B97_K", XC_HYB_GGA_XC_B97_K},
896#if defined(XC_HYB_GGA_XC_B97_3)
897 {
"XC_HYB_GGA_XC_B97_3", XC_HYB_GGA_XC_B97_3},
899#if defined(XC_HYB_GGA_XC_MPW3PW)
900 {
"XC_HYB_GGA_XC_MPW3PW", XC_HYB_GGA_XC_MPW3PW},
902#if defined(XC_HYB_GGA_XC_B1LYP)
903 {
"XC_HYB_GGA_XC_B1LYP", XC_HYB_GGA_XC_B1LYP},
905#if defined(XC_HYB_GGA_XC_B1PW91)
906 {
"XC_HYB_GGA_XC_B1PW91", XC_HYB_GGA_XC_B1PW91},
908#if defined(XC_HYB_GGA_XC_MPW1PW)
909 {
"XC_HYB_GGA_XC_MPW1PW", XC_HYB_GGA_XC_MPW1PW},
911#if defined(XC_HYB_GGA_XC_MPW3LYP)
912 {
"XC_HYB_GGA_XC_MPW3LYP", XC_HYB_GGA_XC_MPW3LYP},
914#if defined(XC_HYB_GGA_XC_SB98_1a)
915 {
"XC_HYB_GGA_XC_SB98_1a", XC_HYB_GGA_XC_SB98_1a},
917#if defined(XC_HYB_GGA_XC_SB98_1b)
918 {
"XC_HYB_GGA_XC_SB98_1b", XC_HYB_GGA_XC_SB98_1b},
920#if defined(XC_HYB_GGA_XC_SB98_1c)
921 {
"XC_HYB_GGA_XC_SB98_1c", XC_HYB_GGA_XC_SB98_1c},
923#if defined(XC_HYB_GGA_XC_SB98_2a)
924 {
"XC_HYB_GGA_XC_SB98_2a", XC_HYB_GGA_XC_SB98_2a},
926#if defined(XC_HYB_GGA_XC_SB98_2b)
927 {
"XC_HYB_GGA_XC_SB98_2b", XC_HYB_GGA_XC_SB98_2b},
929#if defined(XC_HYB_GGA_XC_SB98_2c)
930 {
"XC_HYB_GGA_XC_SB98_2c", XC_HYB_GGA_XC_SB98_2c},
932#if defined(XC_HYB_GGA_X_SOGGA11_X)
933 {
"XC_HYB_GGA_X_SOGGA11_X", XC_HYB_GGA_X_SOGGA11_X},
935#if defined(XC_HYB_GGA_XC_HSE03)
936 {
"XC_HYB_GGA_XC_HSE03", XC_HYB_GGA_XC_HSE03},
938#if defined(XC_HYB_GGA_XC_HSE06)
939 {
"XC_HYB_GGA_XC_HSE06", XC_HYB_GGA_XC_HSE06},
941#if defined(XC_HYB_GGA_XC_HJS_PBE)
942 {
"XC_HYB_GGA_XC_HJS_PBE", XC_HYB_GGA_XC_HJS_PBE},
944#if defined(XC_HYB_GGA_XC_HJS_PBE_SOL)
945 {
"XC_HYB_GGA_XC_HJS_PBE_SOL", XC_HYB_GGA_XC_HJS_PBE_SOL},
947#if defined(XC_HYB_GGA_XC_HJS_B88)
948 {
"XC_HYB_GGA_XC_HJS_B88", XC_HYB_GGA_XC_HJS_B88},
950#if defined(XC_HYB_GGA_XC_HJS_B97X)
951 {
"XC_HYB_GGA_XC_HJS_B97X", XC_HYB_GGA_XC_HJS_B97X},
953#if defined(XC_HYB_GGA_XC_CAM_B3LYP)
954 {
"XC_HYB_GGA_XC_CAM_B3LYP", XC_HYB_GGA_XC_CAM_B3LYP},
956#if defined(XC_HYB_GGA_XC_TUNED_CAM_B3LYP)
957 {
"XC_HYB_GGA_XC_TUNED_CAM_B3LYP", XC_HYB_GGA_XC_TUNED_CAM_B3LYP},
959#if defined(XC_HYB_GGA_XC_BHANDH)
960 {
"XC_HYB_GGA_XC_BHANDH", XC_HYB_GGA_XC_BHANDH},
962#if defined(XC_HYB_GGA_XC_BHANDHLYP)
963 {
"XC_HYB_GGA_XC_BHANDHLYP", XC_HYB_GGA_XC_BHANDHLYP},
965#if defined(XC_HYB_GGA_XC_MB3LYP_RC04)
966 {
"XC_HYB_GGA_XC_MB3LYP_RC04", XC_HYB_GGA_XC_MB3LYP_RC04},
968#if defined(XC_HYB_GGA_XC_MPWLYP1M)
969 {
"XC_HYB_GGA_XC_MPWLYP1M", XC_HYB_GGA_XC_MPWLYP1M},
971#if defined(XC_HYB_GGA_XC_REVB3LYP)
972 {
"XC_HYB_GGA_XC_REVB3LYP", XC_HYB_GGA_XC_REVB3LYP},
974#if defined(XC_HYB_GGA_XC_CAMY_BLYP)
975 {
"XC_HYB_GGA_XC_CAMY_BLYP", XC_HYB_GGA_XC_CAMY_BLYP},
977#if defined(XC_HYB_GGA_XC_PBE0_13)
978 {
"XC_HYB_GGA_XC_PBE0_13", XC_HYB_GGA_XC_PBE0_13},
980#if defined(XC_HYB_GGA_XC_B3LYPs)
981 {
"XC_HYB_GGA_XC_B3LYPs", XC_HYB_GGA_XC_B3LYPs},
983#if defined(XC_HYB_GGA_XC_WB97)
984 {
"XC_HYB_GGA_XC_WB97", XC_HYB_GGA_XC_WB97},
986#if defined(XC_HYB_GGA_XC_WB97X)
987 {
"XC_HYB_GGA_XC_WB97X", XC_HYB_GGA_XC_WB97X},
989#if defined(XC_HYB_GGA_XC_LRC_WPBEH)
990 {
"XC_HYB_GGA_XC_LRC_WPBEH", XC_HYB_GGA_XC_LRC_WPBEH},
992#if defined(XC_HYB_GGA_XC_WB97X_V)
993 {
"XC_HYB_GGA_XC_WB97X_V", XC_HYB_GGA_XC_WB97X_V},
995#if defined(XC_HYB_GGA_XC_LCY_PBE)
996 {
"XC_HYB_GGA_XC_LCY_PBE", XC_HYB_GGA_XC_LCY_PBE},
998#if defined(XC_HYB_GGA_XC_LCY_BLYP)
999 {
"XC_HYB_GGA_XC_LCY_BLYP", XC_HYB_GGA_XC_LCY_BLYP},
1001#if defined(XC_HYB_GGA_XC_LC_VV10)
1002 {
"XC_HYB_GGA_XC_LC_VV10", XC_HYB_GGA_XC_LC_VV10},
1004#if defined(XC_HYB_GGA_XC_CAMY_B3LYP)
1005 {
"XC_HYB_GGA_XC_CAMY_B3LYP", XC_HYB_GGA_XC_CAMY_B3LYP},
1007#if defined(XC_HYB_GGA_XC_WB97X_D)
1008 {
"XC_HYB_GGA_XC_WB97X_D", XC_HYB_GGA_XC_WB97X_D},
1010#if defined(XC_HYB_GGA_XC_HPBEINT)
1011 {
"XC_HYB_GGA_XC_HPBEINT", XC_HYB_GGA_XC_HPBEINT},
1013#if defined(XC_HYB_GGA_XC_LRC_WPBE)
1014 {
"XC_HYB_GGA_XC_LRC_WPBE", XC_HYB_GGA_XC_LRC_WPBE},
1016#if defined(XC_HYB_GGA_XC_B3LYP5)
1017 {
"XC_HYB_GGA_XC_B3LYP5", XC_HYB_GGA_XC_B3LYP5},
1019#if defined(XC_HYB_GGA_XC_EDF2)
1020 {
"XC_HYB_GGA_XC_EDF2", XC_HYB_GGA_XC_EDF2},
1022#if defined(XC_HYB_GGA_XC_CAP0)
1023 {
"XC_HYB_GGA_XC_CAP0", XC_HYB_GGA_XC_CAP0},
1025#if defined(XC_HYB_GGA_XC_LC_WPBE)
1026 {
"XC_HYB_GGA_XC_LC_WPBE", XC_HYB_GGA_XC_LC_WPBE},
1028#if defined(XC_HYB_GGA_XC_HSE12)
1029 {
"XC_HYB_GGA_XC_HSE12", XC_HYB_GGA_XC_HSE12},
1031#if defined(XC_HYB_GGA_XC_HSE12S)
1032 {
"XC_HYB_GGA_XC_HSE12S", XC_HYB_GGA_XC_HSE12S},
1034#if defined(XC_HYB_GGA_XC_HSE_SOL)
1035 {
"XC_HYB_GGA_XC_HSE_SOL", XC_HYB_GGA_XC_HSE_SOL},
1037#if defined(XC_HYB_GGA_XC_CAM_QTP_01)
1038 {
"XC_HYB_GGA_XC_CAM_QTP_01",
1039 XC_HYB_GGA_XC_CAM_QTP_01},
1041#if defined(XC_HYB_GGA_XC_MPW1LYP)
1042 {
"XC_HYB_GGA_XC_MPW1LYP", XC_HYB_GGA_XC_MPW1LYP},
1044#if defined(XC_HYB_GGA_XC_MPW1PBE)
1045 {
"XC_HYB_GGA_XC_MPW1PBE", XC_HYB_GGA_XC_MPW1PBE},
1047#if defined(XC_HYB_GGA_XC_KMLYP)
1048 {
"XC_HYB_GGA_XC_KMLYP", XC_HYB_GGA_XC_KMLYP},
1050#if defined(XC_HYB_GGA_XC_B5050LYP)
1051 {
"XC_HYB_GGA_XC_B5050LYP", XC_HYB_GGA_XC_B5050LYP},
1053#if defined(XC_MGGA_C_DLDF)
1054 {
"XC_MGGA_C_DLDF", XC_MGGA_C_DLDF},
1056#if defined(XC_MGGA_XC_ZLP)
1057 {
"XC_MGGA_XC_ZLP", XC_MGGA_XC_ZLP},
1059#if defined(XC_MGGA_XC_OTPSS_D)
1060 {
"XC_MGGA_XC_OTPSS_D", XC_MGGA_XC_OTPSS_D},
1062#if defined(XC_MGGA_C_CS)
1063 {
"XC_MGGA_C_CS", XC_MGGA_C_CS},
1065#if defined(XC_MGGA_C_MN12_SX)
1066 {
"XC_MGGA_C_MN12_SX", XC_MGGA_C_MN12_SX},
1068#if defined(XC_MGGA_C_MN12_L)
1069 {
"XC_MGGA_C_MN12_L", XC_MGGA_C_MN12_L},
1071#if defined(XC_MGGA_C_M11_L)
1072 {
"XC_MGGA_C_M11_L", XC_MGGA_C_M11_L},
1074#if defined(XC_MGGA_C_M11)
1075 {
"XC_MGGA_C_M11", XC_MGGA_C_M11},
1077#if defined(XC_MGGA_C_M08_SO)
1078 {
"XC_MGGA_C_M08_SO", XC_MGGA_C_M08_SO},
1080#if defined(XC_MGGA_C_M08_HX)
1081 {
"XC_MGGA_C_M08_HX", XC_MGGA_C_M08_HX},
1083#if defined(XC_MGGA_X_LTA)
1084 {
"XC_MGGA_X_LTA", XC_MGGA_X_LTA},
1086#if defined(XC_MGGA_X_TPSS)
1087 {
"XC_MGGA_X_TPSS", XC_MGGA_X_TPSS},
1089#if defined(XC_MGGA_X_M06_L)
1090 {
"XC_MGGA_X_M06_L", XC_MGGA_X_M06_L},
1092#if defined(XC_MGGA_X_GVT4)
1093 {
"XC_MGGA_X_GVT4", XC_MGGA_X_GVT4},
1095#if defined(XC_MGGA_X_TAU_HCTH)
1096 {
"XC_MGGA_X_TAU_HCTH", XC_MGGA_X_TAU_HCTH},
1098#if defined(XC_MGGA_X_BR89)
1099 {
"XC_MGGA_X_BR89", XC_MGGA_X_BR89},
1101#if defined(XC_MGGA_X_BJ06)
1102 {
"XC_MGGA_X_BJ06", XC_MGGA_X_BJ06},
1104#if defined(XC_MGGA_X_TB09)
1105 {
"XC_MGGA_X_TB09", XC_MGGA_X_TB09},
1107#if defined(XC_MGGA_X_RPP09)
1108 {
"XC_MGGA_X_RPP09", XC_MGGA_X_RPP09},
1110#if defined(XC_MGGA_X_2D_PRHG07)
1111 {
"XC_MGGA_X_2D_PRHG07", XC_MGGA_X_2D_PRHG07},
1113#if defined(XC_MGGA_X_2D_PRHG07_PRP10)
1114 {
"XC_MGGA_X_2D_PRHG07_PRP10", XC_MGGA_X_2D_PRHG07_PRP10},
1116#if defined(XC_MGGA_X_REVTPSS)
1117 {
"XC_MGGA_X_REVTPSS", XC_MGGA_X_REVTPSS},
1119#if defined(XC_MGGA_X_PKZB)
1120 {
"XC_MGGA_X_PKZB", XC_MGGA_X_PKZB},
1122#if defined(XC_MGGA_X_MS0)
1123 {
"XC_MGGA_X_MS0", XC_MGGA_X_MS0},
1125#if defined(XC_MGGA_X_MS1)
1126 {
"XC_MGGA_X_MS1", XC_MGGA_X_MS1},
1128#if defined(XC_MGGA_X_MS2)
1129 {
"XC_MGGA_X_MS2", XC_MGGA_X_MS2},
1131#if defined(XC_MGGA_X_M11_L)
1132 {
"XC_MGGA_X_M11_L", XC_MGGA_X_M11_L},
1134#if defined(XC_MGGA_X_MN12_L)
1135 {
"XC_MGGA_X_MN12_L", XC_MGGA_X_MN12_L},
1137#if defined(XC_MGGA_XC_CC06)
1138 {
"XC_MGGA_XC_CC06", XC_MGGA_XC_CC06},
1140#if defined(XC_MGGA_X_MK00)
1141 {
"XC_MGGA_X_MK00", XC_MGGA_X_MK00},
1143#if defined(XC_MGGA_C_TPSS)
1144 {
"XC_MGGA_C_TPSS", XC_MGGA_C_TPSS},
1146#if defined(XC_MGGA_C_VSXC)
1147 {
"XC_MGGA_C_VSXC", XC_MGGA_C_VSXC},
1149#if defined(XC_MGGA_C_M06_L)
1150 {
"XC_MGGA_C_M06_L", XC_MGGA_C_M06_L},
1152#if defined(XC_MGGA_C_M06_HF)
1153 {
"XC_MGGA_C_M06_HF", XC_MGGA_C_M06_HF},
1155#if defined(XC_MGGA_C_M06)
1156 {
"XC_MGGA_C_M06", XC_MGGA_C_M06},
1158#if defined(XC_MGGA_C_M06_2X)
1159 {
"XC_MGGA_C_M06_2X", XC_MGGA_C_M06_2X},
1161#if defined(XC_MGGA_C_M05)
1162 {
"XC_MGGA_C_M05", XC_MGGA_C_M05},
1164#if defined(XC_MGGA_C_M05_2X)
1165 {
"XC_MGGA_C_M05_2X", XC_MGGA_C_M05_2X},
1167#if defined(XC_MGGA_C_PKZB)
1168 {
"XC_MGGA_C_PKZB", XC_MGGA_C_PKZB},
1170#if defined(XC_MGGA_C_BC95)
1171 {
"XC_MGGA_C_BC95", XC_MGGA_C_BC95},
1173#if defined(XC_MGGA_C_REVTPSS)
1174 {
"XC_MGGA_C_REVTPSS", XC_MGGA_C_REVTPSS},
1176#if defined(XC_MGGA_XC_TPSSLYP1W)
1177 {
"XC_MGGA_XC_TPSSLYP1W", XC_MGGA_XC_TPSSLYP1W},
1179#if defined(XC_MGGA_X_MK00B)
1180 {
"XC_MGGA_X_MK00B", XC_MGGA_X_MK00B},
1182#if defined(XC_MGGA_X_BLOC)
1183 {
"XC_MGGA_X_BLOC", XC_MGGA_X_BLOC},
1185#if defined(XC_MGGA_X_MODTPSS)
1186 {
"XC_MGGA_X_MODTPSS", XC_MGGA_X_MODTPSS},
1188#if defined(XC_MGGA_C_TPSSLOC)
1189 {
"XC_MGGA_C_TPSSLOC", XC_MGGA_C_TPSSLOC},
1191#if defined(XC_MGGA_X_MBEEF)
1192 {
"XC_MGGA_X_MBEEF", XC_MGGA_X_MBEEF},
1194#if defined(XC_MGGA_X_MBEEFVDW)
1195 {
"XC_MGGA_X_MBEEFVDW", XC_MGGA_X_MBEEFVDW},
1197#if defined(XC_MGGA_XC_B97M_V)
1198 {
"XC_MGGA_XC_B97M_V", XC_MGGA_XC_B97M_V},
1200#if defined(XC_MGGA_X_MVS)
1201 {
"XC_MGGA_X_MVS", XC_MGGA_X_MVS},
1203#if defined(XC_MGGA_X_MN15_L)
1204 {
"XC_MGGA_X_MN15_L", XC_MGGA_X_MN15_L},
1206#if defined(XC_MGGA_C_MN15_L)
1207 {
"XC_MGGA_C_MN15_L", XC_MGGA_C_MN15_L},
1209#if defined(XC_MGGA_X_SCAN)
1210 {
"XC_MGGA_X_SCAN", XC_MGGA_X_SCAN},
1212#if defined(XC_MGGA_C_SCAN)
1213 {
"XC_MGGA_C_SCAN", XC_MGGA_C_SCAN},
1215#if defined(XC_MGGA_C_MN15)
1216 {
"XC_MGGA_C_MN15", XC_MGGA_C_MN15},
1218#if defined(XC_MGGA_X_B00)
1219 {
"XC_MGGA_X_B00", XC_MGGA_X_B00},
1221#if defined(XC_MGGA_XC_HLE17)
1222 {
"XC_MGGA_XC_HLE17", XC_MGGA_XC_HLE17},
1224#if defined(XC_MGGA_C_SCAN_RVV10)
1225 {
"XC_MGGA_C_SCAN_RVV10", XC_MGGA_C_SCAN_RVV10},
1227#if defined(XC_MGGA_X_REVM06_L)
1228 {
"XC_MGGA_X_REVM06_L", XC_MGGA_X_REVM06_L},
1230#if defined(XC_MGGA_C_REVM06_L)
1231 {
"XC_MGGA_C_REVM06_L", XC_MGGA_C_REVM06_L},
1233#if defined(XC_MGGA_X_TM)
1234 {
"XC_MGGA_X_TM", XC_MGGA_X_TM},
1236#if defined(XC_MGGA_X_VT84)
1237 {
"XC_MGGA_X_VT84", XC_MGGA_X_VT84},
1239#if defined(XC_MGGA_X_SA_TPSS)
1240 {
"XC_MGGA_X_SA_TPSS", XC_MGGA_X_SA_TPSS},
1242#if defined(XC_MGGA_K_PC07)
1243 {
"XC_MGGA_K_PC07", XC_MGGA_K_PC07},
1245#if defined(XC_MGGA_C_KCIS)
1246 {
"XC_MGGA_C_KCIS", XC_MGGA_C_KCIS},
1248#if defined(XC_MGGA_XC_LP90)
1249 {
"XC_MGGA_XC_LP90", XC_MGGA_XC_LP90},
1251#if defined(XC_MGGA_C_B88)
1252 {
"XC_MGGA_C_B88", XC_MGGA_C_B88},
1254#if defined(XC_MGGA_X_GX)
1255 {
"XC_MGGA_X_GX", XC_MGGA_X_GX},
1257#if defined(XC_MGGA_X_PBE_GX)
1258 {
"XC_MGGA_X_PBE_GX", XC_MGGA_X_PBE_GX},
1260#if defined(XC_MGGA_X_REVSCAN)
1261 {
"XC_MGGA_X_REVSCAN", XC_MGGA_X_REVSCAN},
1263#if defined(XC_MGGA_C_REVSCAN)
1264 {
"XC_MGGA_C_REVSCAN", XC_MGGA_C_REVSCAN},
1266#if defined(XC_MGGA_C_SCAN_VV10)
1267 {
"XC_MGGA_C_SCAN_VV10", XC_MGGA_C_SCAN_VV10},
1269#if defined(XC_MGGA_C_REVSCAN_VV10)
1270 {
"XC_MGGA_C_REVSCAN_VV10", XC_MGGA_C_REVSCAN_VV10},
1272#if defined(XC_MGGA_X_BR89_EXPLICIT)
1273 {
"XC_MGGA_X_BR89_EXPLICIT", XC_MGGA_X_BR89_EXPLICIT},
1275#if defined(XC_HYB_MGGA_X_DLDF)
1276 {
"XC_HYB_MGGA_X_DLDF", XC_HYB_MGGA_X_DLDF},
1278#if defined(XC_HYB_MGGA_X_MS2H)
1279 {
"XC_HYB_MGGA_X_MS2H", XC_HYB_MGGA_X_MS2H},
1281#if defined(XC_HYB_MGGA_X_MN12_SX)
1282 {
"XC_HYB_MGGA_X_MN12_SX", XC_HYB_MGGA_X_MN12_SX},
1284#if defined(XC_HYB_MGGA_X_SCAN0)
1285 {
"XC_HYB_MGGA_X_SCAN0", XC_HYB_MGGA_X_SCAN0},
1287#if defined(XC_HYB_MGGA_X_MN15)
1288 {
"XC_HYB_MGGA_X_MN15", XC_HYB_MGGA_X_MN15},
1290#if defined(XC_HYB_MGGA_X_BMK)
1291 {
"XC_HYB_MGGA_X_BMK", XC_HYB_MGGA_X_BMK},
1293#if defined(XC_HYB_MGGA_X_TAU_HCTH)
1294 {
"XC_HYB_MGGA_X_TAU_HCTH", XC_HYB_MGGA_X_TAU_HCTH},
1296#if defined(XC_HYB_MGGA_X_M08_HX)
1297 {
"XC_HYB_MGGA_X_M08_HX", XC_HYB_MGGA_X_M08_HX},
1299#if defined(XC_HYB_MGGA_X_M08_SO)
1300 {
"XC_HYB_MGGA_X_M08_SO", XC_HYB_MGGA_X_M08_SO},
1302#if defined(XC_HYB_MGGA_X_M11)
1303 {
"XC_HYB_MGGA_X_M11", XC_HYB_MGGA_X_M11},
1305#if defined(XC_HYB_MGGA_X_M05)
1306 {
"XC_HYB_MGGA_X_M05", XC_HYB_MGGA_X_M05},
1308#if defined(XC_HYB_MGGA_X_M05_2X)
1309 {
"XC_HYB_MGGA_X_M05_2X", XC_HYB_MGGA_X_M05_2X},
1311#if defined(XC_HYB_MGGA_XC_B88B95)
1312 {
"XC_HYB_MGGA_XC_B88B95", XC_HYB_MGGA_XC_B88B95},
1314#if defined(XC_HYB_MGGA_XC_B86B95)
1315 {
"XC_HYB_MGGA_XC_B86B95", XC_HYB_MGGA_XC_B86B95},
1317#if defined(XC_HYB_MGGA_XC_PW86B95)
1318 {
"XC_HYB_MGGA_XC_PW86B95", XC_HYB_MGGA_XC_PW86B95},
1320#if defined(XC_HYB_MGGA_XC_BB1K)
1321 {
"XC_HYB_MGGA_XC_BB1K", XC_HYB_MGGA_XC_BB1K},
1323#if defined(XC_HYB_MGGA_X_M06_HF)
1324 {
"XC_HYB_MGGA_X_M06_HF", XC_HYB_MGGA_X_M06_HF},
1326#if defined(XC_HYB_MGGA_XC_MPW1B95)
1327 {
"XC_HYB_MGGA_XC_MPW1B95", XC_HYB_MGGA_XC_MPW1B95},
1329#if defined(XC_HYB_MGGA_XC_MPWB1K)
1330 {
"XC_HYB_MGGA_XC_MPWB1K", XC_HYB_MGGA_XC_MPWB1K},
1332#if defined(XC_HYB_MGGA_XC_X1B95)
1333 {
"XC_HYB_MGGA_XC_X1B95", XC_HYB_MGGA_XC_X1B95},
1335#if defined(XC_HYB_MGGA_XC_XB1K)
1336 {
"XC_HYB_MGGA_XC_XB1K", XC_HYB_MGGA_XC_XB1K},
1338#if defined(XC_HYB_MGGA_X_M06)
1339 {
"XC_HYB_MGGA_X_M06", XC_HYB_MGGA_X_M06},
1341#if defined(XC_HYB_MGGA_X_M06_2X)
1342 {
"XC_HYB_MGGA_X_M06_2X", XC_HYB_MGGA_X_M06_2X},
1344#if defined(XC_HYB_MGGA_XC_PW6B95)
1345 {
"XC_HYB_MGGA_XC_PW6B95", XC_HYB_MGGA_XC_PW6B95},
1347#if defined(XC_HYB_MGGA_XC_PWB6K)
1348 {
"XC_HYB_MGGA_XC_PWB6K", XC_HYB_MGGA_XC_PWB6K},
1350#if defined(XC_HYB_MGGA_XC_TPSSH)
1351 {
"XC_HYB_MGGA_XC_TPSSH", XC_HYB_MGGA_XC_TPSSH},
1353#if defined(XC_HYB_MGGA_XC_REVTPSSH)
1354 {
"XC_HYB_MGGA_XC_REVTPSSH", XC_HYB_MGGA_XC_REVTPSSH},
1356#if defined(XC_HYB_MGGA_X_MVSH)
1357 {
"XC_HYB_MGGA_X_MVSH", XC_HYB_MGGA_X_MVSH},
1359#if defined(XC_HYB_MGGA_XC_WB97M_V)
1360 {
"XC_HYB_MGGA_XC_WB97M_V", XC_HYB_MGGA_XC_WB97M_V},
1362#if defined(XC_HYB_MGGA_XC_B0KCIS)
1363 {
"XC_HYB_MGGA_XC_B0KCIS", XC_HYB_MGGA_XC_B0KCIS},
1365#if defined(XC_HYB_MGGA_XC_MPW1KCIS)
1366 {
"XC_HYB_MGGA_XC_MPW1KCIS", XC_HYB_MGGA_XC_MPW1KCIS},
1368#if defined(XC_HYB_MGGA_XC_MPWKCIS1K)
1369 {
"XC_HYB_MGGA_XC_MPWKCIS1K",
1370 XC_HYB_MGGA_XC_MPWKCIS1K},
1372#if defined(XC_HYB_MGGA_XC_PBE1KCIS)
1373 {
"XC_HYB_MGGA_XC_PBE1KCIS", XC_HYB_MGGA_XC_PBE1KCIS},
1375#if defined(XC_HYB_MGGA_XC_TPSS1KCIS)
1376 {
"XC_HYB_MGGA_XC_TPSS1KCIS", XC_HYB_MGGA_XC_TPSS1KCIS},
1378#if defined(XC_HYB_MGGA_X_REVSCAN0)
1379 {
"XC_HYB_MGGA_X_REVSCAN0", XC_HYB_MGGA_X_REVSCAN0},
1381#if defined(XC_HYB_MGGA_XC_B98)
1382 {
"XC_HYB_MGGA_XC_B98", XC_HYB_MGGA_XC_B98}
1390 std::string libxc_name_;
1394 std::unique_ptr<xc_func_type> handler_{
nullptr};
1396 bool libxc_initialized_{
false};
1407 : libxc_name_(libxc_name__)
1408 , num_spins_(num_spins__)
1411 if (libxc_functionals.count(libxc_name_) == 0 && libxc_name_ !=
"XC_GGA_DEBUG" &&
1412 libxc_name_ !=
"XC_LDA_DEBUG") {
1415 libxc_initialized_ =
false;
1419 auto ns = (num_spins__ == 1) ? XC_UNPOLARIZED : XC_POLARIZED;
1421 if (libxc_name_ !=
"XC_GGA_DEBUG" && libxc_name_ !=
"XC_LDA_DEBUG") {
1422 handler_ = std::unique_ptr<xc_func_type>(
new xc_func_type);
1425 if (xc_func_init(handler_.get(), libxc_functionals.at(libxc_name_), ns) != 0) {
1426 RTE_THROW(
"xc_func_init() failed");
1430 libxc_initialized_ =
true;
1435 this->libxc_name_ = src__.libxc_name_;
1436 this->num_spins_ = src__.num_spins_;
1437 this->handler_ = std::move(src__.handler_);
1438 this->libxc_initialized_ = src__.libxc_initialized_;
1439 src__.libxc_initialized_ =
false;
1445 xc_func_end(handler_.get());
1449 const std::string name()
const
1452 return std::string(handler_->info->name);
1458 const std::string refs()
const
1461 std::stringstream s;
1462 for (
int i = 0; handler_->info->refs[i] != NULL; i++) {
1463 s << std::string(handler_->info->refs[i]->ref);
1464 if (strlen(handler_->info->refs[i]->doi) > 0) {
1465 s <<
" (" << std::string(handler_->info->refs[i]->doi) <<
")";
1478 return handler_->info->family;
1480 if (libxc_name_ ==
"XC_GGA_DEBUG") {
1481 return XC_FAMILY_GGA;
1483 return XC_FAMILY_LDA;
1488 xc_func_type* handler()
1491 return handler_.get();
1494 throw std::runtime_error(
"attempt to access nullptr in xc_functional_base::handler");
1499 return family() == XC_FAMILY_LDA;
1504 return family() == XC_FAMILY_GGA;
1510 return handler_->info->kind;
1512 return XC_EXCHANGE_CORRELATION;
1516 bool is_exchange()
const
1518 return kind() == XC_EXCHANGE;
1521 bool is_correlation()
const
1523 return kind() == XC_CORRELATION;
1526 bool is_exchange_correlation()
const
1528 return kind() == XC_EXCHANGE_CORRELATION;
1532 void get_lda(
const int size,
const double* rho,
double* v,
double* e)
const
1534 if (family() != XC_FAMILY_LDA) {
1535 RTE_THROW(
"wrong XC");
1539 for (
int i = 0; i < size; i++) {
1541 std::stringstream s;
1548 xc_lda_exc_vxc(handler_.get(), size, rho, e, v);
1550 for (
int i = 0; i < size; i++) {
1552 e[i] = -0.001 * (rho[i] * rho[i]);
1554 v[i] = -0.002 * rho[i] * rho[i] + e[i];
1560 void get_lda(
const int size,
const double* rho_up,
const double* rho_dn,
double* v_up,
double* v_dn,
double* e)
const
1562 if (family() != XC_FAMILY_LDA) {
1563 RTE_THROW(
"wrong XC");
1566 std::vector<double> rho_ud(size * 2);
1568 for (
int i = 0; i < size; i++) {
1569 if (rho_up[i] < 0 || rho_dn[i] < 0) {
1570 std::stringstream s;
1576 rho_ud[2 * i] = rho_up[i];
1577 rho_ud[2 * i + 1] = rho_dn[i];
1581 std::vector<double> v_ud(size * 2);
1583 xc_lda_exc_vxc(handler_.get(), size, &rho_ud[0], &e[0], &v_ud[0]);
1586 for (
int i = 0; i < size; i++) {
1587 v_up[i] = v_ud[2 * i];
1588 v_dn[i] = v_ud[2 * i + 1];
1591 for (
int i = 0; i < size; i++) {
1592 e[i] = -0.001 * (rho_up[i] * rho_up[i] + rho_dn[i] * rho_dn[i]);
1593 v_up[i] = -0.002 * rho_up[i] * (rho_up[i] + rho_dn[i]) + e[i];
1594 v_dn[i] = -0.002 * rho_dn[i] * (rho_up[i] + rho_dn[i]) + e[i];
1600 void get_gga(
const int size,
const double* rho,
const double* sigma,
double* vrho,
double* vsigma,
double* e)
const
1602 if (family() != XC_FAMILY_GGA)
1603 RTE_THROW(
"wrong XC");
1606 for (
int i = 0; i < size; i++) {
1608 std::stringstream s;
1615 xc_gga_exc_vxc(handler_.get(), size, rho, sigma, e, vrho, vsigma);
1617 for (
int i = 0; i < size; i++) {
1618 e[i] = -0.001 * (rho[i] * sigma[i]);
1619 vrho[i] = -0.001 * sigma[i];
1620 vsigma[i] = -0.001 * rho[i];
1626 void get_gga(
const int size,
const double* rho_up,
const double* rho_dn,
const double* sigma_uu,
1627 const double* sigma_ud,
const double* sigma_dd,
double* vrho_up,
double* vrho_dn,
double* vsigma_uu,
1628 double* vsigma_ud,
double* vsigma_dd,
double* e)
const
1630 if (family() != XC_FAMILY_GGA) {
1631 RTE_THROW(
"wrong XC");
1634 std::vector<double> rho(2 * size);
1635 std::vector<double> sigma(3 * size);
1638 for (
int i = 0; i < size; i++) {
1639 if (rho_up[i] < 0 || rho_dn[i] < 0) {
1640 std::stringstream s;
1646 rho[2 * i] = rho_up[i];
1647 rho[2 * i + 1] = rho_dn[i];
1649 sigma[3 * i] = sigma_uu[i];
1650 sigma[3 * i + 1] = sigma_ud[i];
1651 sigma[3 * i + 2] = sigma_dd[i];
1654 std::vector<double> vrho(2 * size);
1655 std::vector<double> vsigma(3 * size);
1658 xc_gga_exc_vxc(handler_.get(), size, &rho[0], &sigma[0], e, &vrho[0], &vsigma[0]);
1661 for (
int i = 0; i < size; i++) {
1662 vrho_up[i] = vrho[2 * i];
1663 vrho_dn[i] = vrho[2 * i + 1];
1665 vsigma_uu[i] = vsigma[3 * i];
1666 vsigma_ud[i] = vsigma[3 * i + 1];
1667 vsigma_dd[i] = vsigma[3 * i + 2];
1670 auto h1 = std::unique_ptr<xc_func_type>(
new xc_func_type);
1673 if (xc_func_init(h1.get(), XC_LDA_C_PZ, 2) != 0) {
1674 RTE_THROW(
"xc_func_init() failed");
1677 xc_lda_exc_vxc(h1.get(), size, &rho[0], e, &vrho[0]);
1679 for (
int i = 0; i < size; i++) {
1680 vrho_up[i] = vrho[2 * i];
1681 vrho_dn[i] = vrho[2 * i + 1];
1688 for (
int i = 0; i < size; i++) {
1689 e[i] += 0.001 * (sigma_uu[i] + sigma_ud[i] + sigma_dd[i]);
1690 vsigma_uu[i] = -0.001;
1691 vsigma_ud[i] = -0.001;
1692 vsigma_dd[i] = -0.001;
1701#if XC_MAJOR_VERSION >= 4
1702 xc_func_set_dens_threshold(this->handler(), tre);
1704 std::cout <<
"set_dens_threshold not available in old libxc versions, install at least 4.2.3" <<
"\n";
Interface class to Libxc.
void get_gga(const int size, const double *rho_up, const double *rho_dn, const double *sigma_uu, const double *sigma_ud, const double *sigma_dd, double *vrho_up, double *vrho_dn, double *vsigma_uu, double *vsigma_ud, double *vsigma_dd, double *e) const
Get spin-resolved GGA contribution.
void get_lda(const int size, const double *rho, double *v, double *e) const
Get LDA contribution.
void get_lda(const int size, const double *rho_up, const double *rho_dn, double *v_up, double *v_dn, double *e) const
Get LSDA contribution.
void get_gga(const int size, const double *rho, const double *sigma, double *vrho, double *vsigma, double *e) const
Get GGA contribution.
void set_dens_threshold(double tre)
set density threshold of libxc, if density is below tre, all xc output will be set to 0.
Namespace of the SIRIUS library.
std::string double_to_string(double val, int precision=-1)
Convert double to a string with a given precision.
Eror and warning handling during run-time execution.