36#include "../base/base_uses.f90"
41 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
42 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'xc_xbecke88_long_range'
43 REAL(kind=
dp),
PARAMETER :: beta = 0.0042_dp
60 CHARACTER(LEN=*),
INTENT(OUT),
OPTIONAL :: reference, shortform
62 INTEGER,
INTENT(out),
OPTIONAL :: max_deriv
64 IF (
PRESENT(reference))
THEN
65 reference =
"A. Becke, Phys. Rev. A 38, 3098 (1988) {LDA version}"
67 IF (
PRESENT(shortform))
THEN
68 shortform =
"Becke 1988 Exchange Functional (LDA)"
70 IF (
PRESENT(needs))
THEN
72 needs%norm_drho = .true.
74 IF (
PRESENT(max_deriv)) max_deriv = 3
90 CHARACTER(LEN=*),
INTENT(OUT),
OPTIONAL :: reference, shortform
92 INTEGER,
INTENT(out),
OPTIONAL :: max_deriv
94 IF (
PRESENT(reference))
THEN
95 reference =
"A. Becke, Phys. Rev. A 38, 3098 (1988) {LSD version}"
97 IF (
PRESENT(shortform))
THEN
98 shortform =
"Becke 1988 Exchange Functional (LSD)"
100 IF (
PRESENT(needs))
THEN
101 needs%rho_spin = .true.
102 needs%rho_spin_1_3 = .true.
103 needs%norm_drho_spin = .true.
105 IF (
PRESENT(max_deriv)) max_deriv = 3
123 INTEGER,
INTENT(in) :: grad_deriv
126 CHARACTER(len=*),
PARAMETER :: routinen =
'xb88_lr_lda_eval'
128 INTEGER :: handle, npoints
129 INTEGER,
DIMENSION(2, 3) :: bo
130 REAL(kind=
dp) :: epsilon_rho, omega, sx
131 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :),
POINTER :: dummy, e_0, e_ndrho, &
132 e_ndrho_ndrho, e_ndrho_ndrho_ndrho, e_ndrho_ndrho_rho, e_ndrho_rho, e_ndrho_rho_rho, &
133 e_rho, e_rho_rho, e_rho_rho_rho, norm_drho, rho
136 CALL timeset(routinen, handle)
144 norm_drho=norm_drho, local_bounds=bo, rho_cutoff=epsilon_rho)
145 npoints = (bo(2, 1) - bo(1, 1) + 1)*(bo(2, 2) - bo(1, 2) + 1)*(bo(2, 3) - bo(1, 3) + 1)
156 e_ndrho_ndrho => dummy
157 e_rho_rho_rho => dummy
158 e_ndrho_rho_rho => dummy
159 e_ndrho_ndrho_rho => dummy
160 e_ndrho_ndrho_ndrho => dummy
163 allocate_deriv=.true.)
165 IF (grad_deriv >= 1)
THEN
167 allocate_deriv=.true.)
170 allocate_deriv=.true.)
173 IF (grad_deriv >= 2)
THEN
175 allocate_deriv=.true.)
178 allocate_deriv=.true.)
184 IF (grad_deriv >= 3)
THEN
186 allocate_deriv=.true.)
198 IF (grad_deriv > 3)
THEN
199 cpabort(
"derivatives bigger than 3 not implemented")
209 CALL xb88_lr_lda_calc(rho=rho, norm_drho=norm_drho, &
210 e_0=e_0, e_rho=e_rho, e_ndrho=e_ndrho, e_rho_rho=e_rho_rho, &
211 e_ndrho_rho=e_ndrho_rho, e_ndrho_ndrho=e_ndrho_ndrho, &
212 e_rho_rho_rho=e_rho_rho_rho, e_ndrho_rho_rho=e_ndrho_rho_rho, &
213 e_ndrho_ndrho_rho=e_ndrho_ndrho_rho, &
214 e_ndrho_ndrho_ndrho=e_ndrho_ndrho_ndrho, grad_deriv=grad_deriv, &
215 npoints=npoints, epsilon_rho=epsilon_rho, &
220 CALL timestop(handle)
250 SUBROUTINE xb88_lr_lda_calc(rho, norm_drho, &
251 e_0, e_rho, e_ndrho, e_rho_rho, e_ndrho_rho, &
252 e_ndrho_ndrho, e_rho_rho_rho, e_ndrho_rho_rho, e_ndrho_ndrho_rho, &
253 e_ndrho_ndrho_ndrho, grad_deriv, npoints, epsilon_rho, sx, &
255 INTEGER,
INTENT(in) :: npoints, grad_deriv
256 REAL(kind=
dp),
DIMENSION(1:npoints),
INTENT(inout) :: e_ndrho_ndrho_ndrho, &
257 e_ndrho_ndrho_rho, e_ndrho_rho_rho, e_rho_rho_rho, e_ndrho_ndrho, e_ndrho_rho, e_rho_rho, &
259 REAL(kind=
dp),
DIMENSION(1:npoints),
INTENT(in) :: norm_drho, rho
260 REAL(kind=
dp),
INTENT(in) :: epsilon_rho, sx, omega
263 REAL(kind=
dp) :: cx, epsilon_rho43, my_epsilon_rho, my_ndrho, my_rho, t1, t10, t100, t1002, &
264 t1009, t101, t1013, t103, t104, t1044, t105, t1069, t109, t1091, t11, t1102, t112, t113, &
265 t1136, t1141, t1146, t1153, t1156, t116, t1163, t1167, t117, t1177, t118, t12, t122, &
266 t1220, t126, t127, t128, t1284, t130, t132, t133, t1334, t1341, t1345, t135, t136, t137, &
267 t1370, t1396, t140, t1400, t1404, t1405, t141, t1412, t143, t1449, t1456, t146, t1467, &
268 t147, t1472, t148, t151, t155, t1553, t16, t168, t169, t17, t172, t173, t176, t177, t18, &
269 t185, t186, t190, t196, t2, t200, t207, t21, t211, t212, t213
270 REAL(kind=
dp) :: t216, t219, t22, t221, t222, t225, t226, t23, t230, t231, t232, t233, t237, &
271 t24, t241, t244, t245, t250, t251, t254, t255, t258, t259, t26, t264, t265, t27, t270, &
272 t271, t28, t281, t284, t285, t289, t29, t293, t297, t3, t30, t304, t31, t311, t312, t313, &
273 t316, t319, t321, t323, t325, t326, t328, t330, t335, t339, t34, t343, t346, t347, t351, &
274 t354, t358, t36, t365, t368, t37, t372, t377, t38, t382, t383, t384, t39, t393, t397, &
275 t40, t400, t401, t404, t405, t408, t41, t412, t413, t417, t418, t42, t428, t429, t43, &
276 t435, t44, t451, t452, t455, t457, t46, t460, t462, t463, t464
277 REAL(kind=
dp) :: t465, t466, t467, t47, t470, t473, t478, t479, t48, t482, t486, t489, t49, &
278 t492, t496, t5, t501, t502, t505, t508, t51, t513, t514, t519, t52, t521, t525, t526, &
279 t529, t530, t533, t534, t536, t537, t539, t55, t562, t566, t570, t571, t572, t573, t574, &
280 t575, t576, t580, t586, t59, t590, t6, t60, t601, t605, t606, t613, t624, t628, t632, &
281 t639, t64, t640, t641, t657, t667, t669, t677, t68, t687, t69, t7, t71, t716, t72, t722, &
282 t735, t739, t746, t75, t76, t769, t77, t79, t791, t793, t8, t838, t84, t842, t846, t85, &
283 t857, t86, t860, t867, t87, t880, t90, t91, t933, t94, t95, t961
284 REAL(kind=
dp) :: t98, t99, xx
286 my_epsilon_rho = epsilon_rho
287 epsilon_rho43 = my_epsilon_rho**(4.0_dp/3.0_dp)
288 cx = 1.5_dp*(3.0_dp/4.0_dp/
pi)**(1.0_dp/3.0_dp)
293 my_rho = rho(ii)*0.5_dp
294 my_ndrho = norm_drho(ii)*0.5_dp
295 IF (my_rho > my_epsilon_rho)
THEN
296 t1 = my_rho**(0.1e1_dp/0.3e1_dp)
299 xx = my_ndrho*max(t3, epsilon_rho43)
306 t12 = log(xx + sqrt(xx**0.2e1_dp + 0.1e1_dp))
307 t16 = 0.10e1_dp + 0.60e1_dp*t11*t3*t12
310 t21 = 0.20e1_dp*cx + 0.20e1_dp*t6*t18
320 t34 = erf(0.3000000000e1_dp*t30*t31)
330 t46 = exp(-0.8999999998e1_dp*t44)
334 t51 = t46 - 0.10e1_dp
336 t55 = t46 - 0.15e1_dp - 0.5555555558e-1_dp*t47*t52
337 t59 = t26*t34 + 0.3333333334e0_dp*t36*t38*t55
341 e_0(ii) = e_0(ii) - 0.2222222224e0_dp*t24*omega*t60*sx*2.0_dp
343 IF (grad_deriv >= 1)
THEN
345 t68 = my_rho*t22*omega
347 t71 = 0.1e1_dp/t8/t69
357 t90 = -0.8000000000e1_dp*t11*t79*t12 - 0.8000000000e1_dp*t6*t87
359 t94 = -0.5333333333e1_dp*t6*t72 - 0.20e1_dp*t6*t91
362 t99 = sqrt(0.3141592654e1_dp)
365 t103 = exp(-0.9000000000e1_dp*t44)
369 t112 = -0.1500000000e1_dp*t105*t31*t94 + 0.1000000000e1_dp*t30* &
382 t135 = 0.8999999998e1_dp*t130 - 0.5999999999e1_dp*t133
391 t151 = t136 - 0.5555555558e-1_dp*t137*t52 + 0.3703703705e-1_dp*t47 &
392 *t143 - 0.5555555558e-1_dp*t146*t148
393 t155 = real(2*t101*t113, kind=
dp) + 0.1666666667e0_dp*t117*t118*t94 - &
394 0.1111111111e0_dp*t36*t122*t55 + 0.3333333334e0_dp*t36*t38* &
397 e_rho(ii) = e_rho(ii) + (-0.2222222224e0_dp*t64*t60 - 0.3333333336e0_dp*t68*t95 - &
398 0.2222222224e0_dp*t24*t98*t155)*sx
400 t168 = 0.60e1_dp*beta*t3*t12 + 0.60e1_dp*t11*t10*t86
402 t172 = 0.40e1_dp*t11*t18 - 0.20e1_dp*t6*t169
409 t196 = 0.8999999998e1_dp*t185*t186*t46 - 0.5555555558e-1_dp*t190 &
410 *t52 - 0.5000000001e0_dp*t41*t172*t46
411 t200 = -0.3000000000e1_dp*t177*t105*t1*t172 + 0.1666666667e0_dp* &
412 t117*t118*t172 + 0.3333333334e0_dp*t36*t38*t196
414 e_ndrho(ii) = e_ndrho(ii) + (-0.3333333336e0_dp*t68*t173 - 0.2222222224e0_dp*t24*t98 &
418 IF (grad_deriv >= 2)
THEN
420 t211 = my_rho*t29*omega
425 t221 = 0.1e1_dp/t8/t219
429 t230 = 0.1e1_dp/t75/t16
433 t237 = 0.1e1_dp/t1/t69
437 t250 = 0.1e1_dp/t85/t84
438 t251 = 0.1e1_dp/t1/t219/t69*t250
439 t254 = 0.1866666667e2_dp*t11*t237*t12 + 0.4000000000e2_dp*t6*t241 &
440 - 0.1066666667e2_dp*t245*t251
442 t258 = 0.1955555555e2_dp*t6*t222 + 0.1066666667e2_dp*t6*t226 + 0.40e1_dp &
443 *t6*t233 - 0.20e1_dp*t6*t255
445 t264 = 0.9000000000e1_dp*t130 - 0.6000000000e1_dp*t133
447 t270 = 0.1e1_dp/t22/t126
450 t284 = 0.2250000000e1_dp*t271*t31*t212 - 0.1000000000e1_dp*t105* &
451 t109*t94 - 0.1500000000e1_dp*t105*t31*t258 - 0.6666666667e0_dp &
454 t289 = omega*t104*t27
461 t316 = 0.1800000000e2_dp*t313*t43*t212
462 t319 = 0.1200000000e2_dp*t128*t132*t94
465 t325 = 0.2000000000e1_dp*t42*t323
466 t326 = -t316 + t319 + 0.8999999998e1_dp*t321 + t325
475 t354 = t326*t46 + t328*t46 - 0.5555555558e-1_dp*t330*t52 + 0.7407407410e-1_dp &
476 *t137*t143 - 0.1111111112e0_dp*t335*t148 - 0.6172839508e-1_dp &
477 *t47*t339 + 0.7407407410e-1_dp*t146*t343 - 0.5555555558e-1_dp &
478 *t146*t347 - 0.5555555558e-1_dp*t146*t351
479 t358 = real(2*t101*t265*t112, kind=
dp) + real(2*t101*t285, kind=
dp) - 0.8333333335e-1_dp &
480 *t289*t118*t212 - 0.1111111111e0_dp*t117*t293*t94 &
481 + 0.3333333334e0_dp*t117*t297*t94 + 0.1666666667e0_dp*t117* &
482 t118*t258 + 0.1481481481e0_dp*t36*t304*t55 - 0.2222222222e0_dp* &
483 t36*t122*t151 + 0.3333333334e0_dp*t36*t38*t354
485 e_rho_rho(ii) = e_rho_rho(ii) + (-0.6666666672e0_dp*t36*t95 - 0.4444444448e0_dp*t64*t207 - &
486 0.1666666668e0_dp*t211*t213 - 0.6666666672e0_dp*t68*t216 - 0.3333333336e0_dp &
487 *t68*t259 - 0.2222222224e0_dp*t24*t98*t358)*sx
496 t393 = beta*t5*my_ndrho
497 t397 = 0.1e1_dp/t1/t219/t7*t250
498 t400 = -0.8000000000e1_dp*beta*t79*t12 - 0.2400000000e2_dp*t11* &
499 t87 + 0.8000000000e1_dp*t393*t397
501 t404 = -0.1066666667e2_dp*t11*t72 + 0.5333333333e1_dp*t6*t377 - 0.40e1_dp &
502 *t11*t91 + 0.40e1_dp*t382*t384 - 0.20e1_dp*t6*t401
509 t428 = 0.2250000000e1_dp*t417*t418*t172 - 0.1500000000e1_dp*t105 &
510 *t31*t404 - 0.5000000000e0_dp*t105*t109*t172
515 t455 = 0.1800000000e2_dp*t451*t452*t172
517 t460 = t128*t132*t172
518 t462 = -t455 + 0.8999999998e1_dp*t457 + 0.5999999999e1_dp*t460
526 t478 = 0.1e1_dp/my_rho
531 t492 = t463 + 0.8999999998e1_dp*t465*t467 - 0.5555555558e-1_dp*t470 &
532 *t52 - 0.5000000001e0_dp*t473*t466 + 0.3703703705e-1_dp*t190*t143 &
533 + 0.3333333334e0_dp*t479*t466 - 0.5555555558e-1_dp*t482*t148 &
534 - 0.5555555558e-1_dp*t146*t486 - 0.5000000001e0_dp*t489*t466
535 t496 = 0.1800000000e2_dp*t413*t186*t113 + real(2*t101*t429, kind=
dp) &
536 - 0.8333333335e-1_dp*t289*t118*t368 + 0.1666666667e0_dp*t117*t435 &
537 *t94 + 0.1666666667e0_dp*t117*t118*t404 - 0.5555555555e-1_dp &
538 *t117*t293*t172 - 0.1111111111e0_dp*t36*t122*t196 + 0.1666666667e0_dp &
539 *t117*t297*t172 + 0.3333333334e0_dp*t36*t38*t492
541 e_ndrho_rho(ii) = e_ndrho_rho(ii) + (-0.3333333336e0_dp*t36*t173 - 0.2222222224e0_dp*t64*t365 - &
542 0.1666666668e0_dp*t211*t60*t368 - 0.3333333336e0_dp*t68*t372 &
543 - 0.3333333336e0_dp*t68*t405 - 0.3333333336e0_dp*t68*t408 - 0.2222222224e0_dp &
553 t521 = 0.1e1_dp/t1/t519
554 t525 = 0.120e2_dp*t508*t86 - 0.60e1_dp*t6*t521*t250
556 t529 = 0.40e1_dp*t508*t17 - 0.80e1_dp*t11*t169 + 0.40e1_dp*t6*t514 &
561 t536 = 0.1e1_dp/t39/omega
563 t539 = 0.1e1_dp/t22/t311
574 t586 = -0.2250000000e2_dp*t451*t562*t46 + 0.8999999998e1_dp*t185 &
575 *t566*t46 + 0.8099999996e2_dp*t575*t576*t46 - 0.5555555558e-1_dp &
576 *t580*t52 - 0.5000000001e0_dp*t41*t529*t46
577 t590 = -0.2700000000e2_dp*t537*t539*my_rho*t501*t103 + 0.4500000000e1_dp &
578 *t177*t271*t1*t501 - 0.3000000000e1_dp*t177*t105* &
579 t1*t529 - 0.8333333335e-1_dp*t289*t118*t501 + 0.3333333334e0_dp &
580 *t117*t435*t172 + 0.1666666667e0_dp*t117*t118*t529 + 0.3333333334e0_dp &
583 e_ndrho_ndrho(ii) = e_ndrho_ndrho(ii) + (-0.1666666668e0_dp*t211*t502 - 0.6666666672e0_dp*t68*t505 &
584 - 0.3333333336e0_dp*t68*t530 - 0.2222222224e0_dp*t24*t98*t590) &
588 IF (grad_deriv >= 3)
THEN
590 t605 = my_rho*t104*omega
593 t624 = 0.1e1_dp/t8/t519
601 t669 = 0.1e1_dp/t85/t667
602 t677 = -0.9125925923e2_dp*t6*t624*t17 - 0.5866666667e2_dp*t6*t628 &
603 *t90 - 0.3200000001e2_dp*t6*t632*t232 + 0.1600000000e2_dp*t6 &
604 *t225*t254 - 0.120e2_dp*t6*t641*t232*t90 + 0.120e2_dp*t382 &
605 *t383*t254 - 0.20e1_dp*t6*t77*(-0.6222222223e2_dp*t11/t1/ &
606 t219*t12 - 0.2115555556e3_dp*t6*t624*t86 + 0.1315555556e3_dp* &
607 t245/t1/t657*t250 - 0.4266666668e2_dp*beta*t244*t5/t657 &
611 t722 = omega*t270*t27
616 t791 = 0.5400000000e2_dp*t769*t43*t606 - 0.3600000000e2_dp*t313* &
617 t132*t212 - 0.5400000000e2_dp*t451*t452*t258 - 0.6000000000e1_dp &
618 *t128*t323*t94 + 0.1800000000e2_dp*t128*t132*t258 + 0.8999999998e1_dp &
619 *t128*t43*t677 - 0.2666666667e1_dp*t42*
pi*t79
621 t838 = real(3*t326*t135*t46, kind=
dp) + real(t791*t46, kind=
dp) + real(t793* &
622 t46, kind=
dp) - 0.5555555558e-1_dp*t39*t677*t52 + 0.1111111112e0_dp*t330 &
623 *t143 - 0.1666666668e0_dp*t330*t48*t148 - 0.1851851853e0_dp*t137 &
624 *t339 + 0.2222222223e0_dp*t335*t343 - 0.1666666668e0_dp*t335* &
625 t347 - 0.1666666668e0_dp*t335*t351 + 0.1646090535e0_dp*t47*t48 &
626 *t71*t51 - 0.1851851853e0_dp*real(t146, kind=
dp)*real(t10, kind=
dp)*real(t135, kind=
dp) &
627 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t326, kind=
dp) &
628 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t328, kind=
dp) &
629 *real(t46, kind=
dp) - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t791, kind=
dp) &
630 *real(t46, kind=
dp) - 0.1666666668e0_dp*real(t146, kind=
dp)*real(t346, kind=
dp)*real(t136, kind=
dp) &
631 - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t793, kind=
dp)* &
633 t842 = 0.2e1_dp*t101*(-t316 + t319 + 0.9000000000e1_dp*t321 + t325) &
634 *t103*t112 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp*t687*t31 &
635 *t606 + 0.2250000000e1_dp*t271*t109*t212 + 0.6750000000e1_dp* &
636 t417*t418*t258 + 0.1000000000e1_dp*t105*t281*t94 - 0.1500000000e1_dp &
637 *t105*t109*t258 - 0.1500000000e1_dp*t105*t31*t677 &
638 + 0.1111111111e1_dp*t30*t26*t10) + 0.4e1_dp*t101*t265*t284 + &
639 0.2e1_dp*t101*t716*t103*t112 + 0.1250000000e0_dp*t722*t118 &
640 *t606 + 0.8333333333e-1_dp*t289*t293*t212 - 0.2500000000e0_dp*t289 &
641 *t297*t212 - 0.2500000000e0_dp*t289*t118*t613 + 0.2222222222e0_dp &
642 *t117*t735*t94 - 0.3333333333e0_dp*t117*t739*t94 - &
643 0.1666666667e0_dp*t117*t293*t258 + 0.5000000001e0_dp*t117*t746 &
644 *t94 + 0.5000000001e0_dp*t117*t297*t258 + 0.1666666667e0_dp*t117 &
645 *t118*t677 - 0.3456790122e0_dp*t36*t27*t237*t55 + 0.4444444444e0_dp &
646 *t36*t304*t151 - 0.3333333333e0_dp*t36*t122*t354 &
647 + 0.3333333334e0_dp*t36*t38*t838
648 t846 = -0.5000000004e0_dp*t116*t213 - 0.2000000001e1_dp*t36*t216 &
649 - 0.1000000001e1_dp*t36*t259 - 0.6666666672e0_dp*t64*t601 + 0.8333333340e-1_dp &
650 *t605*t60*t606 - 0.5000000004e0_dp*t211*t207*t212 &
651 - 0.5000000004e0_dp*t211*t60*t613 - 0.1000000001e1_dp*t68* &
652 t601*t94 - 0.1000000001e1_dp*t68*t207*t258 - 0.3333333336e0_dp* &
653 t68*t60*t677 - 0.2222222224e0_dp*t24*t98*t842
655 e_rho_rho_rho(ii) = e_rho_rho_rho(ii) + t846*sx
661 t933 = 0.3911111110e2_dp*t11*t222 - 0.1955555555e2_dp*t6*t628*t168 &
662 + 0.2133333334e2_dp*t11*t226 - 0.2133333334e2_dp*t6*t71*t384 &
663 + 0.1066666667e2_dp*t6*t225*t400 + 0.80e1_dp*t11*t233 - 0.120e2_dp &
664 *t382*t640*t232*t168 + 0.80e1_dp*t382*t383*t400 - 0.40e1_dp &
665 *t11*t255 + 0.40e1_dp*t382*t230*t254*t168 - 0.20e1_dp* &
666 t6*t77*(0.1866666667e2_dp*beta*t237*t12 + 0.9866666667e2_dp* &
667 t11*t241 - 0.8266666668e2_dp*t393*t251 + 0.3200000001e2_dp*beta &
668 *t244*my_ndrho/t657/t7*t669)
671 t1009 = 0.2e1_dp*t101*(-t455 + 0.9000000000e1_dp*t457 + 0.6000000000e1_dp &
672 *t460)*t103*t112 + 0.1800000000e2_dp*t412*t264*t40*t127 &
673 *t8*t172*t103*t112 + 0.2e1_dp*t101*t265*t428 + 0.1800000000e2_dp &
674 *t413*t186*t285 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp &
675 *t961*t1*t212*t172 + 0.4500000000e1_dp*t417*t418*t404 &
676 + 0.1500000000e1_dp*t417*t49*t94*t172 - 0.1000000000e1_dp* &
677 t105*t109*t404 + 0.2250000000e1_dp*t417*t1*t258*t172 - 0.1500000000e1_dp &
678 *t105*t31*t933 + 0.3333333334e0_dp*t105*t281* &
679 t172) + 0.1250000000e0_dp*t722*t118*t860 - 0.8333333335e-1_dp*t289 &
680 *t435*t212 - 0.1666666667e0_dp*t289*t118*t867 + 0.5555555555e-1_dp &
681 *t289*t293*t368 - 0.1111111111e0_dp*t117*t1002*t94 &
682 - 0.1111111111e0_dp*t117*t293*t404
685 t1069 = 0.5400000000e2_dp*t1044*t8*t212*t172 - 0.3600000000e2_dp &
686 *t451*t452*t404 - 0.2400000000e2_dp*t451*t37*t94*t172 + &
687 0.1200000000e2_dp*t128*t132*t404 - 0.1800000000e2_dp*t451*t8* &
688 t258*t172 + 0.8999999998e1_dp*t128*t43*t933 - 0.2000000000e1_dp &
690 t1091 = t127*t172*t46
691 t1102 = t1069*t46 + 0.8999999998e1_dp*t326*t40*t127*t467 + real(2 &
692 *t136*t462, kind=
dp) + 0.8999999998e1_dp*t328*t40*t127*t467 - &
693 0.5555555558e-1_dp*t39*t933*t52 - 0.5000000001e0_dp*t258*t127 &
694 *t466 + 0.7407407410e-1_dp*t470*t143 + 0.6666666668e0_dp*t94*t478 &
695 *t1091 - 0.1111111112e0_dp*t470*t48*t148 - 0.1111111112e0_dp &
696 *t335*t486 - 0.1000000001e1_dp*t94*t135*t1091
697 t1136 = -0.6172839508e-1_dp*t190*t339 - 0.5555555556e0_dp*t41/t7 &
698 *t466 + 0.7407407410e-1_dp*t482*t343 + 0.7407407410e-1_dp*t146* &
699 t141*t462*t46 + 0.6666666668e0_dp*t479*t135*t172*t46 - 0.5555555558e-1_dp &
700 *t482*t347 - 0.5555555558e-1_dp*t146*t49*t1069 &
701 *t46 - 0.5000000001e0_dp*t41*t326*t466 - 0.5555555558e-1_dp*t482 &
702 *t351 - 0.1111111112e0_dp*t146*t147*t463 - 0.5000000001e0_dp* &
704 t1141 = -0.1666666667e0_dp*t289*t297*t368 + 0.3333333334e0_dp*t117 &
705 *t1013*t94 + 0.3333333334e0_dp*t117*t297*t404 - 0.8333333335e-1_dp &
706 *t289*t118*t880 + 0.1666666667e0_dp*t117*t435*t258 + &
707 0.1666666667e0_dp*t117*t118*t933 + 0.7407407405e-1_dp*t117*t735 &
708 *t172 + 0.1481481481e0_dp*t36*t304*t196 - 0.1111111111e0_dp* &
709 t117*t739*t172 - 0.2222222222e0_dp*t36*t122*t492 + 0.1666666667e0_dp &
710 *t117*t746*t172 + 0.3333333334e0_dp*t36*t38*(t1102 &
712 t1146 = -0.3333333336e0_dp*t117*t59*t94*t172 - 0.6666666672e0_dp &
713 *t36*t372 - 0.6666666672e0_dp*t36*t405 - 0.6666666672e0_dp*t36 &
714 *t408 - 0.4444444448e0_dp*t64*t857 + 0.8333333340e-1_dp*t605*t60 &
715 *t860 - 0.1666666668e0_dp*t211*t365*t212 - 0.3333333336e0_dp* &
716 t211*t60*t867 - 0.3333333336e0_dp*t211*t207*t368 - 0.6666666672e0_dp &
717 *t68*t857*t94 - 0.6666666672e0_dp*t68*t207*t404 - 0.1666666668e0_dp &
718 *t211*t60*t880 - 0.3333333336e0_dp*t68*t365* &
719 t258 - 0.3333333336e0_dp*t68*t60*t933 - 0.3333333336e0_dp*t68* &
720 t601*t172 - 0.2222222224e0_dp*t24*t98*(t1009 + t1141)
722 e_ndrho_rho_rho(ii) = e_ndrho_rho_rho(ii) + t1146*sx
729 t1220 = -0.1066666667e2_dp*t1177*t17 + 0.2133333334e2_dp*t11*t377 &
730 - 0.1066666667e2_dp*t6*t632*t513 + 0.5333333333e1_dp*t6*t225 &
731 *t525 - 0.40e1_dp*t508*t76*t90 + 0.160e2_dp*t11*t10*t384 - &
732 0.80e1_dp*t11*t401 - 0.120e2_dp*t382*t640*t90*t513 + 0.80e1_dp &
733 *t382*t230*t400*t168 + 0.40e1_dp*t382*t383*t525 - 0.20e1_dp &
734 *t6*t77*(-0.3200000000e2_dp*t1177*t86 + 0.4800000000e2_dp*t6 &
735 *t397 - 0.2400000000e2_dp*t245/t657/my_rho*t669)
737 t1334 = 0.5400000000e2_dp*t1044*t452*t501 - 0.3600000000e2_dp*t451 &
738 *t8*t404*t172 - 0.1800000000e2_dp*t451*t452*t529 + 0.8999999998e1_dp &
739 *t128*t43*t1220 - 0.1200000000e2_dp*t313*t132*t501 &
740 + 0.5999999999e1_dp*t128*t132*t529
744 t1396 = t1334*t46 + 0.1800000000e2_dp*t462*t40*t127*t467 - 0.2250000000e2_dp &
745 *t464*t312*t43*t1341 + 0.8999999998e1_dp*t465 &
746 *t43*t1345 - 0.1000000000e1_dp*t404*t127*t466 + 0.8099999996e2_dp &
747 *t135*t571*t573*t533*t2*t1341 - 0.5555555558e-1_dp*t39 &
748 *t1220*t52 - 0.5000000001e0_dp*t473*t1345 + 0.3333333334e0_dp* &
749 t479*t1345 + 0.1000000000e1_dp*t94*t312*t1341 - 0.4500000000e1_dp &
750 *t94*t573*t501*t1370*t8*t46 + 0.3703703705e-1_dp*t580 &
751 *t143 + 0.3000000000e1_dp*t312*t37*t501*t1370*t46 - 0.5555555558e-1_dp &
752 *t580*t48*t148 - 0.1111111112e0_dp*t482*t486 - 0.5555555558e-1_dp &
753 *t146*t49*t1334*t46 - 0.1000000000e1_dp*t41* &
754 t462*t466 - 0.5000000001e0_dp*t489*t1345
755 t1400 = -0.3600000000e2_dp*t412*t313*t562*t113 + 0.1800000000e2_dp &
756 *t413*t566*t113 + 0.3600000000e2_dp*t413*t186*t429 + 0.1620000000e3_dp &
757 *t26*t533*t100*t574*t576*t113 + 0.2e1_dp*t101 &
758 *t103*(-0.5625000000e1_dp*t961*t418*t501 + 0.4500000000e1_dp &
759 *t417*t1*t404*t172 + 0.2250000000e1_dp*t417*t418*t529 - &
760 0.1500000000e1_dp*t105*t31*t1220 + 0.7500000000e0_dp*t271*t109 &
761 *t501 - 0.5000000000e0_dp*t105*t109*t529) + 0.1250000000e0_dp* &
762 t722*t118*t1156 - 0.1666666667e0_dp*t289*t435*t368 - 0.1666666667e0_dp &
763 *t289*t118*t1163 - 0.8333333335e-1_dp*t289*t118*t1167 &
764 + 0.1666666667e0_dp*t117*t1284*t94 + 0.3333333334e0_dp*t117 &
765 *t435*t404 + 0.1666666667e0_dp*t117*t118*t1220 + 0.2777777778e-1_dp &
766 *t289*t293*t501 - 0.1111111111e0_dp*t117*t1002*t172 &
767 - 0.5555555555e-1_dp*t117*t293*t529 - 0.1111111111e0_dp*t36*t122 &
768 *t586 - 0.8333333335e-1_dp*t289*t297*t501 + 0.3333333334e0_dp &
769 *t117*t1013*t172 + 0.1666666667e0_dp*t117*t297*t529 + 0.3333333334e0_dp &
771 t1404 = -0.1666666668e0_dp*t116*t502 - 0.6666666672e0_dp*t36*t505 &
772 - 0.3333333336e0_dp*t36*t530 - 0.2222222224e0_dp*t64*t1153 + 0.8333333340e-1_dp &
773 *t605*t60*t1156 - 0.3333333336e0_dp*t211*t365 &
774 *t368 - 0.3333333336e0_dp*t211*t60*t1163 - 0.1666666668e0_dp*t211 &
775 *t60*t1167 - 0.3333333336e0_dp*t68*t1153*t94 - 0.6666666672e0_dp &
776 *t68*t365*t404 - 0.3333333336e0_dp*t68*t60*t1220 - 0.1666666668e0_dp &
777 *t211*t207*t501 - 0.6666666672e0_dp*t68*t857* &
778 t172 - 0.3333333336e0_dp*t68*t207*t529 - 0.2222222224e0_dp*t24* &
781 e_ndrho_ndrho_rho(ii) = e_ndrho_ndrho_rho(ii) + t1404*sx
785 t1449 = -0.120e2_dp*t508*t76*t168 + 0.240e2_dp*t11*t514 - 0.120e2_dp &
786 *t11*t526 - 0.120e2_dp*t6*t641*t513*t168 + 0.120e2_dp*t382 &
787 *t230*t168*t525 - 0.20e1_dp*t6*t77*(-0.240e2_dp*beta*t521 &
788 *t250*my_ndrho + 0.180e2_dp*t393/t657*t669)
792 t1553 = 0.1350000000e3_dp*t537/t22/t572*my_rho*t1456 - 0.8100000000e2_dp &
793 *t534*t536*t539*my_rho*t172*t103*t529 - 0.2430000000e3_dp &
794 *t1467*t100/t570/omega/t22/t1472*t140*t1456 - &
795 0.1125000000e2_dp*t177*t687*t1*t1405 + 0.1350000000e2_dp*t176 &
796 *t103*t28*t270*t1*t1412 - 0.3000000000e1_dp*t177*t105* &
797 t1*t1449 + 0.1250000000e0_dp*t722*t118*t1405 - 0.2500000000e0_dp &
798 *t289*t435*t501 - 0.2500000000e0_dp*t289*t118*t1412 + 0.5000000001e0_dp &
799 *t117*t1284*t172 + 0.5000000001e0_dp*t117*t435 &
800 *t529 + 0.1666666667e0_dp*t117*t118*t1449 + 0.3333333334e0_dp*t36 &
801 *t38*(0.6750000000e2_dp*t1044*t8*t1405*t46 - 0.6750000000e2_dp &
802 *t451*t186*t1345 - 0.5264999998e3_dp*t571/t1472*t533 &
803 *t2*t1405*t46 + 0.8999999998e1_dp*t185*t8*t1449*t46 + 0.2429999999e3_dp &
804 *t575*t2*t529*t466 + 0.7289999995e3_dp/t570/t39 &
805 /t572/t126*t1467*t7*t1405*t46 - 0.5555555558e-1_dp*t39 &
806 *t1449*t52 - 0.5000000001e0_dp*t41*t1449*t46)
808 e_ndrho_ndrho_ndrho(ii) = e_ndrho_ndrho_ndrho(ii) + (0.8333333340e-1_dp*t605*t60*t1405 - &
809 0.5000000004e0_dp*t211*t365*t501 - 0.5000000004e0_dp*t211*t60*t1412 - 0.1000000001e1_dp &
810 *t68*t1153*t172 - 0.1000000001e1_dp*t68*t365*t529 - 0.3333333336e0_dp &
811 *t68*t60*t1449 - 0.2222222224e0_dp*t24*t98*t1553) &
819 END SUBROUTINE xb88_lr_lda_calc
834 INTEGER,
INTENT(in) :: grad_deriv
837 CHARACTER(len=*),
PARAMETER :: routinen =
'xb88_lr_lsd_eval'
839 INTEGER :: handle, i, ispin, npoints
840 INTEGER,
DIMENSION(2, 3) :: bo
841 REAL(kind=
dp) :: epsilon_rho, omega, sx
842 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :), &
843 POINTER :: dummy, e_0
844 TYPE(
cp_3d_r_cp_type),
DIMENSION(2) :: e_ndrho, e_ndrho_ndrho, e_ndrho_ndrho_ndrho, &
845 e_ndrho_ndrho_rho, e_ndrho_rho, e_ndrho_rho_rho, e_rho, e_rho_rho, e_rho_rho_rho, &
849 CALL timeset(routinen, handle)
855 NULLIFY (norm_drho(i)%array, rho(i)%array)
863 rhob=rho(2)%array, norm_drhoa=norm_drho(1)%array, &
864 norm_drhob=norm_drho(2)%array, rho_cutoff=epsilon_rho, &
866 npoints = (bo(2, 1) - bo(1, 1) + 1)*(bo(2, 2) - bo(1, 2) + 1)*(bo(2, 3) - bo(1, 3) + 1)
870 dummy => rho(1)%array
874 e_rho(i)%array => dummy
875 e_ndrho(i)%array => dummy
876 e_rho_rho(i)%array => dummy
877 e_ndrho_rho(i)%array => dummy
878 e_ndrho_ndrho(i)%array => dummy
879 e_rho_rho_rho(i)%array => dummy
880 e_ndrho_rho_rho(i)%array => dummy
881 e_ndrho_ndrho_rho(i)%array => dummy
882 e_ndrho_ndrho_ndrho(i)%array => dummy
886 allocate_deriv=.true.)
888 IF (grad_deriv >= 1)
THEN
890 allocate_deriv=.true.)
893 allocate_deriv=.true.)
896 allocate_deriv=.true.)
899 allocate_deriv=.true.)
902 IF (grad_deriv >= 2)
THEN
904 allocate_deriv=.true.)
907 allocate_deriv=.true.)
910 allocate_deriv=.true.)
913 allocate_deriv=.true.)
922 IF (grad_deriv >= 3)
THEN
924 allocate_deriv=.true.)
927 allocate_deriv=.true.)
948 IF (grad_deriv > 3)
THEN
949 cpabort(
"derivatives bigger than 3 not implemented")
962 CALL xb88_lr_lsd_calc( &
963 rho_spin=rho(ispin)%array, &
964 norm_drho_spin=norm_drho(ispin)%array, &
966 e_rho_spin=e_rho(ispin)%array, &
967 e_ndrho_spin=e_ndrho(ispin)%array, &
968 e_rho_rho_spin=e_rho_rho(ispin)%array, &
969 e_ndrho_rho_spin=e_ndrho_rho(ispin)%array, &
970 e_ndrho_ndrho_spin=e_ndrho_ndrho(ispin)%array, &
971 e_rho_rho_rho_spin=e_rho_rho_rho(ispin)%array, &
972 e_ndrho_rho_rho_spin=e_ndrho_rho_rho(ispin)%array, &
973 e_ndrho_ndrho_rho_spin=e_ndrho_ndrho_rho(ispin)%array, &
974 e_ndrho_ndrho_ndrho_spin=e_ndrho_ndrho_ndrho(ispin)%array, &
975 grad_deriv=grad_deriv, npoints=npoints, &
976 epsilon_rho=epsilon_rho, &
983 CALL timestop(handle)
1013 SUBROUTINE xb88_lr_lsd_calc(rho_spin, norm_drho_spin, e_0, &
1014 e_rho_spin, e_ndrho_spin, e_rho_rho_spin, e_ndrho_rho_spin, &
1015 e_ndrho_ndrho_spin, e_rho_rho_rho_spin, e_ndrho_rho_rho_spin, &
1016 e_ndrho_ndrho_rho_spin, &
1017 e_ndrho_ndrho_ndrho_spin, grad_deriv, npoints, epsilon_rho, sx, &
1019 REAL(kind=
dp),
DIMENSION(*),
INTENT(in) :: rho_spin, norm_drho_spin
1020 REAL(kind=
dp),
DIMENSION(*),
INTENT(inout) :: e_0, e_rho_spin, e_ndrho_spin, e_rho_rho_spin, &
1021 e_ndrho_rho_spin, e_ndrho_ndrho_spin, e_rho_rho_rho_spin, e_ndrho_rho_rho_spin, &
1022 e_ndrho_ndrho_rho_spin, e_ndrho_ndrho_ndrho_spin
1023 INTEGER,
INTENT(in) :: grad_deriv, npoints
1024 REAL(kind=
dp),
INTENT(in) :: epsilon_rho, sx, omega
1027 REAL(kind=
dp) :: cx, epsilon_rho43, my_epsilon_rho, ndrho, rho, t1, t10, t100, t1002, t1009, &
1028 t101, t1013, t103, t104, t1044, t105, t1069, t109, t1091, t11, t1102, t112, t113, t1136, &
1029 t1141, t1146, t1153, t1156, t116, t1163, t1167, t117, t1177, t118, t12, t122, t1220, &
1030 t126, t127, t128, t1284, t130, t132, t133, t1334, t1341, t1345, t135, t136, t137, t1370, &
1031 t1396, t140, t1400, t1404, t1405, t141, t1412, t143, t1449, t1456, t146, t1467, t147, &
1032 t1472, t148, t151, t155, t1553, t16, t168, t169, t17, t172, t173, t176, t177, t18, t185, &
1033 t186, t190, t196, t2, t200, t207, t21, t211, t212, t213, t216
1034 REAL(kind=
dp) :: t219, t22, t221, t222, t225, t226, t23, t230, t231, t232, t233, t237, t24, &
1035 t241, t244, t245, t250, t251, t254, t255, t258, t259, t26, t264, t265, t27, t270, t271, &
1036 t28, t281, t284, t285, t289, t29, t293, t297, t3, t30, t304, t31, t311, t312, t313, t316, &
1037 t319, t321, t323, t325, t326, t328, t330, t335, t339, t34, t343, t346, t347, t351, t354, &
1038 t358, t36, t365, t368, t37, t372, t377, t38, t382, t383, t384, t39, t393, t397, t40, &
1039 t400, t401, t404, t405, t408, t41, t412, t413, t417, t418, t42, t428, t429, t43, t435, &
1040 t44, t451, t452, t455, t457, t46, t460, t462, t463, t464, t465
1041 REAL(kind=
dp) :: t466, t467, t47, t470, t473, t478, t479, t48, t482, t486, t489, t49, t492, &
1042 t496, t5, t501, t502, t505, t508, t51, t513, t514, t519, t52, t521, t525, t526, t529, &
1043 t530, t533, t534, t536, t537, t539, t55, t562, t566, t570, t571, t572, t573, t574, t575, &
1044 t576, t580, t586, t59, t590, t6, t60, t601, t605, t606, t613, t624, t628, t632, t639, &
1045 t64, t640, t641, t657, t667, t669, t677, t68, t687, t69, t7, t71, t716, t72, t722, t735, &
1046 t739, t746, t75, t76, t769, t77, t79, t791, t793, t8, t838, t84, t842, t846, t85, t857, &
1047 t86, t860, t867, t87, t880, t90, t91, t933, t94, t95, t961, t98
1048 REAL(kind=
dp) :: t99, xx
1050 my_epsilon_rho = 0.5_dp*epsilon_rho
1051 epsilon_rho43 = my_epsilon_rho**(4.0_dp/3.0_dp)
1052 cx = 1.5_dp*(3.0_dp/4.0_dp/
pi)**(1.0_dp/3.0_dp)
1057 ndrho = norm_drho_spin(ii)
1058 IF (rho > my_epsilon_rho)
THEN
1059 t1 = rho**(0.1e1_dp/0.3e1_dp)
1062 xx = ndrho*max(t3, epsilon_rho43)
1067 t10 = 0.1e1_dp/t8/t7
1069 t12 = log(xx + sqrt(xx**0.2e1_dp + 0.1e1_dp))
1070 t16 = 0.10e1_dp + 0.60e1_dp*t11*t3*t12
1073 t21 = 0.20e1_dp*cx + 0.20e1_dp*t6*t18
1079 t28 = 0.1e1_dp/omega
1083 t34 = erf(0.3000000000e1_dp*t30*t31)
1093 t46 = exp(-0.8999999998e1_dp*t44)
1097 t51 = t46 - 0.10e1_dp
1099 t55 = t46 - 0.15e1_dp - 0.5555555558e-1_dp*t47*t52
1100 t59 = t26*t34 + 0.3333333334e0_dp*t36*t38*t55
1103 e_0(ii) = e_0(ii) - 0.2222222224e0_dp*t24*omega*t60*sx
1105 IF (grad_deriv >= 1)
THEN
1109 t71 = 0.1e1_dp/t8/t69
1114 t79 = 0.1e1_dp/t1/t7
1119 t90 = -0.8000000000e1_dp*t11*t79*t12 - 0.8000000000e1_dp*t6*t87
1121 t94 = -0.5333333333e1_dp*t6*t72 - 0.20e1_dp*t6*t91
1124 t99 = sqrt(0.3141592654e1_dp)
1127 t103 = exp(-0.9000000000e1_dp*t44)
1131 t112 = -0.1500000000e1_dp*t105*t31*t94 + 0.1000000000e1_dp*t30* &
1139 t127 = 0.1e1_dp/t126
1144 t135 = 0.8999999998e1_dp*t130 - 0.5999999999e1_dp*t133
1148 t141 = 0.1e1_dp/t140
1153 t151 = t136 - 0.5555555558e-1_dp*t137*t52 + 0.3703703705e-1_dp*t47 &
1154 *t143 - 0.5555555558e-1_dp*t146*t148
1155 t155 = real(2*t101*t113, kind=
dp) + 0.1666666667e0_dp*t117*t118*t94 - &
1156 0.1111111111e0_dp*t36*t122*t55 + 0.3333333334e0_dp*t36*t38* &
1159 e_rho_spin(ii) = e_rho_spin(ii) + (-0.2222222224e0_dp*t64*t60 - 0.3333333336e0_dp*t68*t95 - &
1160 0.2222222224e0_dp*t24*t98*t155)*sx
1162 t168 = 0.60e1_dp*beta*t3*t12 + 0.60e1_dp*t11*t10*t86
1164 t172 = 0.40e1_dp*t11*t18 - 0.20e1_dp*t6*t169
1171 t196 = 0.8999999998e1_dp*t185*t186*t46 - 0.5555555558e-1_dp*t190 &
1172 *t52 - 0.5000000001e0_dp*t41*t172*t46
1173 t200 = -0.3000000000e1_dp*t177*t105*t1*t172 + 0.1666666667e0_dp* &
1174 t117*t118*t172 + 0.3333333334e0_dp*t36*t38*t196
1176 e_ndrho_spin(ii) = e_ndrho_spin(ii) + (-0.3333333336e0_dp*t68*t173 - 0.2222222224e0_dp*t24*t98 &
1180 IF (grad_deriv >= 2)
THEN
1182 t211 = rho*t29*omega
1187 t221 = 0.1e1_dp/t8/t219
1191 t230 = 0.1e1_dp/t75/t16
1195 t237 = 0.1e1_dp/t1/t69
1199 t250 = 0.1e1_dp/t85/t84
1200 t251 = 0.1e1_dp/t1/t219/t69*t250
1201 t254 = 0.1866666667e2_dp*t11*t237*t12 + 0.4000000000e2_dp*t6*t241 &
1202 - 0.1066666667e2_dp*t245*t251
1204 t258 = 0.1955555555e2_dp*t6*t222 + 0.1066666667e2_dp*t6*t226 + 0.40e1_dp &
1205 *t6*t233 - 0.20e1_dp*t6*t255
1207 t264 = 0.9000000000e1_dp*t130 - 0.6000000000e1_dp*t133
1209 t270 = 0.1e1_dp/t22/t126
1212 t284 = 0.2250000000e1_dp*t271*t31*t212 - 0.1000000000e1_dp*t105* &
1213 t109*t94 - 0.1500000000e1_dp*t105*t31*t258 - 0.6666666667e0_dp &
1216 t289 = omega*t104*t27
1221 t312 = 0.1e1_dp/t311
1223 t316 = 0.1800000000e2_dp*t313*t43*t212
1224 t319 = 0.1200000000e2_dp*t128*t132*t94
1225 t321 = t128*t43*t258
1227 t325 = 0.2000000000e1_dp*t42*t323
1228 t326 = -t316 + t319 + 0.8999999998e1_dp*t321 + t325
1233 t343 = t141*t135*t46
1237 t354 = t326*t46 + t328*t46 - 0.5555555558e-1_dp*t330*t52 + 0.7407407410e-1_dp &
1238 *t137*t143 - 0.1111111112e0_dp*t335*t148 - 0.6172839508e-1_dp &
1239 *t47*t339 + 0.7407407410e-1_dp*t146*t343 - 0.5555555558e-1_dp &
1240 *t146*t347 - 0.5555555558e-1_dp*t146*t351
1241 t358 = real(2*t101*t265*t112, kind=
dp) + real(2*t101*t285, kind=
dp) - 0.8333333335e-1_dp &
1242 *t289*t118*t212 - 0.1111111111e0_dp*t117*t293*t94 &
1243 + 0.3333333334e0_dp*t117*t297*t94 + 0.1666666667e0_dp*t117* &
1244 t118*t258 + 0.1481481481e0_dp*t36*t304*t55 - 0.2222222222e0_dp* &
1245 t36*t122*t151 + 0.3333333334e0_dp*t36*t38*t354
1247 e_rho_rho_spin(ii) = e_rho_rho_spin(ii) + (-0.6666666672e0_dp*t36*t95 - 0.4444444448e0_dp*t64*t207 - &
1248 0.1666666668e0_dp*t211*t213 - 0.6666666672e0_dp*t68*t216 - 0.3333333336e0_dp &
1249 *t68*t259 - 0.2222222224e0_dp*t24*t98*t358)*sx
1258 t393 = beta*t5*ndrho
1259 t397 = 0.1e1_dp/t1/t219/t7*t250
1260 t400 = -0.8000000000e1_dp*beta*t79*t12 - 0.2400000000e2_dp*t11* &
1261 t87 + 0.8000000000e1_dp*t393*t397
1263 t404 = -0.1066666667e2_dp*t11*t72 + 0.5333333333e1_dp*t6*t377 - 0.40e1_dp &
1264 *t11*t91 + 0.40e1_dp*t382*t384 - 0.20e1_dp*t6*t401
1271 t428 = 0.2250000000e1_dp*t417*t418*t172 - 0.1500000000e1_dp*t105 &
1272 *t31*t404 - 0.5000000000e0_dp*t105*t109*t172
1277 t455 = 0.1800000000e2_dp*t451*t452*t172
1278 t457 = t128*t43*t404
1279 t460 = t128*t132*t172
1280 t462 = -t455 + 0.8999999998e1_dp*t457 + 0.5999999999e1_dp*t460
1293 t492 = t463 + 0.8999999998e1_dp*t465*t467 - 0.5555555558e-1_dp*t470 &
1294 *t52 - 0.5000000001e0_dp*t473*t466 + 0.3703703705e-1_dp*t190*t143 &
1295 + 0.3333333334e0_dp*t479*t466 - 0.5555555558e-1_dp*t482*t148 &
1296 - 0.5555555558e-1_dp*t146*t486 - 0.5000000001e0_dp*t489*t466
1297 t496 = 0.1800000000e2_dp*t413*t186*t113 + real(2*t101*t429, kind=
dp) &
1298 - 0.8333333335e-1_dp*t289*t118*t368 + 0.1666666667e0_dp*t117*t435 &
1299 *t94 + 0.1666666667e0_dp*t117*t118*t404 - 0.5555555555e-1_dp &
1300 *t117*t293*t172 - 0.1111111111e0_dp*t36*t122*t196 + 0.1666666667e0_dp &
1301 *t117*t297*t172 + 0.3333333334e0_dp*t36*t38*t492
1303 e_ndrho_rho_spin(ii) = e_ndrho_rho_spin(ii) + (-0.3333333336e0_dp*t36*t173 - 0.2222222224e0_dp*t64*t365 - &
1304 0.1666666668e0_dp*t211*t60*t368 - 0.3333333336e0_dp*t68*t372 &
1305 - 0.3333333336e0_dp*t68*t405 - 0.3333333336e0_dp*t68*t408 - 0.2222222224e0_dp &
1315 t521 = 0.1e1_dp/t1/t519
1316 t525 = 0.120e2_dp*t508*t86 - 0.60e1_dp*t6*t521*t250
1318 t529 = 0.40e1_dp*t508*t17 - 0.80e1_dp*t11*t169 + 0.40e1_dp*t6*t514 &
1323 t536 = 0.1e1_dp/t39/omega
1325 t539 = 0.1e1_dp/t22/t311
1329 t571 = 0.1e1_dp/t570
1331 t573 = 0.1e1_dp/t572
1336 t586 = -0.2250000000e2_dp*t451*t562*t46 + 0.8999999998e1_dp*t185 &
1337 *t566*t46 + 0.8099999996e2_dp*t575*t576*t46 - 0.5555555558e-1_dp &
1338 *t580*t52 - 0.5000000001e0_dp*t41*t529*t46
1339 t590 = -0.2700000000e2_dp*t537*t539*rho*t501*t103 + 0.4500000000e1_dp &
1340 *t177*t271*t1*t501 - 0.3000000000e1_dp*t177*t105* &
1341 t1*t529 - 0.8333333335e-1_dp*t289*t118*t501 + 0.3333333334e0_dp &
1342 *t117*t435*t172 + 0.1666666667e0_dp*t117*t118*t529 + 0.3333333334e0_dp &
1345 e_ndrho_ndrho_spin(ii) = e_ndrho_ndrho_spin(ii) + (-0.1666666668e0_dp*t211*t502 - 0.6666666672e0_dp*t68*t505 &
1346 - 0.3333333336e0_dp*t68*t530 - 0.2222222224e0_dp*t24*t98*t590) &
1350 IF (grad_deriv >= 3)
THEN
1352 t605 = rho*t104*omega
1355 t624 = 0.1e1_dp/t8/t519
1359 t640 = 0.1e1_dp/t639
1363 t669 = 0.1e1_dp/t85/t667
1364 t677 = -0.9125925923e2_dp*t6*t624*t17 - 0.5866666667e2_dp*t6*t628 &
1365 *t90 - 0.3200000001e2_dp*t6*t632*t232 + 0.1600000000e2_dp*t6 &
1366 *t225*t254 - 0.120e2_dp*t6*t641*t232*t90 + 0.120e2_dp*t382 &
1367 *t383*t254 - 0.20e1_dp*t6*t77*(-0.6222222223e2_dp*t11/t1/ &
1368 t219*t12 - 0.2115555556e3_dp*t6*t624*t86 + 0.1315555556e3_dp* &
1369 t245/t1/t657*t250 - 0.4266666668e2_dp*beta*t244*t5/t657 &
1373 t722 = omega*t270*t27
1378 t791 = 0.5400000000e2_dp*t769*t43*t606 - 0.3600000000e2_dp*t313* &
1379 t132*t212 - 0.5400000000e2_dp*t451*t452*t258 - 0.6000000000e1_dp &
1380 *t128*t323*t94 + 0.1800000000e2_dp*t128*t132*t258 + 0.8999999998e1_dp &
1381 *t128*t43*t677 - 0.2666666667e1_dp*t42*
pi*t79
1383 t838 = real(3*t326*t135*t46, kind=
dp) + real(t791*t46, kind=
dp) + real(t793* &
1384 t46, kind=
dp) - 0.5555555558e-1_dp*t39*t677*t52 + 0.1111111112e0_dp*t330 &
1385 *t143 - 0.1666666668e0_dp*t330*t48*t148 - 0.1851851853e0_dp*t137 &
1386 *t339 + 0.2222222223e0_dp*t335*t343 - 0.1666666668e0_dp*t335* &
1387 t347 - 0.1666666668e0_dp*t335*t351 + 0.1646090535e0_dp*t47*t48 &
1388 *t71*t51 - 0.1851851853e0_dp*real(t146, kind=
dp)*real(t10, kind=
dp)*real(t135, kind=
dp) &
1389 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t326, kind=
dp) &
1390 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t328, kind=
dp) &
1391 *real(t46, kind=
dp) - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t791, kind=
dp) &
1392 *real(t46, kind=
dp) - 0.1666666668e0_dp*real(t146, kind=
dp)*real(t346, kind=
dp)*real(t136, kind=
dp) &
1393 - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t793, kind=
dp)* &
1395 t842 = 0.2e1_dp*t101*(-t316 + t319 + 0.9000000000e1_dp*t321 + t325) &
1396 *t103*t112 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp*t687*t31 &
1397 *t606 + 0.2250000000e1_dp*t271*t109*t212 + 0.6750000000e1_dp* &
1398 t417*t418*t258 + 0.1000000000e1_dp*t105*t281*t94 - 0.1500000000e1_dp &
1399 *t105*t109*t258 - 0.1500000000e1_dp*t105*t31*t677 &
1400 + 0.1111111111e1_dp*t30*t26*t10) + 0.4e1_dp*t101*t265*t284 + &
1401 0.2e1_dp*t101*t716*t103*t112 + 0.1250000000e0_dp*t722*t118 &
1402 *t606 + 0.8333333333e-1_dp*t289*t293*t212 - 0.2500000000e0_dp*t289 &
1403 *t297*t212 - 0.2500000000e0_dp*t289*t118*t613 + 0.2222222222e0_dp &
1404 *t117*t735*t94 - 0.3333333333e0_dp*t117*t739*t94 - &
1405 0.1666666667e0_dp*t117*t293*t258 + 0.5000000001e0_dp*t117*t746 &
1406 *t94 + 0.5000000001e0_dp*t117*t297*t258 + 0.1666666667e0_dp*t117 &
1407 *t118*t677 - 0.3456790122e0_dp*t36*t27*t237*t55 + 0.4444444444e0_dp &
1408 *t36*t304*t151 - 0.3333333333e0_dp*t36*t122*t354 &
1409 + 0.3333333334e0_dp*t36*t38*t838
1410 t846 = -0.5000000004e0_dp*t116*t213 - 0.2000000001e1_dp*t36*t216 &
1411 - 0.1000000001e1_dp*t36*t259 - 0.6666666672e0_dp*t64*t601 + 0.8333333340e-1_dp &
1412 *t605*t60*t606 - 0.5000000004e0_dp*t211*t207*t212 &
1413 - 0.5000000004e0_dp*t211*t60*t613 - 0.1000000001e1_dp*t68* &
1414 t601*t94 - 0.1000000001e1_dp*t68*t207*t258 - 0.3333333336e0_dp* &
1415 t68*t60*t677 - 0.2222222224e0_dp*t24*t98*t842
1417 e_rho_rho_rho_spin(ii) = e_rho_rho_rho_spin(ii) + t846*sx
1423 t933 = 0.3911111110e2_dp*t11*t222 - 0.1955555555e2_dp*t6*t628*t168 &
1424 + 0.2133333334e2_dp*t11*t226 - 0.2133333334e2_dp*t6*t71*t384 &
1425 + 0.1066666667e2_dp*t6*t225*t400 + 0.80e1_dp*t11*t233 - 0.120e2_dp &
1426 *t382*t640*t232*t168 + 0.80e1_dp*t382*t383*t400 - 0.40e1_dp &
1427 *t11*t255 + 0.40e1_dp*t382*t230*t254*t168 - 0.20e1_dp* &
1428 t6*t77*(0.1866666667e2_dp*beta*t237*t12 + 0.9866666667e2_dp* &
1429 t11*t241 - 0.8266666668e2_dp*t393*t251 + 0.3200000001e2_dp*beta &
1430 *t244*ndrho/t657/t7*t669)
1433 t1009 = 0.2e1_dp*t101*(-t455 + 0.9000000000e1_dp*t457 + 0.6000000000e1_dp &
1434 *t460)*t103*t112 + 0.1800000000e2_dp*t412*t264*t40*t127 &
1435 *t8*t172*t103*t112 + 0.2e1_dp*t101*t265*t428 + 0.1800000000e2_dp &
1436 *t413*t186*t285 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp &
1437 *t961*t1*t212*t172 + 0.4500000000e1_dp*t417*t418*t404 &
1438 + 0.1500000000e1_dp*t417*t49*t94*t172 - 0.1000000000e1_dp* &
1439 t105*t109*t404 + 0.2250000000e1_dp*t417*t1*t258*t172 - 0.1500000000e1_dp &
1440 *t105*t31*t933 + 0.3333333334e0_dp*t105*t281* &
1441 t172) + 0.1250000000e0_dp*t722*t118*t860 - 0.8333333335e-1_dp*t289 &
1442 *t435*t212 - 0.1666666667e0_dp*t289*t118*t867 + 0.5555555555e-1_dp &
1443 *t289*t293*t368 - 0.1111111111e0_dp*t117*t1002*t94 &
1444 - 0.1111111111e0_dp*t117*t293*t404
1447 t1069 = 0.5400000000e2_dp*t1044*t8*t212*t172 - 0.3600000000e2_dp &
1448 *t451*t452*t404 - 0.2400000000e2_dp*t451*t37*t94*t172 + &
1449 0.1200000000e2_dp*t128*t132*t404 - 0.1800000000e2_dp*t451*t8* &
1450 t258*t172 + 0.8999999998e1_dp*t128*t43*t933 - 0.2000000000e1_dp &
1452 t1091 = t127*t172*t46
1453 t1102 = t1069*t46 + 0.8999999998e1_dp*t326*t40*t127*t467 + real(2 &
1454 *t136*t462, kind=
dp) + 0.8999999998e1_dp*t328*t40*t127*t467 - &
1455 0.5555555558e-1_dp*t39*t933*t52 - 0.5000000001e0_dp*t258*t127 &
1456 *t466 + 0.7407407410e-1_dp*t470*t143 + 0.6666666668e0_dp*t94*t478 &
1457 *t1091 - 0.1111111112e0_dp*t470*t48*t148 - 0.1111111112e0_dp &
1458 *t335*t486 - 0.1000000001e1_dp*t94*t135*t1091
1459 t1136 = -0.6172839508e-1_dp*t190*t339 - 0.5555555556e0_dp*t41/t7 &
1460 *t466 + 0.7407407410e-1_dp*t482*t343 + 0.7407407410e-1_dp*t146* &
1461 t141*t462*t46 + 0.6666666668e0_dp*t479*t135*t172*t46 - 0.5555555558e-1_dp &
1462 *t482*t347 - 0.5555555558e-1_dp*t146*t49*t1069 &
1463 *t46 - 0.5000000001e0_dp*t41*t326*t466 - 0.5555555558e-1_dp*t482 &
1464 *t351 - 0.1111111112e0_dp*t146*t147*t463 - 0.5000000001e0_dp* &
1466 t1141 = -0.1666666667e0_dp*t289*t297*t368 + 0.3333333334e0_dp*t117 &
1467 *t1013*t94 + 0.3333333334e0_dp*t117*t297*t404 - 0.8333333335e-1_dp &
1468 *t289*t118*t880 + 0.1666666667e0_dp*t117*t435*t258 + &
1469 0.1666666667e0_dp*t117*t118*t933 + 0.7407407405e-1_dp*t117*t735 &
1470 *t172 + 0.1481481481e0_dp*t36*t304*t196 - 0.1111111111e0_dp* &
1471 t117*t739*t172 - 0.2222222222e0_dp*t36*t122*t492 + 0.1666666667e0_dp &
1472 *t117*t746*t172 + 0.3333333334e0_dp*t36*t38*(t1102 &
1474 t1146 = -0.3333333336e0_dp*t117*t59*t94*t172 - 0.6666666672e0_dp &
1475 *t36*t372 - 0.6666666672e0_dp*t36*t405 - 0.6666666672e0_dp*t36 &
1476 *t408 - 0.4444444448e0_dp*t64*t857 + 0.8333333340e-1_dp*t605*t60 &
1477 *t860 - 0.1666666668e0_dp*t211*t365*t212 - 0.3333333336e0_dp* &
1478 t211*t60*t867 - 0.3333333336e0_dp*t211*t207*t368 - 0.6666666672e0_dp &
1479 *t68*t857*t94 - 0.6666666672e0_dp*t68*t207*t404 - 0.1666666668e0_dp &
1480 *t211*t60*t880 - 0.3333333336e0_dp*t68*t365* &
1481 t258 - 0.3333333336e0_dp*t68*t60*t933 - 0.3333333336e0_dp*t68* &
1482 t601*t172 - 0.2222222224e0_dp*t24*t98*(t1009 + t1141)
1484 e_ndrho_rho_rho_spin(ii) = e_ndrho_rho_rho_spin(ii) + t1146*sx
1491 t1220 = -0.1066666667e2_dp*t1177*t17 + 0.2133333334e2_dp*t11*t377 &
1492 - 0.1066666667e2_dp*t6*t632*t513 + 0.5333333333e1_dp*t6*t225 &
1493 *t525 - 0.40e1_dp*t508*t76*t90 + 0.160e2_dp*t11*t10*t384 - &
1494 0.80e1_dp*t11*t401 - 0.120e2_dp*t382*t640*t90*t513 + 0.80e1_dp &
1495 *t382*t230*t400*t168 + 0.40e1_dp*t382*t383*t525 - 0.20e1_dp &
1496 *t6*t77*(-0.3200000000e2_dp*t1177*t86 + 0.4800000000e2_dp*t6 &
1497 *t397 - 0.2400000000e2_dp*t245/t657/rho*t669)
1499 t1334 = 0.5400000000e2_dp*t1044*t452*t501 - 0.3600000000e2_dp*t451 &
1500 *t8*t404*t172 - 0.1800000000e2_dp*t451*t452*t529 + 0.8999999998e1_dp &
1501 *t128*t43*t1220 - 0.1200000000e2_dp*t313*t132*t501 &
1502 + 0.5999999999e1_dp*t128*t132*t529
1506 t1396 = t1334*t46 + 0.1800000000e2_dp*t462*t40*t127*t467 - 0.2250000000e2_dp &
1507 *t464*t312*t43*t1341 + 0.8999999998e1_dp*t465 &
1508 *t43*t1345 - 0.1000000000e1_dp*t404*t127*t466 + 0.8099999996e2_dp &
1509 *t135*t571*t573*t533*t2*t1341 - 0.5555555558e-1_dp*t39 &
1510 *t1220*t52 - 0.5000000001e0_dp*t473*t1345 + 0.3333333334e0_dp* &
1511 t479*t1345 + 0.1000000000e1_dp*t94*t312*t1341 - 0.4500000000e1_dp &
1512 *t94*t573*t501*t1370*t8*t46 + 0.3703703705e-1_dp*t580 &
1513 *t143 + 0.3000000000e1_dp*t312*t37*t501*t1370*t46 - 0.5555555558e-1_dp &
1514 *t580*t48*t148 - 0.1111111112e0_dp*t482*t486 - 0.5555555558e-1_dp &
1515 *t146*t49*t1334*t46 - 0.1000000000e1_dp*t41* &
1516 t462*t466 - 0.5000000001e0_dp*t489*t1345
1517 t1400 = -0.3600000000e2_dp*t412*t313*t562*t113 + 0.1800000000e2_dp &
1518 *t413*t566*t113 + 0.3600000000e2_dp*t413*t186*t429 + 0.1620000000e3_dp &
1519 *t26*t533*t100*t574*t576*t113 + 0.2e1_dp*t101 &
1520 *t103*(-0.5625000000e1_dp*t961*t418*t501 + 0.4500000000e1_dp &
1521 *t417*t1*t404*t172 + 0.2250000000e1_dp*t417*t418*t529 - &
1522 0.1500000000e1_dp*t105*t31*t1220 + 0.7500000000e0_dp*t271*t109 &
1523 *t501 - 0.5000000000e0_dp*t105*t109*t529) + 0.1250000000e0_dp* &
1524 t722*t118*t1156 - 0.1666666667e0_dp*t289*t435*t368 - 0.1666666667e0_dp &
1525 *t289*t118*t1163 - 0.8333333335e-1_dp*t289*t118*t1167 &
1526 + 0.1666666667e0_dp*t117*t1284*t94 + 0.3333333334e0_dp*t117 &
1527 *t435*t404 + 0.1666666667e0_dp*t117*t118*t1220 + 0.2777777778e-1_dp &
1528 *t289*t293*t501 - 0.1111111111e0_dp*t117*t1002*t172 &
1529 - 0.5555555555e-1_dp*t117*t293*t529 - 0.1111111111e0_dp*t36*t122 &
1530 *t586 - 0.8333333335e-1_dp*t289*t297*t501 + 0.3333333334e0_dp &
1531 *t117*t1013*t172 + 0.1666666667e0_dp*t117*t297*t529 + 0.3333333334e0_dp &
1533 t1404 = -0.1666666668e0_dp*t116*t502 - 0.6666666672e0_dp*t36*t505 &
1534 - 0.3333333336e0_dp*t36*t530 - 0.2222222224e0_dp*t64*t1153 + 0.8333333340e-1_dp &
1535 *t605*t60*t1156 - 0.3333333336e0_dp*t211*t365 &
1536 *t368 - 0.3333333336e0_dp*t211*t60*t1163 - 0.1666666668e0_dp*t211 &
1537 *t60*t1167 - 0.3333333336e0_dp*t68*t1153*t94 - 0.6666666672e0_dp &
1538 *t68*t365*t404 - 0.3333333336e0_dp*t68*t60*t1220 - 0.1666666668e0_dp &
1539 *t211*t207*t501 - 0.6666666672e0_dp*t68*t857* &
1540 t172 - 0.3333333336e0_dp*t68*t207*t529 - 0.2222222224e0_dp*t24* &
1543 e_ndrho_ndrho_rho_spin(ii) = e_ndrho_ndrho_rho_spin(ii) + t1404*sx
1547 t1449 = -0.120e2_dp*t508*t76*t168 + 0.240e2_dp*t11*t514 - 0.120e2_dp &
1548 *t11*t526 - 0.120e2_dp*t6*t641*t513*t168 + 0.120e2_dp*t382 &
1549 *t230*t168*t525 - 0.20e1_dp*t6*t77*(-0.240e2_dp*beta*t521 &
1550 *t250*ndrho + 0.180e2_dp*t393/t657*t669)
1554 t1553 = 0.1350000000e3_dp*t537/t22/t572*rho*t1456 - 0.8100000000e2_dp &
1555 *t534*t536*t539*rho*t172*t103*t529 - 0.2430000000e3_dp &
1556 *t1467*t100/t570/omega/t22/t1472*t140*t1456 - &
1557 0.1125000000e2_dp*t177*t687*t1*t1405 + 0.1350000000e2_dp*t176 &
1558 *t103*t28*t270*t1*t1412 - 0.3000000000e1_dp*t177*t105* &
1559 t1*t1449 + 0.1250000000e0_dp*t722*t118*t1405 - 0.2500000000e0_dp &
1560 *t289*t435*t501 - 0.2500000000e0_dp*t289*t118*t1412 + 0.5000000001e0_dp &
1561 *t117*t1284*t172 + 0.5000000001e0_dp*t117*t435 &
1562 *t529 + 0.1666666667e0_dp*t117*t118*t1449 + 0.3333333334e0_dp*t36 &
1563 *t38*(0.6750000000e2_dp*t1044*t8*t1405*t46 - 0.6750000000e2_dp &
1564 *t451*t186*t1345 - 0.5264999998e3_dp*t571/t1472*t533 &
1565 *t2*t1405*t46 + 0.8999999998e1_dp*t185*t8*t1449*t46 + 0.2429999999e3_dp &
1566 *t575*t2*t529*t466 + 0.7289999995e3_dp/t570/t39 &
1567 /t572/t126*t1467*t7*t1405*t46 - 0.5555555558e-1_dp*t39 &
1568 *t1449*t52 - 0.5000000001e0_dp*t41*t1449*t46)
1570 e_ndrho_ndrho_ndrho_spin(ii) = e_ndrho_ndrho_ndrho_spin(ii) + (0.8333333340e-1_dp*t605*t60*t1405 - &
1571 0.5000000004e0_dp*t211*t365*t501 - 0.5000000004e0_dp*t211*t60*t1412 - 0.1000000001e1_dp &
1572 *t68*t1153*t172 - 0.1000000001e1_dp*t68*t365*t529 - 0.3333333336e0_dp &
1573 *t68*t60*t1449 - 0.2222222224e0_dp*t24*t98*t1553) &
1581 END SUBROUTINE xb88_lr_lsd_calc
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public becke1988
various utilities that regard array of different kinds: output, allocation,... maybe it is not a good...
Defines the basic variable types.
integer, parameter, public dp
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
real(kind=dp), parameter, public rootpi
Module with functions to handle derivative descriptors. derivative description are strings have the f...
integer, parameter, public deriv_norm_drho
integer, parameter, public deriv_norm_drhoa
integer, parameter, public deriv_rhob
integer, parameter, public deriv_rhoa
integer, parameter, public deriv_rho
integer, parameter, public deriv_norm_drhob
represent a group ofunctional derivatives
type(xc_derivative_type) function, pointer, public xc_dset_get_derivative(derivative_set, description, allocate_deriv)
returns the requested xc_derivative
Provides types for the management of the xc-functionals and their derivatives.
subroutine, public xc_derivative_get(deriv, split_desc, order, deriv_data, accept_null_data)
returns various information on the given derivative
subroutine, public xc_rho_set_get(rho_set, can_return_null, rho, drho, norm_drho, rhoa, rhob, norm_drhoa, norm_drhob, rho_1_3, rhoa_1_3, rhob_1_3, laplace_rho, laplace_rhoa, laplace_rhob, drhoa, drhob, rho_cutoff, drho_cutoff, tau_cutoff, tau, tau_a, tau_b, local_bounds)
returns the various attributes of rho_set
calculates the longrange part of Becke 88 exchange functional
subroutine, public xb88_lr_lda_eval(rho_set, deriv_set, grad_deriv, xb88_lr_params)
evaluates the becke 88 longrange exchange functional for lda
subroutine, public xb88_lr_lsd_info(reference, shortform, needs, max_deriv)
return various information on the functional
subroutine, public xb88_lr_lda_info(reference, shortform, needs, max_deriv)
return various information on the functional
subroutine, public xb88_lr_lsd_eval(rho_set, deriv_set, grad_deriv, xb88_lr_params)
evaluates the becke 88 longrange exchange functional for lsd
represent a pointer to a contiguous 3d array
A derivative set contains the different derivatives of a xc-functional in form of a linked list.
represent a derivative of a functional
contains a flag for each component of xc_rho_set, so that you can use it to tell which components you...
represent a density, with all the representation and data needed to perform a functional evaluation