ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
xc_functional.h
Go to the documentation of this file.
1//==========================================================
2// AUTHOR : mohan
3// DATE : 2009-04-04
4//==========================================================
5#ifndef XC_FUNCTIONAL_H
6#define XC_FUNCTIONAL_H
7
8#ifdef __LIBXC
9#include <xc.h>
10#else
11#include "xc_ids.h"
12#endif // ifdef __LIBXC
14#include "source_base/macros.h"
15#include "source_base/matrix.h"
16#include "source_base/vector3.h"
20
21#include <map> // added by jghan, 2024-10-10
22#include <vector>
35{
36 double xc_temperature = 0.0;
37 std::vector<std::string> exx_fock_alpha = {"default"};
38 std::vector<std::string> exx_erfc_alpha = {"default"};
39 std::vector<double> xc_exch_ext;
40 std::vector<double> xc_corr_ext;
41};
42
44{
45 public:
48
49 //-------------------
50 // subroutines, grouped according to the file they are in:
51 //-------------------
52
53 //-------------------
54 // xc_pot.cpp
55 //-------------------
56
57 // This file contains interface to the xc_functional class
58 // it includes 3 subroutines:
59 // 1. v_xc : which takes rho as input, and [etxc, vtxc, v_xc] as output
60 // 2. v_xc_libxc : which does the same thing as v_xc, but calling libxc
61 // NOTE : it is only used for nspin = 1 and 2, the nspin = 4 case is treated in v_xc
62 // 3. v_xc_meta : which takes rho and tau as input, and v_xc as output
63
64 // compute the exchange-correlation energy
65 // [etxc, vtxc, v] = v_xc(...)
66 static std::tuple<double, double, ModuleBase::matrix> v_xc(
67 const int &nrxx, // number of real-space grid
68 const Charge *const chr,
69 const UnitCell *ucell, // charge density
70 const int nspin,
71 const bool domag,
72 const bool domag_z,
73 const int gga_grad,
74 const double hybrid_alpha,
75 const double hse_omega);
76
77 static std::tuple<double, double, ModuleBase::matrix> v_xc(
78 const int &nrxx, // number of real-space grid
79 const Charge *const chr,
80 const UnitCell *ucell, // charge density
81 const int nspin,
82 const bool domag,
83 const bool domag_z,
84 const int gga_grad,
85 const double hybrid_alpha,
86 const double hse_omega,
87 const bool use_gpu);
88
89 //-------------------
90 // xc_functional.cpp
91 //-------------------
92
93 // This file contains subroutines for setting the functional
94 // it includes 4 subroutines:
95 // 1. get_func_type : which returns the type of functional (func_type):
96 // 0 = none; 1 = lda; 2 = gga; 3 = mgga; 4 = hybrid lda/gga; 5 = hybrid mgga
97 // 2. set_xc_type : sets the value of:
98 // func_id, which is the LIBXC id of functional
99 // func_type, which is as specified in get_func_type
100 // use_libxc, whether to use LIBXC. The rule is to NOT use it for functionals that we already have.
101
102 static int get_func_type() { return func_type; };
103
107 static void set_func_type(const int func_type_in) { func_type = func_type_in; };
108
109 static void set_xc_type(const std::string xc_func_in);
110
111 // Temporary adapter for legacy Potential -> PotXC -> XC evaluation globals.
112 // Restores the complete selection on scope exit, including exception unwinding.
113 // Scopes may nest, but must not overlap across threads: this is process-wide state.
115 {
116 public:
117 explicit ScopedType(const std::string &functional);
118 ~ScopedType();
119 ScopedType(const ScopedType &) = delete;
120 ScopedType &operator=(const ScopedType &) = delete;
121
122 private:
123 void restore() noexcept;
124 std::vector<int> func_id_;
132 std::map<int, double> scaling_factor_xc_;
133 };
134
135 // For hybrid functional
136 static void set_hybrid_alpha(const double alpha_in);
137
138 static double get_hybrid_alpha() { return hybrid_alpha; };
139
140 static void set_hse_omega(const double omega_in);
141
142 static void set_runtime_parameters(const XCFunctionalParameters &parameters);
143
145
146 static double get_hse_omega() { return hse_omega; };
147
148 static bool get_ked_flag() { return ked_flag; };
149
151 static void set_ked_flag(const bool ked_flag_in) { ked_flag = ked_flag_in; };
152
153 static bool get_need_laplacian() { return need_laplacian; };
154
156 static void set_xc_first_loop(const UnitCell &ucell);
157
158 static std::string output_info();
159
160 private:
161 static std::vector<int> func_id; // libxc id of functional
162 static int func_type; // 0:none, 1:lda, 2:gga, 3:mgga, 4:hybrid lda/gga, 5:hybrid mgga
163 static bool ked_flag; // whether the functional has kinetic energy density
164 static bool need_laplacian; // whether any functional needs Laplacian of density
165 static bool use_libxc;
166 // exx_hybrid_alpha for mixing exx in hybrid functional:
167 static double hybrid_alpha;
168
169 // hse_omega for HSE functional:
170 static double hse_omega;
171
173
174 // added by jghan, 2024-07-07
175 // as a scaling factor for different xc-functionals
176 static std::map<int, double> scaling_factor_xc;
177
178 public:
179 static std::vector<int> get_func_id() { return func_id; }
180
184 static double get_weight(const int id)
185 {
186 const std::map<int, double>::iterator it = scaling_factor_xc.find(id);
187 return it != scaling_factor_xc.end() ? it->second : 1.0;
188 }
189
190 //-------------------
191 // xc_lda_wrap.cpp
192 //-------------------
193
194 // This file contains wrapper for the LDA functionals
195 // it includes 3 subroutines:
196 // 1. xc, which is the wrapper of LDA part
197 // (i.e. LDA functional and LDA part of GGA functional)
198 // 2. xc_spin, which is the spin polarized counterpart of xc
199 // 3. xc_spin_libxc, which is the wrapper for LDA functional, spin polarized
200
201 // NOTE : In our own realization of GGA functional, the LDA part
202 // and gradient correction are calculated separately.
203 // The LDA part is provided in xc, while the gradient correction is
204 // provided in gradcorr through gcxc/gcx_spin+gcc_spin.
205 // While in LIBXC, the entire GGA functional is provided.
206 // As a result, xc/xc_spin and xc_spin_libxc are different for GGA,
207 // the former gives nonzero result, while the latter returns 0.
208 // Furthermore, the reason for not having xc_libxc is that something like
209 // xc_libxc which evaluates functional for individual grid points
210 // is not efficient. For nspin = 1 and 2, v_xc_libxc evaluates potential
211 // on the entire grid. I'm having xc_spin_libxc because v_xc_libxc
212 // does not support nspin = 4.
213
214 public:
215 // LDA
216 static void xc(const double &rho, double &exc, double &vxc);
217
218 // LSDA
219 static void xc_spin(
220 const double &rho,
221 const double &zeta,
222 double &exc,
223 double &vxcup,
224 double &vxcdw);
225
226 //-------------------
227 // xc_gga_wrap.cpp
228 //-------------------
229
230 // This file contains wrapper for the GGA functionals
231 // it includes 4 subroutines:
232 // 1. gcxc, which is the wrapper for gradient correction part
233 // 2. gcx_spin, spin polarized, exchange only
234 // 3. gcc_spin, spin polarized, correlation only
235
236 // The difference between our realization (gcxc/gcx_spin/gcc_spin) and
237 // LIBXC, and the reason for not having gcxc_libxc is explained
238 // in the NOTE in the comment for xc_gga_wrap.cpp part
239
240 // GGA
241 static void gcxc(
242 const double &rho,
243 const double &grho,
244 double &sxc,
245 double &v1xc,
246 double &v2xc);
247
248 // spin polarized GGA
249 static void gcx_spin(
250 double rhoup,
251 double rhodw,
252 double grhoup2,
253 double grhodw2,
254 double &sx,
255 double &v1xup,
256 double &v1xdw,
257 double &v2xup,
258 double &v2xdw);
259
260 static void gcc_spin(
261 double rho,
262 double &zeta,
263 double grho,
264 double &sc,
265 double &v1cup,
266 double &v1cdw,
267 double &v2c);
268
269 //-------------------
270 // xc_grad*.cpp
271 //-------------------
272
273 // The gradient correction is a pipeline: XC_Functional::gradcorr is the
274 // public entry point declared below, and its three internal stage
275 // functions (gradcorr_prepare_rho / gradcorr_xc_kernel /
276 // gradcorr_assemble_vxc) are declared in xc_grad_internal.h.
277 // This file group also provides:
278 // 1. grad_wfc, which calculates gradient of wavefunction
279 // it is used in stress_func_mgga.cpp
280 // 2. grad_rho, which calculates gradient of density
281 // 3. grad_dot, which calculates divergence of something
282 // 4. noncolin_rho, which diagonalizes the spin density matrix
283 // and gives the spin up and spin down components of the charge.
284
285 static void gradcorr(
286 double &etxc,
287 double &vtxc,
289 const Charge *const chr,
290 ModulePW::PW_Basis *rhopw,
291 const UnitCell *ucell,
292 std::vector<double> &stress_gga,
293 const bool is_stress,
294 const int nspin,
295 const bool domag,
296 const bool domag_z,
297 const int gga_grad,
298 const double hybrid_alpha,
299 const double hse_omega);
300
301 template <typename T, typename Device, typename Real = typename GetTypeReal<T>::type>
302
303 static void grad_wfc(
304 const int ik,
305 const Real tpiba,
306 const ModulePW::PW_Basis_K *wfc_basis,
307 const T *rhog,
308 T *grad);
309
310 // Overload with precomputed precision-matched gcar/kvec_c device buffers.
311 template <typename T, typename Device, typename Real = typename GetTypeReal<T>::type>
312 static void grad_wfc(
313 const int ik,
314 const Real tpiba,
315 const ModulePW::PW_Basis_K *wfc_basis,
316 const Real *gcar,
317 const Real *kvec_c,
318 const T *rhog,
319 T *grad);
320
321 static void grad_rho(
322 const std::complex<double> *rhog,
324 const ModulePW::PW_Basis *rho_basis,
325 const double tpiba);
326
327 static void grad_dot(
329 double *dh,
330 const ModulePW::PW_Basis *rho_basis,
331 const double tpiba);
332
333 static void laplacian_rho(
334 const std::complex<double> *rhog,
335 double *lapl,
336 const ModulePW::PW_Basis *rho_basis,
337 const double tpiba);
338
339 static void noncolin_rho(
340 double *rhoout1,
341 double *rhoout2,
342 double *seg,
343 const double *const *const rho,
344 const int nrxx,
345 const double *ux_,
346 const bool lsign_);
347
348 //-------------------
349 // xc_lda_exch.cpp
350 //-------------------
351
352 // This file contains realization of LDA exchange functionals
353 // Spin unpolarized ones:
354 // 1. slater: ordinary Slater exchange with alpha=2/3
355 // 2. slater1: Slater exchange with alpha=1
356 // 3. slater_rxc : Slater exchange with alpha=2/3 and Relativistic exchange
357 // And their spin polarized counterparts:
358 // 1. slater_spin
359 // 2. slater1_spin
360 // 3. slater_rxc_spin
361
362 // For LDA exchange energy
363 static void slater(const double &rs, double &ex, double &vx);
364 static void slater1(const double &rs, double &ex, double &vx);
365 static void slater_rxc(const double &rs, double &ex, double &vx);
366
367 // For LSDA exchange energy
368 static void slater_spin(
369 const double &rho,
370 const double &zeta,
371 double &ex,
372 double &vxup,
373 double &vxdw);
374 static void slater1_spin(
375 const double &rho,
376 const double &zeta,
377 double &ex,
378 double &vxup,
379 double &vxdw);
380 static void slater_rxc_spin(
381 const double &rho,
382 const double &z,
383 double &ex,
384 double &vxup,
385 double &vxdw);
386
387 //-------------------
388 // xc_lda_corr.cpp
389 //-------------------
390
391 // This file contains realization of LDA correlation functionals
392 // Spin unpolarized ones:
393 // 1. pw : Perdew-Wang LDA correlation
394 // 2. pz : Perdew-Zunger LDA correlation
395 // 3. lyp : Lee-Yang-Parr correlation
396 // 4. vwn : Vosko-Wilk-Nusair LDA correlation
397 // 5. wigner : Wigner
398 // 6. hl : Hedin-Lunqvist
399 // 7. gl : Gunnarson-Lunqvist
400 // And some of their spin polarized counterparts:
401 // 1. pw_spin
402 // 2. pz_spin, which calls pz_polarized
403
404 // For LDA correlation energy
405 static void pw(
406 const double &rs,
407 const int &iflag,
408 double &ec,
409 double &vc);
410 static void pz(
411 const double &rs,
412 const int &iflag,
413 double &ec,
414 double &vc);
415 static void lyp(const double &rs, double &ec, double &vc);
416 static void vwn(const double &rs, double &ec, double &vc);
417 static void wigner(const double &rs, double &ec, double &vc);
418 static void hl(const double &rs, double &ec, double &vc);
419 static void gl(const double &rs, double &ec, double &vc);
420
421 // For LSDA correlation energy
422 static void pw_spin(
423 const double &rs,
424 const double &zeta,
425 double &ec,
426 double &vcup,
427 double &vcdw);
428
429 static void pz_spin(
430 const double &rs,
431 const double &zeta,
432 double &ec,
433 double &vcup,
434 double &vcdw);
435
436 static void pz_polarized(const double &rs, double &ec, double &vc);
437
438 //-------------------
439 // xc_gga_exch.cpp
440 //-------------------
441
442 // This file contains realizations of gradient correction to exchange part
443 // Spin unpolarized ones:
444 // 1. becke88 : Becke88 exchange
445 // 2. ggax : PW91 exchange
446 // 3. pbex : PBE exchange (and revPBE)
447 // 4. optx : OPTX, Handy et al.
448 // 5. wcx : Wu-Cohen exchange
449 // And some of their spin polarized counterparts:
450 // 1. becke88_spin
451
452 static void becke88(
453 const double &rho,
454 const double &grho,
455 double &sx,
456 double &v1x,
457 double &v2x);
458
459 static void ggax(
460 const double &rho,
461 const double &grho,
462 double &sx,
463 double &v1x,
464 double &v2x);
465
466 static void pbex(
467 const double &rho,
468 const double &grho,
469 const int &iflag,
470 double &sx,
471 double &v1x,
472 double &v2x);
473
474 static void optx(
475 const double rho,
476 const double grho,
477 double &sx,
478 double &v1x,
479 double &v2x);
480
481 static void wcx(
482 const double &rho,
483 const double &grho,
484 double &sx,
485 double &v1x,
486 double &v2x);
487
488 static void becke88_spin(
489 double rho,
490 double grho,
491 double &sx,
492 double &v1x,
493 double &v2x);
494
495 //-------------------
496 // xc_gga_corr.cpp
497 //-------------------
498
499 // This file contains realizations of gradient correction to correlation part
500 // Spin unpolarized ones:
501 // 1. perdew86 : P86
502 // 2. ggac : PW91
503 // 3. pbec
504 // 4. glyp
505 // And some of their spin polarized counterparts:
506 // 1. perdew86_spin
507 // 2. ggac_spin
508 // 3. pbec_spin
509
510 static void perdew86(
511 const double rho,
512 const double grho,
513 double &sc,
514 double &v1c,
515 double &v2c);
516
517 static void ggac(
518 const double &rho,
519 const double &grho,
520 double &sc,
521 double &v1c,
522 double &v2c);
523
524 static void pbec(
525 const double &rho,
526 const double &grho,
527 const int &flag,
528 double &sc,
529 double &v1c,
530 double &v2c);
531
532 static void glyp(
533 const double &rho,
534 const double &grho,
535 double &sc,
536 double &v1c,
537 double &v2c);
538
539 static void perdew86_spin(
540 double rho,
541 double zeta,
542 double grho,
543 double &sc,
544 double &v1cup,
545 double &v1cdw,
546 double &v2c);
547
548 // static void ggac_spin(double rho, double zeta, double grho, double &sc,
549 // double &v1cup, double &v1cdw, double &v2c);
550
551 static void pbec_spin(
552 double rho,
553 double zeta,
554 double grho,
555 const int &flag,
556 double &sc,
557 double &v1cup,
558 double &v1cdw,
559 double &v2c);
560
561 //-------------------
562 // xc_funct_hcth.cpp
563 //-------------------
564 // This file contains realizations of the HCTH GGA functional
565 // hcth calls pwcorr
566
567 static void hcth(
568 const double rho,
569 const double grho,
570 double &sx,
571 double &v1x,
572 double &v2x);
573
574 static void pwcorr(
575 const double r,
576 const double c[],
577 double &g,
578 double &dg);
579};
580
581#endif // XC_FUNCTION_H
Definition charge.h:24
3 elements vector
Definition vector3.h:21
Definition matrix.h:15
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Provide the basic information about unitcell.
Definition unitcell.h:16
ScopedType(const ScopedType &)=delete
~ScopedType()
Definition xc_functional.cpp:42
ScopedType & operator=(const ScopedType &)=delete
ScopedType(const std::string &functional)
Definition xc_functional.cpp:25
int func_type_
Definition xc_functional.h:125
double hse_omega_
Definition xc_functional.h:130
std::map< int, double > scaling_factor_xc_
Definition xc_functional.h:132
bool use_libxc_
Definition xc_functional.h:128
bool ked_flag_
Definition xc_functional.h:126
XCFunctionalParameters runtime_parameters_
Definition xc_functional.h:131
bool need_laplacian_
Definition xc_functional.h:127
double hybrid_alpha_
Definition xc_functional.h:129
std::vector< int > func_id_
Definition xc_functional.h:124
void restore() noexcept
Definition xc_functional.cpp:44
static void set_xc_first_loop(const UnitCell &ucell)
Usually in exx caculation, the first SCF loop should be converged with PBE.
Definition xc_functional.cpp:70
static void gcx_spin(double rhoup, double rhodw, double grhoup2, double grhodw2, double &sx, double &v1xup, double &v1xdw, double &v2xup, double &v2xdw)
Definition xc_gga_wrap.cpp:185
static void set_hybrid_alpha(const double alpha_in)
Definition xc_functional.cpp:61
static bool ked_flag
Definition xc_functional.h:163
static void set_hse_omega(const double omega_in)
Definition xc_functional.cpp:63
static void wcx(const double &rho, const double &grho, double &sx, double &v1x, double &v2x)
Definition xc_gga_exch.cpp:199
static void grad_dot(const ModuleBase::Vector3< double > *h, double *dh, const ModulePW::PW_Basis *rho_basis, const double tpiba)
Definition xc_grad_utils.cpp:48
static bool need_laplacian
Definition xc_functional.h:164
static void gcc_spin(double rho, double &zeta, double grho, double &sc, double &v1cup, double &v1cdw, double &v2c)
Definition xc_gga_wrap.cpp:339
static void pbex(const double &rho, const double &grho, const int &iflag, double &sx, double &v1x, double &v2x)
Definition xc_gga_exch.cpp:82
static void lyp(const double &rs, double &ec, double &vc)
Definition xc_lda_corr.cpp:114
static void grad_rho(const std::complex< double > *rhog, ModuleBase::Vector3< double > *gdr, const ModulePW::PW_Basis *rho_basis, const double tpiba)
Definition xc_grad_utils.cpp:12
static void set_runtime_parameters(const XCFunctionalParameters &parameters)
Definition xc_functional.cpp:65
static void becke88_spin(double rho, double grho, double &sx, double &v1x, double &v2x)
Definition xc_gga_exch.cpp:253
static void becke88(const double &rho, const double &grho, double &sx, double &v1x, double &v2x)
Definition xc_gga_exch.cpp:13
static void ggac(const double &rho, const double &grho, double &sc, double &v1c, double &v2c)
Definition xc_gga_corr.cpp:55
static int get_func_type()
Definition xc_functional.h:102
static const XCFunctionalParameters & get_runtime_parameters()
Definition xc_functional.h:144
static void pz(const double &rs, const int &iflag, double &ec, double &vc)
Definition xc_lda_corr.cpp:77
static double hybrid_alpha
Definition xc_functional.h:167
static void pbec(const double &rho, const double &grho, const int &flag, double &sc, double &v1c, double &v2c)
Definition xc_gga_corr.cpp:124
static void optx(const double rho, const double grho, double &sx, double &v1x, double &v2x)
Definition xc_gga_exch.cpp:143
static void slater_spin(const double &rho, const double &zeta, double &ex, double &vxup, double &vxdw)
Definition xc_lda_exch.cpp:59
static void noncolin_rho(double *rhoout1, double *rhoout2, double *seg, const double *const *const rho, const int nrxx, const double *ux_, const bool lsign_)
Definition xc_grad_utils.cpp:129
static void laplacian_rho(const std::complex< double > *rhog, double *lapl, const ModulePW::PW_Basis *rho_basis, const double tpiba)
Definition xc_grad_utils.cpp:105
static std::string output_info()
Definition xc_functional.cpp:410
static double get_hse_omega()
Definition xc_functional.h:146
static void pw_spin(const double &rs, const double &zeta, double &ec, double &vcup, double &vcdw)
Definition xc_lda_corr.cpp:209
static void grad_wfc(const int ik, const Real tpiba, const ModulePW::PW_Basis_K *wfc_basis, const T *rhog, T *grad)
Definition xc_grad_wfc.cpp:12
static void set_ked_flag(const bool ked_flag_in)
Set whether the functional needs the kinetic energy density.
Definition xc_functional.h:151
static std::map< int, double > scaling_factor_xc
Definition xc_functional.h:23
static void wigner(const double &rs, double &ec, double &vc)
Definition xc_lda_corr.cpp:171
static void gradcorr(double &etxc, double &vtxc, ModuleBase::matrix &v, const Charge *const chr, ModulePW::PW_Basis *rhopw, const UnitCell *ucell, std::vector< double > &stress_gga, const bool is_stress, const int nspin, const bool domag, const bool domag_z, const int gga_grad, const double hybrid_alpha, const double hse_omega)
Definition xc_grad.cpp:26
~XC_Functional()
Definition xc_functional.cpp:13
static void hl(const double &rs, double &ec, double &vc)
Definition xc_lda_corr.cpp:184
static void xc_spin(const double &rho, const double &zeta, double &exc, double &vxcup, double &vxcdw)
Definition xc_lda_wrap.cpp:105
static void pbec_spin(double rho, double zeta, double grho, const int &flag, double &sc, double &v1cup, double &v1cdw, double &v2c)
Definition xc_gga_corr.cpp:352
static void hcth(const double rho, const double grho, double &sx, double &v1x, double &v2x)
Definition xc_hcth.cpp:5
static void set_xc_type(const std::string xc_func_in)
Definition test_chg_parallel.cpp:13
static bool use_libxc
Definition xc_functional.h:165
static void perdew86(const double rho, const double grho, double &sc, double &v1c, double &v2c)
Definition xc_gga_corr.cpp:15
static bool get_ked_flag()
Definition xc_functional.h:148
static void slater1(const double &rs, double &ex, double &vx)
Definition xc_lda_exch.cpp:26
static void slater_rxc(const double &rs, double &ex, double &vx)
Definition xc_lda_exch.cpp:36
static void pz_polarized(const double &rs, double &ec, double &vc)
Definition xc_lda_corr.cpp:370
static void ggax(const double &rho, const double &grho, double &sx, double &v1x, double &v2x)
Definition xc_gga_exch.cpp:43
static std::vector< int > func_id
Definition xc_functional.h:161
static void slater_rxc_spin(const double &rho, const double &z, double &ex, double &vxup, double &vxdw)
Definition xc_lda_exch.cpp:109
static void xc(const double &rho, double &exc, double &vxc)
Definition xc_lda_wrap.cpp:15
static int func_type
Definition xc_functional.h:162
static double hse_omega
Definition xc_functional.h:170
static double get_hybrid_alpha()
Definition xc_functional.h:138
static bool get_need_laplacian()
Definition xc_functional.h:153
static void gl(const double &rs, double &ec, double &vc)
Definition xc_lda_corr.cpp:197
static std::tuple< double, double, ModuleBase::matrix > v_xc(const int &nrxx, const Charge *const chr, const UnitCell *ucell, const int nspin, const bool domag, const bool domag_z, const int gga_grad, const double hybrid_alpha, const double hse_omega)
Definition xc_pot.cpp:21
static void vwn(const double &rs, double &ec, double &vc)
Definition xc_lda_corr.cpp:134
static void pz_spin(const double &rs, const double &zeta, double &ec, double &vcup, double &vcdw)
Definition xc_lda_corr.cpp:334
static void slater(const double &rs, double &ex, double &vx)
Definition xc_lda_exch.cpp:14
static void slater1_spin(const double &rho, const double &zeta, double &ex, double &vxup, double &vxdw)
Definition xc_lda_exch.cpp:84
static double get_weight(const int id)
Definition xc_functional.h:184
static void gcxc(const double &rho, const double &grho, double &sxc, double &v1xc, double &v2xc)
Definition xc_gga_wrap.cpp:17
XC_Functional()
Definition xc_functional.cpp:11
static void glyp(const double &rho, const double &grho, double &sc, double &v1c, double &v2c)
Definition xc_gga_corr.cpp:172
static void set_func_type(const int func_type_in)
Set the functional class directly. set_xc_type() derives this from a functional name and is what prod...
Definition xc_functional.h:107
static void perdew86_spin(double rho, double zeta, double grho, double &sc, double &v1cup, double &v1cdw, double &v2c)
Definition xc_gga_corr.cpp:202
static XCFunctionalParameters runtime_parameters
Definition xc_functional.h:172
static std::vector< int > get_func_id()
Definition xc_functional.h:179
static void pwcorr(const double r, const double c[], double &g, double &dg)
Definition xc_hcth.cpp:167
#define T
Definition exp.cpp:237
Definition deltaspin_pw.cpp:7
LibXC runtime settings, injected once at the ESolver boundary.
Definition xc_functional.h:35
std::vector< double > xc_exch_ext
Definition xc_functional.h:39
std::vector< double > xc_corr_ext
Definition xc_functional.h:40
std::vector< std::string > exx_fock_alpha
Definition xc_functional.h:37
std::vector< std::string > exx_erfc_alpha
Definition xc_functional.h:38
double xc_temperature
Definition xc_functional.h:36