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
61 TYPE(xc_rho_cflags_type),
INTENT(inout),
OPTIONAL :: needs
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
91 TYPE(xc_rho_cflags_type),
INTENT(inout),
OPTIONAL :: needs
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 TYPE(xc_rho_set_type),
INTENT(IN) :: rho_set
124 TYPE(xc_derivative_set_type),
INTENT(IN) :: deriv_set
125 INTEGER,
INTENT(in) :: grad_deriv
126 TYPE(section_vals_type),
POINTER :: xb88_lr_params
128 CHARACTER(len=*),
PARAMETER :: routinen =
'xb88_lr_lda_eval'
130 INTEGER :: handle, npoints
131 INTEGER,
DIMENSION(2, 3) :: bo
132 REAL(kind=
dp) :: epsilon_rho, omega, sx
133 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :),
POINTER :: dummy, e_0, e_ndrho, &
134 e_ndrho_ndrho, e_ndrho_ndrho_ndrho, e_ndrho_ndrho_rho, e_ndrho_rho, e_ndrho_rho_rho, &
135 e_rho, e_rho_rho, e_rho_rho_rho, norm_drho, rho
136 TYPE(xc_derivative_type),
POINTER :: deriv
138 CALL timeset(routinen, handle)
146 norm_drho=norm_drho, local_bounds=bo, rho_cutoff=epsilon_rho)
147 npoints = (bo(2, 1) - bo(1, 1) + 1)*(bo(2, 2) - bo(1, 2) + 1)*(bo(2, 3) - bo(1, 3) + 1)
158 e_ndrho_ndrho => dummy
159 e_rho_rho_rho => dummy
160 e_ndrho_rho_rho => dummy
161 e_ndrho_ndrho_rho => dummy
162 e_ndrho_ndrho_ndrho => dummy
164 IF (grad_deriv >= 0)
THEN
166 allocate_deriv=.true.)
169 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
171 allocate_deriv=.true.)
174 allocate_deriv=.true.)
177 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
179 allocate_deriv=.true.)
182 allocate_deriv=.true.)
188 IF (grad_deriv >= 3 .OR. grad_deriv == -3)
THEN
190 allocate_deriv=.true.)
202 IF (grad_deriv > 3 .OR. grad_deriv < -3)
THEN
203 cpabort(
"derivatives bigger than 3 not implemented")
213 CALL xb88_lr_lda_calc(rho=rho, norm_drho=norm_drho, &
214 e_0=e_0, e_rho=e_rho, e_ndrho=e_ndrho, e_rho_rho=e_rho_rho, &
215 e_ndrho_rho=e_ndrho_rho, e_ndrho_ndrho=e_ndrho_ndrho, &
216 e_rho_rho_rho=e_rho_rho_rho, e_ndrho_rho_rho=e_ndrho_rho_rho, &
217 e_ndrho_ndrho_rho=e_ndrho_ndrho_rho, &
218 e_ndrho_ndrho_ndrho=e_ndrho_ndrho_ndrho, grad_deriv=grad_deriv, &
219 npoints=npoints, epsilon_rho=epsilon_rho, &
224 CALL timestop(handle)
254 SUBROUTINE xb88_lr_lda_calc(rho, norm_drho, &
255 e_0, e_rho, e_ndrho, e_rho_rho, e_ndrho_rho, &
256 e_ndrho_ndrho, e_rho_rho_rho, e_ndrho_rho_rho, e_ndrho_ndrho_rho, &
257 e_ndrho_ndrho_ndrho, grad_deriv, npoints, epsilon_rho, sx, &
259 INTEGER,
INTENT(in) :: npoints, grad_deriv
260 REAL(kind=
dp),
DIMENSION(1:npoints),
INTENT(inout) :: e_ndrho_ndrho_ndrho, &
261 e_ndrho_ndrho_rho, e_ndrho_rho_rho, e_rho_rho_rho, e_ndrho_ndrho, e_ndrho_rho, e_rho_rho, &
263 REAL(kind=
dp),
DIMENSION(1:npoints),
INTENT(in) :: norm_drho, rho
264 REAL(kind=
dp),
INTENT(in) :: epsilon_rho, sx, omega
267 REAL(kind=
dp) :: cx, epsilon_rho43, my_epsilon_rho, my_ndrho, my_rho, t1, t10, t100, t1002, &
268 t1009, t101, t1013, t103, t104, t1044, t105, t1069, t109, t1091, t11, t1102, t112, t113, &
269 t1136, t1141, t1146, t1153, t1156, t116, t1163, t1167, t117, t1177, t118, t12, t122, &
270 t1220, t126, t127, t128, t1284, t130, t132, t133, t1334, t1341, t1345, t135, t136, t137, &
271 t1370, t1396, t140, t1400, t1404, t1405, t141, t1412, t143, t1449, t1456, t146, t1467, &
272 t147, t1472, t148, t151, t155, t1553, t16, t168, t169, t17, t172, t173, t176, t177, t18, &
273 t185, t186, t190, t196, t2, t200, t207, t21, t211, t212, t213
274 REAL(kind=
dp) :: t216, t219, t22, t221, t222, t225, t226, t23, t230, t231, t232, t233, t237, &
275 t24, t241, t244, t245, t250, t251, t254, t255, t258, t259, t26, t264, t265, t27, t270, &
276 t271, t28, t281, t284, t285, t289, t29, t293, t297, t3, t30, t304, t31, t311, t312, t313, &
277 t316, t319, t321, t323, t325, t326, t328, t330, t335, t339, t34, t343, t346, t347, t351, &
278 t354, t358, t36, t365, t368, t37, t372, t377, t38, t382, t383, t384, t39, t393, t397, &
279 t40, t400, t401, t404, t405, t408, t41, t412, t413, t417, t418, t42, t428, t429, t43, &
280 t435, t44, t451, t452, t455, t457, t46, t460, t462, t463, t464
281 REAL(kind=
dp) :: t465, t466, t467, t47, t470, t473, t478, t479, t48, t482, t486, t489, t49, &
282 t492, t496, t5, t501, t502, t505, t508, t51, t513, t514, t519, t52, t521, t525, t526, &
283 t529, t530, t533, t534, t536, t537, t539, t55, t562, t566, t570, t571, t572, t573, t574, &
284 t575, t576, t580, t586, t59, t590, t6, t60, t601, t605, t606, t613, t624, t628, t632, &
285 t639, t64, t640, t641, t657, t667, t669, t677, t68, t687, t69, t7, t71, t716, t72, t722, &
286 t735, t739, t746, t75, t76, t769, t77, t79, t791, t793, t8, t838, t84, t842, t846, t85, &
287 t857, t86, t860, t867, t87, t880, t90, t91, t933, t94, t95, t961
288 REAL(kind=
dp) :: t98, t99, xx
290 my_epsilon_rho = epsilon_rho
291 epsilon_rho43 = my_epsilon_rho**(4.0_dp/3.0_dp)
292 cx = 1.5_dp*(3.0_dp/4.0_dp/
pi)**(1.0_dp/3.0_dp)
297 my_rho = rho(ii)*0.5_dp
298 my_ndrho = norm_drho(ii)*0.5_dp
299 IF (my_rho > my_epsilon_rho)
THEN
300 IF (grad_deriv >= 0)
THEN
301 t1 = my_rho**(0.1e1_dp/0.3e1_dp)
304 xx = my_ndrho*max(t3, epsilon_rho43)
311 t12 = log(xx + sqrt(xx**0.2e1_dp + 0.1e1_dp))
312 t16 = 0.10e1_dp + 0.60e1_dp*t11*t3*t12
315 t21 = 0.20e1_dp*cx + 0.20e1_dp*t6*t18
325 t34 = erf(0.3000000000e1_dp*t30*t31)
335 t46 = exp(-0.8999999998e1_dp*t44)
339 t51 = t46 - 0.10e1_dp
341 t55 = t46 - 0.15e1_dp - 0.5555555558e-1_dp*t47*t52
342 t59 = t26*t34 + 0.3333333334e0_dp*t36*t38*t55
346 e_0(ii) = e_0(ii) - 0.2222222224e0_dp*t24*omega*t60*sx*2.0_dp
349 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
351 t68 = my_rho*t22*omega
353 t71 = 0.1e1_dp/t8/t69
363 t90 = -0.8000000000e1_dp*t11*t79*t12 - 0.8000000000e1_dp*t6*t87
365 t94 = -0.5333333333e1_dp*t6*t72 - 0.20e1_dp*t6*t91
368 t99 = sqrt(0.3141592654e1_dp)
371 t103 = exp(-0.9000000000e1_dp*t44)
375 t112 = -0.1500000000e1_dp*t105*t31*t94 + 0.1000000000e1_dp*t30* &
388 t135 = 0.8999999998e1_dp*t130 - 0.5999999999e1_dp*t133
397 t151 = t136 - 0.5555555558e-1_dp*t137*t52 + 0.3703703705e-1_dp*t47 &
398 *t143 - 0.5555555558e-1_dp*t146*t148
399 t155 = real(2*t101*t113, kind=
dp) + 0.1666666667e0_dp*t117*t118*t94 - &
400 0.1111111111e0_dp*t36*t122*t55 + 0.3333333334e0_dp*t36*t38* &
403 e_rho(ii) = e_rho(ii) + (-0.2222222224e0_dp*t64*t60 - 0.3333333336e0_dp*t68*t95 - &
404 0.2222222224e0_dp*t24*t98*t155)*sx
406 t168 = 0.60e1_dp*beta*t3*t12 + 0.60e1_dp*t11*t10*t86
408 t172 = 0.40e1_dp*t11*t18 - 0.20e1_dp*t6*t169
415 t196 = 0.8999999998e1_dp*t185*t186*t46 - 0.5555555558e-1_dp*t190 &
416 *t52 - 0.5000000001e0_dp*t41*t172*t46
417 t200 = -0.3000000000e1_dp*t177*t105*t1*t172 + 0.1666666667e0_dp* &
418 t117*t118*t172 + 0.3333333334e0_dp*t36*t38*t196
420 e_ndrho(ii) = e_ndrho(ii) + (-0.3333333336e0_dp*t68*t173 - 0.2222222224e0_dp*t24*t98 &
424 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
426 t211 = my_rho*t29*omega
431 t221 = 0.1e1_dp/t8/t219
435 t230 = 0.1e1_dp/t75/t16
439 t237 = 0.1e1_dp/t1/t69
443 t250 = 0.1e1_dp/t85/t84
444 t251 = 0.1e1_dp/t1/t219/t69*t250
445 t254 = 0.1866666667e2_dp*t11*t237*t12 + 0.4000000000e2_dp*t6*t241 &
446 - 0.1066666667e2_dp*t245*t251
448 t258 = 0.1955555555e2_dp*t6*t222 + 0.1066666667e2_dp*t6*t226 + 0.40e1_dp &
449 *t6*t233 - 0.20e1_dp*t6*t255
451 t264 = 0.9000000000e1_dp*t130 - 0.6000000000e1_dp*t133
453 t270 = 0.1e1_dp/t22/t126
456 t284 = 0.2250000000e1_dp*t271*t31*t212 - 0.1000000000e1_dp*t105* &
457 t109*t94 - 0.1500000000e1_dp*t105*t31*t258 - 0.6666666667e0_dp &
460 t289 = omega*t104*t27
467 t316 = 0.1800000000e2_dp*t313*t43*t212
468 t319 = 0.1200000000e2_dp*t128*t132*t94
471 t325 = 0.2000000000e1_dp*t42*t323
472 t326 = -t316 + t319 + 0.8999999998e1_dp*t321 + t325
481 t354 = t326*t46 + t328*t46 - 0.5555555558e-1_dp*t330*t52 + 0.7407407410e-1_dp &
482 *t137*t143 - 0.1111111112e0_dp*t335*t148 - 0.6172839508e-1_dp &
483 *t47*t339 + 0.7407407410e-1_dp*t146*t343 - 0.5555555558e-1_dp &
484 *t146*t347 - 0.5555555558e-1_dp*t146*t351
485 t358 = real(2*t101*t265*t112, kind=
dp) + real(2*t101*t285, kind=
dp) - 0.8333333335e-1_dp &
486 *t289*t118*t212 - 0.1111111111e0_dp*t117*t293*t94 &
487 + 0.3333333334e0_dp*t117*t297*t94 + 0.1666666667e0_dp*t117* &
488 t118*t258 + 0.1481481481e0_dp*t36*t304*t55 - 0.2222222222e0_dp* &
489 t36*t122*t151 + 0.3333333334e0_dp*t36*t38*t354
491 e_rho_rho(ii) = e_rho_rho(ii) + (-0.6666666672e0_dp*t36*t95 - 0.4444444448e0_dp*t64*t207 - &
492 0.1666666668e0_dp*t211*t213 - 0.6666666672e0_dp*t68*t216 - 0.3333333336e0_dp &
493 *t68*t259 - 0.2222222224e0_dp*t24*t98*t358)*sx
502 t393 = beta*t5*my_ndrho
503 t397 = 0.1e1_dp/t1/t219/t7*t250
504 t400 = -0.8000000000e1_dp*beta*t79*t12 - 0.2400000000e2_dp*t11* &
505 t87 + 0.8000000000e1_dp*t393*t397
507 t404 = -0.1066666667e2_dp*t11*t72 + 0.5333333333e1_dp*t6*t377 - 0.40e1_dp &
508 *t11*t91 + 0.40e1_dp*t382*t384 - 0.20e1_dp*t6*t401
515 t428 = 0.2250000000e1_dp*t417*t418*t172 - 0.1500000000e1_dp*t105 &
516 *t31*t404 - 0.5000000000e0_dp*t105*t109*t172
521 t455 = 0.1800000000e2_dp*t451*t452*t172
523 t460 = t128*t132*t172
524 t462 = -t455 + 0.8999999998e1_dp*t457 + 0.5999999999e1_dp*t460
532 t478 = 0.1e1_dp/my_rho
537 t492 = t463 + 0.8999999998e1_dp*t465*t467 - 0.5555555558e-1_dp*t470 &
538 *t52 - 0.5000000001e0_dp*t473*t466 + 0.3703703705e-1_dp*t190*t143 &
539 + 0.3333333334e0_dp*t479*t466 - 0.5555555558e-1_dp*t482*t148 &
540 - 0.5555555558e-1_dp*t146*t486 - 0.5000000001e0_dp*t489*t466
541 t496 = 0.1800000000e2_dp*t413*t186*t113 + real(2*t101*t429, kind=
dp) &
542 - 0.8333333335e-1_dp*t289*t118*t368 + 0.1666666667e0_dp*t117*t435 &
543 *t94 + 0.1666666667e0_dp*t117*t118*t404 - 0.5555555555e-1_dp &
544 *t117*t293*t172 - 0.1111111111e0_dp*t36*t122*t196 + 0.1666666667e0_dp &
545 *t117*t297*t172 + 0.3333333334e0_dp*t36*t38*t492
547 e_ndrho_rho(ii) = e_ndrho_rho(ii) + (-0.3333333336e0_dp*t36*t173 - 0.2222222224e0_dp*t64*t365 - &
548 0.1666666668e0_dp*t211*t60*t368 - 0.3333333336e0_dp*t68*t372 &
549 - 0.3333333336e0_dp*t68*t405 - 0.3333333336e0_dp*t68*t408 - 0.2222222224e0_dp &
559 t521 = 0.1e1_dp/t1/t519
560 t525 = 0.120e2_dp*t508*t86 - 0.60e1_dp*t6*t521*t250
562 t529 = 0.40e1_dp*t508*t17 - 0.80e1_dp*t11*t169 + 0.40e1_dp*t6*t514 &
567 t536 = 0.1e1_dp/t39/omega
569 t539 = 0.1e1_dp/t22/t311
580 t586 = -0.2250000000e2_dp*t451*t562*t46 + 0.8999999998e1_dp*t185 &
581 *t566*t46 + 0.8099999996e2_dp*t575*t576*t46 - 0.5555555558e-1_dp &
582 *t580*t52 - 0.5000000001e0_dp*t41*t529*t46
583 t590 = -0.2700000000e2_dp*t537*t539*my_rho*t501*t103 + 0.4500000000e1_dp &
584 *t177*t271*t1*t501 - 0.3000000000e1_dp*t177*t105* &
585 t1*t529 - 0.8333333335e-1_dp*t289*t118*t501 + 0.3333333334e0_dp &
586 *t117*t435*t172 + 0.1666666667e0_dp*t117*t118*t529 + 0.3333333334e0_dp &
589 e_ndrho_ndrho(ii) = e_ndrho_ndrho(ii) + (-0.1666666668e0_dp*t211*t502 - 0.6666666672e0_dp*t68*t505 &
590 - 0.3333333336e0_dp*t68*t530 - 0.2222222224e0_dp*t24*t98*t590) &
594 IF (grad_deriv >= 3 .OR. grad_deriv == -3)
THEN
596 t605 = my_rho*t104*omega
599 t624 = 0.1e1_dp/t8/t519
607 t669 = 0.1e1_dp/t85/t667
608 t677 = -0.9125925923e2_dp*t6*t624*t17 - 0.5866666667e2_dp*t6*t628 &
609 *t90 - 0.3200000001e2_dp*t6*t632*t232 + 0.1600000000e2_dp*t6 &
610 *t225*t254 - 0.120e2_dp*t6*t641*t232*t90 + 0.120e2_dp*t382 &
611 *t383*t254 - 0.20e1_dp*t6*t77*(-0.6222222223e2_dp*t11/t1/ &
612 t219*t12 - 0.2115555556e3_dp*t6*t624*t86 + 0.1315555556e3_dp* &
613 t245/t1/t657*t250 - 0.4266666668e2_dp*beta*t244*t5/t657 &
617 t722 = omega*t270*t27
622 t791 = 0.5400000000e2_dp*t769*t43*t606 - 0.3600000000e2_dp*t313* &
623 t132*t212 - 0.5400000000e2_dp*t451*t452*t258 - 0.6000000000e1_dp &
624 *t128*t323*t94 + 0.1800000000e2_dp*t128*t132*t258 + 0.8999999998e1_dp &
625 *t128*t43*t677 - 0.2666666667e1_dp*t42*
pi*t79
627 t838 = real(3*t326*t135*t46, kind=
dp) + real(t791*t46, kind=
dp) + real(t793* &
628 t46, kind=
dp) - 0.5555555558e-1_dp*t39*t677*t52 + 0.1111111112e0_dp*t330 &
629 *t143 - 0.1666666668e0_dp*t330*t48*t148 - 0.1851851853e0_dp*t137 &
630 *t339 + 0.2222222223e0_dp*t335*t343 - 0.1666666668e0_dp*t335* &
631 t347 - 0.1666666668e0_dp*t335*t351 + 0.1646090535e0_dp*t47*t48 &
632 *t71*t51 - 0.1851851853e0_dp*real(t146, kind=
dp)*real(t10, kind=
dp)*real(t135, kind=
dp) &
633 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t326, kind=
dp) &
634 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t328, kind=
dp) &
635 *real(t46, kind=
dp) - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t791, kind=
dp) &
636 *real(t46, kind=
dp) - 0.1666666668e0_dp*real(t146, kind=
dp)*real(t346, kind=
dp)*real(t136, kind=
dp) &
637 - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t793, kind=
dp)* &
639 t842 = 0.2e1_dp*t101*(-t316 + t319 + 0.9000000000e1_dp*t321 + t325) &
640 *t103*t112 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp*t687*t31 &
641 *t606 + 0.2250000000e1_dp*t271*t109*t212 + 0.6750000000e1_dp* &
642 t417*t418*t258 + 0.1000000000e1_dp*t105*t281*t94 - 0.1500000000e1_dp &
643 *t105*t109*t258 - 0.1500000000e1_dp*t105*t31*t677 &
644 + 0.1111111111e1_dp*t30*t26*t10) + 0.4e1_dp*t101*t265*t284 + &
645 0.2e1_dp*t101*t716*t103*t112 + 0.1250000000e0_dp*t722*t118 &
646 *t606 + 0.8333333333e-1_dp*t289*t293*t212 - 0.2500000000e0_dp*t289 &
647 *t297*t212 - 0.2500000000e0_dp*t289*t118*t613 + 0.2222222222e0_dp &
648 *t117*t735*t94 - 0.3333333333e0_dp*t117*t739*t94 - &
649 0.1666666667e0_dp*t117*t293*t258 + 0.5000000001e0_dp*t117*t746 &
650 *t94 + 0.5000000001e0_dp*t117*t297*t258 + 0.1666666667e0_dp*t117 &
651 *t118*t677 - 0.3456790122e0_dp*t36*t27*t237*t55 + 0.4444444444e0_dp &
652 *t36*t304*t151 - 0.3333333333e0_dp*t36*t122*t354 &
653 + 0.3333333334e0_dp*t36*t38*t838
654 t846 = -0.5000000004e0_dp*t116*t213 - 0.2000000001e1_dp*t36*t216 &
655 - 0.1000000001e1_dp*t36*t259 - 0.6666666672e0_dp*t64*t601 + 0.8333333340e-1_dp &
656 *t605*t60*t606 - 0.5000000004e0_dp*t211*t207*t212 &
657 - 0.5000000004e0_dp*t211*t60*t613 - 0.1000000001e1_dp*t68* &
658 t601*t94 - 0.1000000001e1_dp*t68*t207*t258 - 0.3333333336e0_dp* &
659 t68*t60*t677 - 0.2222222224e0_dp*t24*t98*t842
661 e_rho_rho_rho(ii) = e_rho_rho_rho(ii) + t846*sx
667 t933 = 0.3911111110e2_dp*t11*t222 - 0.1955555555e2_dp*t6*t628*t168 &
668 + 0.2133333334e2_dp*t11*t226 - 0.2133333334e2_dp*t6*t71*t384 &
669 + 0.1066666667e2_dp*t6*t225*t400 + 0.80e1_dp*t11*t233 - 0.120e2_dp &
670 *t382*t640*t232*t168 + 0.80e1_dp*t382*t383*t400 - 0.40e1_dp &
671 *t11*t255 + 0.40e1_dp*t382*t230*t254*t168 - 0.20e1_dp* &
672 t6*t77*(0.1866666667e2_dp*beta*t237*t12 + 0.9866666667e2_dp* &
673 t11*t241 - 0.8266666668e2_dp*t393*t251 + 0.3200000001e2_dp*beta &
674 *t244*my_ndrho/t657/t7*t669)
677 t1009 = 0.2e1_dp*t101*(-t455 + 0.9000000000e1_dp*t457 + 0.6000000000e1_dp &
678 *t460)*t103*t112 + 0.1800000000e2_dp*t412*t264*t40*t127 &
679 *t8*t172*t103*t112 + 0.2e1_dp*t101*t265*t428 + 0.1800000000e2_dp &
680 *t413*t186*t285 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp &
681 *t961*t1*t212*t172 + 0.4500000000e1_dp*t417*t418*t404 &
682 + 0.1500000000e1_dp*t417*t49*t94*t172 - 0.1000000000e1_dp* &
683 t105*t109*t404 + 0.2250000000e1_dp*t417*t1*t258*t172 - 0.1500000000e1_dp &
684 *t105*t31*t933 + 0.3333333334e0_dp*t105*t281* &
685 t172) + 0.1250000000e0_dp*t722*t118*t860 - 0.8333333335e-1_dp*t289 &
686 *t435*t212 - 0.1666666667e0_dp*t289*t118*t867 + 0.5555555555e-1_dp &
687 *t289*t293*t368 - 0.1111111111e0_dp*t117*t1002*t94 &
688 - 0.1111111111e0_dp*t117*t293*t404
691 t1069 = 0.5400000000e2_dp*t1044*t8*t212*t172 - 0.3600000000e2_dp &
692 *t451*t452*t404 - 0.2400000000e2_dp*t451*t37*t94*t172 + &
693 0.1200000000e2_dp*t128*t132*t404 - 0.1800000000e2_dp*t451*t8* &
694 t258*t172 + 0.8999999998e1_dp*t128*t43*t933 - 0.2000000000e1_dp &
696 t1091 = t127*t172*t46
697 t1102 = t1069*t46 + 0.8999999998e1_dp*t326*t40*t127*t467 + real(2 &
698 *t136*t462, kind=
dp) + 0.8999999998e1_dp*t328*t40*t127*t467 - &
699 0.5555555558e-1_dp*t39*t933*t52 - 0.5000000001e0_dp*t258*t127 &
700 *t466 + 0.7407407410e-1_dp*t470*t143 + 0.6666666668e0_dp*t94*t478 &
701 *t1091 - 0.1111111112e0_dp*t470*t48*t148 - 0.1111111112e0_dp &
702 *t335*t486 - 0.1000000001e1_dp*t94*t135*t1091
703 t1136 = -0.6172839508e-1_dp*t190*t339 - 0.5555555556e0_dp*t41/t7 &
704 *t466 + 0.7407407410e-1_dp*t482*t343 + 0.7407407410e-1_dp*t146* &
705 t141*t462*t46 + 0.6666666668e0_dp*t479*t135*t172*t46 - 0.5555555558e-1_dp &
706 *t482*t347 - 0.5555555558e-1_dp*t146*t49*t1069 &
707 *t46 - 0.5000000001e0_dp*t41*t326*t466 - 0.5555555558e-1_dp*t482 &
708 *t351 - 0.1111111112e0_dp*t146*t147*t463 - 0.5000000001e0_dp* &
710 t1141 = -0.1666666667e0_dp*t289*t297*t368 + 0.3333333334e0_dp*t117 &
711 *t1013*t94 + 0.3333333334e0_dp*t117*t297*t404 - 0.8333333335e-1_dp &
712 *t289*t118*t880 + 0.1666666667e0_dp*t117*t435*t258 + &
713 0.1666666667e0_dp*t117*t118*t933 + 0.7407407405e-1_dp*t117*t735 &
714 *t172 + 0.1481481481e0_dp*t36*t304*t196 - 0.1111111111e0_dp* &
715 t117*t739*t172 - 0.2222222222e0_dp*t36*t122*t492 + 0.1666666667e0_dp &
716 *t117*t746*t172 + 0.3333333334e0_dp*t36*t38*(t1102 &
718 t1146 = -0.3333333336e0_dp*t117*t59*t94*t172 - 0.6666666672e0_dp &
719 *t36*t372 - 0.6666666672e0_dp*t36*t405 - 0.6666666672e0_dp*t36 &
720 *t408 - 0.4444444448e0_dp*t64*t857 + 0.8333333340e-1_dp*t605*t60 &
721 *t860 - 0.1666666668e0_dp*t211*t365*t212 - 0.3333333336e0_dp* &
722 t211*t60*t867 - 0.3333333336e0_dp*t211*t207*t368 - 0.6666666672e0_dp &
723 *t68*t857*t94 - 0.6666666672e0_dp*t68*t207*t404 - 0.1666666668e0_dp &
724 *t211*t60*t880 - 0.3333333336e0_dp*t68*t365* &
725 t258 - 0.3333333336e0_dp*t68*t60*t933 - 0.3333333336e0_dp*t68* &
726 t601*t172 - 0.2222222224e0_dp*t24*t98*(t1009 + t1141)
728 e_ndrho_rho_rho(ii) = e_ndrho_rho_rho(ii) + t1146*sx
735 t1220 = -0.1066666667e2_dp*t1177*t17 + 0.2133333334e2_dp*t11*t377 &
736 - 0.1066666667e2_dp*t6*t632*t513 + 0.5333333333e1_dp*t6*t225 &
737 *t525 - 0.40e1_dp*t508*t76*t90 + 0.160e2_dp*t11*t10*t384 - &
738 0.80e1_dp*t11*t401 - 0.120e2_dp*t382*t640*t90*t513 + 0.80e1_dp &
739 *t382*t230*t400*t168 + 0.40e1_dp*t382*t383*t525 - 0.20e1_dp &
740 *t6*t77*(-0.3200000000e2_dp*t1177*t86 + 0.4800000000e2_dp*t6 &
741 *t397 - 0.2400000000e2_dp*t245/t657/my_rho*t669)
743 t1334 = 0.5400000000e2_dp*t1044*t452*t501 - 0.3600000000e2_dp*t451 &
744 *t8*t404*t172 - 0.1800000000e2_dp*t451*t452*t529 + 0.8999999998e1_dp &
745 *t128*t43*t1220 - 0.1200000000e2_dp*t313*t132*t501 &
746 + 0.5999999999e1_dp*t128*t132*t529
750 t1396 = t1334*t46 + 0.1800000000e2_dp*t462*t40*t127*t467 - 0.2250000000e2_dp &
751 *t464*t312*t43*t1341 + 0.8999999998e1_dp*t465 &
752 *t43*t1345 - 0.1000000000e1_dp*t404*t127*t466 + 0.8099999996e2_dp &
753 *t135*t571*t573*t533*t2*t1341 - 0.5555555558e-1_dp*t39 &
754 *t1220*t52 - 0.5000000001e0_dp*t473*t1345 + 0.3333333334e0_dp* &
755 t479*t1345 + 0.1000000000e1_dp*t94*t312*t1341 - 0.4500000000e1_dp &
756 *t94*t573*t501*t1370*t8*t46 + 0.3703703705e-1_dp*t580 &
757 *t143 + 0.3000000000e1_dp*t312*t37*t501*t1370*t46 - 0.5555555558e-1_dp &
758 *t580*t48*t148 - 0.1111111112e0_dp*t482*t486 - 0.5555555558e-1_dp &
759 *t146*t49*t1334*t46 - 0.1000000000e1_dp*t41* &
760 t462*t466 - 0.5000000001e0_dp*t489*t1345
761 t1400 = -0.3600000000e2_dp*t412*t313*t562*t113 + 0.1800000000e2_dp &
762 *t413*t566*t113 + 0.3600000000e2_dp*t413*t186*t429 + 0.1620000000e3_dp &
763 *t26*t533*t100*t574*t576*t113 + 0.2e1_dp*t101 &
764 *t103*(-0.5625000000e1_dp*t961*t418*t501 + 0.4500000000e1_dp &
765 *t417*t1*t404*t172 + 0.2250000000e1_dp*t417*t418*t529 - &
766 0.1500000000e1_dp*t105*t31*t1220 + 0.7500000000e0_dp*t271*t109 &
767 *t501 - 0.5000000000e0_dp*t105*t109*t529) + 0.1250000000e0_dp* &
768 t722*t118*t1156 - 0.1666666667e0_dp*t289*t435*t368 - 0.1666666667e0_dp &
769 *t289*t118*t1163 - 0.8333333335e-1_dp*t289*t118*t1167 &
770 + 0.1666666667e0_dp*t117*t1284*t94 + 0.3333333334e0_dp*t117 &
771 *t435*t404 + 0.1666666667e0_dp*t117*t118*t1220 + 0.2777777778e-1_dp &
772 *t289*t293*t501 - 0.1111111111e0_dp*t117*t1002*t172 &
773 - 0.5555555555e-1_dp*t117*t293*t529 - 0.1111111111e0_dp*t36*t122 &
774 *t586 - 0.8333333335e-1_dp*t289*t297*t501 + 0.3333333334e0_dp &
775 *t117*t1013*t172 + 0.1666666667e0_dp*t117*t297*t529 + 0.3333333334e0_dp &
777 t1404 = -0.1666666668e0_dp*t116*t502 - 0.6666666672e0_dp*t36*t505 &
778 - 0.3333333336e0_dp*t36*t530 - 0.2222222224e0_dp*t64*t1153 + 0.8333333340e-1_dp &
779 *t605*t60*t1156 - 0.3333333336e0_dp*t211*t365 &
780 *t368 - 0.3333333336e0_dp*t211*t60*t1163 - 0.1666666668e0_dp*t211 &
781 *t60*t1167 - 0.3333333336e0_dp*t68*t1153*t94 - 0.6666666672e0_dp &
782 *t68*t365*t404 - 0.3333333336e0_dp*t68*t60*t1220 - 0.1666666668e0_dp &
783 *t211*t207*t501 - 0.6666666672e0_dp*t68*t857* &
784 t172 - 0.3333333336e0_dp*t68*t207*t529 - 0.2222222224e0_dp*t24* &
787 e_ndrho_ndrho_rho(ii) = e_ndrho_ndrho_rho(ii) + t1404*sx
791 t1449 = -0.120e2_dp*t508*t76*t168 + 0.240e2_dp*t11*t514 - 0.120e2_dp &
792 *t11*t526 - 0.120e2_dp*t6*t641*t513*t168 + 0.120e2_dp*t382 &
793 *t230*t168*t525 - 0.20e1_dp*t6*t77*(-0.240e2_dp*beta*t521 &
794 *t250*my_ndrho + 0.180e2_dp*t393/t657*t669)
798 t1553 = 0.1350000000e3_dp*t537/t22/t572*my_rho*t1456 - 0.8100000000e2_dp &
799 *t534*t536*t539*my_rho*t172*t103*t529 - 0.2430000000e3_dp &
800 *t1467*t100/t570/omega/t22/t1472*t140*t1456 - &
801 0.1125000000e2_dp*t177*t687*t1*t1405 + 0.1350000000e2_dp*t176 &
802 *t103*t28*t270*t1*t1412 - 0.3000000000e1_dp*t177*t105* &
803 t1*t1449 + 0.1250000000e0_dp*t722*t118*t1405 - 0.2500000000e0_dp &
804 *t289*t435*t501 - 0.2500000000e0_dp*t289*t118*t1412 + 0.5000000001e0_dp &
805 *t117*t1284*t172 + 0.5000000001e0_dp*t117*t435 &
806 *t529 + 0.1666666667e0_dp*t117*t118*t1449 + 0.3333333334e0_dp*t36 &
807 *t38*(0.6750000000e2_dp*t1044*t8*t1405*t46 - 0.6750000000e2_dp &
808 *t451*t186*t1345 - 0.5264999998e3_dp*t571/t1472*t533 &
809 *t2*t1405*t46 + 0.8999999998e1_dp*t185*t8*t1449*t46 + 0.2429999999e3_dp &
810 *t575*t2*t529*t466 + 0.7289999995e3_dp/t570/t39 &
811 /t572/t126*t1467*t7*t1405*t46 - 0.5555555558e-1_dp*t39 &
812 *t1449*t52 - 0.5000000001e0_dp*t41*t1449*t46)
814 e_ndrho_ndrho_ndrho(ii) = e_ndrho_ndrho_ndrho(ii) + (0.8333333340e-1_dp*t605*t60*t1405 - &
815 0.5000000004e0_dp*t211*t365*t501 - 0.5000000004e0_dp*t211*t60*t1412 - 0.1000000001e1_dp &
816 *t68*t1153*t172 - 0.1000000001e1_dp*t68*t365*t529 - 0.3333333336e0_dp &
817 *t68*t60*t1449 - 0.2222222224e0_dp*t24*t98*t1553) &
825 END SUBROUTINE xb88_lr_lda_calc
838 TYPE(xc_rho_set_type),
INTENT(IN) :: rho_set
839 TYPE(xc_derivative_set_type),
INTENT(IN) :: deriv_set
840 INTEGER,
INTENT(in) :: grad_deriv
841 TYPE(section_vals_type),
POINTER :: xb88_lr_params
843 CHARACTER(len=*),
PARAMETER :: routinen =
'xb88_lr_lsd_eval'
845 INTEGER :: handle, i, ispin, npoints
846 INTEGER,
DIMENSION(2, 3) :: bo
847 REAL(kind=
dp) :: epsilon_rho, omega, sx
848 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :), &
849 POINTER :: dummy, e_0
850 TYPE(cp_3d_r_cp_type),
DIMENSION(2) :: e_ndrho, e_ndrho_ndrho, e_ndrho_ndrho_ndrho, &
851 e_ndrho_ndrho_rho, e_ndrho_rho, e_ndrho_rho_rho, e_rho, e_rho_rho, e_rho_rho_rho, &
853 TYPE(xc_derivative_type),
POINTER :: deriv
855 CALL timeset(routinen, handle)
861 NULLIFY (norm_drho(i)%array, rho(i)%array)
869 rhob=rho(2)%array, norm_drhoa=norm_drho(1)%array, &
870 norm_drhob=norm_drho(2)%array, rho_cutoff=epsilon_rho, &
872 npoints = (bo(2, 1) - bo(1, 1) + 1)*(bo(2, 2) - bo(1, 2) + 1)*(bo(2, 3) - bo(1, 3) + 1)
876 dummy => rho(1)%array
880 e_rho(i)%array => dummy
881 e_ndrho(i)%array => dummy
882 e_rho_rho(i)%array => dummy
883 e_ndrho_rho(i)%array => dummy
884 e_ndrho_ndrho(i)%array => dummy
885 e_rho_rho_rho(i)%array => dummy
886 e_ndrho_rho_rho(i)%array => dummy
887 e_ndrho_ndrho_rho(i)%array => dummy
888 e_ndrho_ndrho_ndrho(i)%array => dummy
891 IF (grad_deriv >= 0)
THEN
893 allocate_deriv=.true.)
896 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
898 allocate_deriv=.true.)
901 allocate_deriv=.true.)
904 allocate_deriv=.true.)
907 allocate_deriv=.true.)
910 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
912 allocate_deriv=.true.)
915 allocate_deriv=.true.)
918 allocate_deriv=.true.)
921 allocate_deriv=.true.)
930 IF (grad_deriv >= 3 .OR. grad_deriv == -3)
THEN
932 allocate_deriv=.true.)
935 allocate_deriv=.true.)
956 IF (grad_deriv > 3 .OR. grad_deriv < -3)
THEN
957 cpabort(
"derivatives bigger than 3 not implemented")
970 CALL xb88_lr_lsd_calc( &
971 rho_spin=rho(ispin)%array, &
972 norm_drho_spin=norm_drho(ispin)%array, &
974 e_rho_spin=e_rho(ispin)%array, &
975 e_ndrho_spin=e_ndrho(ispin)%array, &
976 e_rho_rho_spin=e_rho_rho(ispin)%array, &
977 e_ndrho_rho_spin=e_ndrho_rho(ispin)%array, &
978 e_ndrho_ndrho_spin=e_ndrho_ndrho(ispin)%array, &
979 e_rho_rho_rho_spin=e_rho_rho_rho(ispin)%array, &
980 e_ndrho_rho_rho_spin=e_ndrho_rho_rho(ispin)%array, &
981 e_ndrho_ndrho_rho_spin=e_ndrho_ndrho_rho(ispin)%array, &
982 e_ndrho_ndrho_ndrho_spin=e_ndrho_ndrho_ndrho(ispin)%array, &
983 grad_deriv=grad_deriv, npoints=npoints, &
984 epsilon_rho=epsilon_rho, &
991 CALL timestop(handle)
1021 SUBROUTINE xb88_lr_lsd_calc(rho_spin, norm_drho_spin, e_0, &
1022 e_rho_spin, e_ndrho_spin, e_rho_rho_spin, e_ndrho_rho_spin, &
1023 e_ndrho_ndrho_spin, e_rho_rho_rho_spin, e_ndrho_rho_rho_spin, &
1024 e_ndrho_ndrho_rho_spin, &
1025 e_ndrho_ndrho_ndrho_spin, grad_deriv, npoints, epsilon_rho, sx, &
1027 REAL(kind=
dp),
DIMENSION(*),
INTENT(in) :: rho_spin, norm_drho_spin
1028 REAL(kind=
dp),
DIMENSION(*),
INTENT(inout) :: e_0, e_rho_spin, e_ndrho_spin, e_rho_rho_spin, &
1029 e_ndrho_rho_spin, e_ndrho_ndrho_spin, e_rho_rho_rho_spin, e_ndrho_rho_rho_spin, &
1030 e_ndrho_ndrho_rho_spin, e_ndrho_ndrho_ndrho_spin
1031 INTEGER,
INTENT(in) :: grad_deriv, npoints
1032 REAL(kind=
dp),
INTENT(in) :: epsilon_rho, sx, omega
1035 REAL(kind=
dp) :: cx, epsilon_rho43, my_epsilon_rho, ndrho, rho, t1, t10, t100, t1002, t1009, &
1036 t101, t1013, t103, t104, t1044, t105, t1069, t109, t1091, t11, t1102, t112, t113, t1136, &
1037 t1141, t1146, t1153, t1156, t116, t1163, t1167, t117, t1177, t118, t12, t122, t1220, &
1038 t126, t127, t128, t1284, t130, t132, t133, t1334, t1341, t1345, t135, t136, t137, t1370, &
1039 t1396, t140, t1400, t1404, t1405, t141, t1412, t143, t1449, t1456, t146, t1467, t147, &
1040 t1472, t148, t151, t155, t1553, t16, t168, t169, t17, t172, t173, t176, t177, t18, t185, &
1041 t186, t190, t196, t2, t200, t207, t21, t211, t212, t213, t216
1042 REAL(kind=
dp) :: t219, t22, t221, t222, t225, t226, t23, t230, t231, t232, t233, t237, t24, &
1043 t241, t244, t245, t250, t251, t254, t255, t258, t259, t26, t264, t265, t27, t270, t271, &
1044 t28, t281, t284, t285, t289, t29, t293, t297, t3, t30, t304, t31, t311, t312, t313, t316, &
1045 t319, t321, t323, t325, t326, t328, t330, t335, t339, t34, t343, t346, t347, t351, t354, &
1046 t358, t36, t365, t368, t37, t372, t377, t38, t382, t383, t384, t39, t393, t397, t40, &
1047 t400, t401, t404, t405, t408, t41, t412, t413, t417, t418, t42, t428, t429, t43, t435, &
1048 t44, t451, t452, t455, t457, t46, t460, t462, t463, t464, t465
1049 REAL(kind=
dp) :: t466, t467, t47, t470, t473, t478, t479, t48, t482, t486, t489, t49, t492, &
1050 t496, t5, t501, t502, t505, t508, t51, t513, t514, t519, t52, t521, t525, t526, t529, &
1051 t530, t533, t534, t536, t537, t539, t55, t562, t566, t570, t571, t572, t573, t574, t575, &
1052 t576, t580, t586, t59, t590, t6, t60, t601, t605, t606, t613, t624, t628, t632, t639, &
1053 t64, t640, t641, t657, t667, t669, t677, t68, t687, t69, t7, t71, t716, t72, t722, t735, &
1054 t739, t746, t75, t76, t769, t77, t79, t791, t793, t8, t838, t84, t842, t846, t85, t857, &
1055 t86, t860, t867, t87, t880, t90, t91, t933, t94, t95, t961, t98
1056 REAL(kind=
dp) :: t99, xx
1058 my_epsilon_rho = 0.5_dp*epsilon_rho
1059 epsilon_rho43 = my_epsilon_rho**(4.0_dp/3.0_dp)
1060 cx = 1.5_dp*(3.0_dp/4.0_dp/
pi)**(1.0_dp/3.0_dp)
1065 ndrho = norm_drho_spin(ii)
1066 IF (rho > my_epsilon_rho)
THEN
1067 IF (grad_deriv >= 0)
THEN
1068 t1 = rho**(0.1e1_dp/0.3e1_dp)
1071 xx = ndrho*max(t3, epsilon_rho43)
1076 t10 = 0.1e1_dp/t8/t7
1078 t12 = log(xx + sqrt(xx**0.2e1_dp + 0.1e1_dp))
1079 t16 = 0.10e1_dp + 0.60e1_dp*t11*t3*t12
1082 t21 = 0.20e1_dp*cx + 0.20e1_dp*t6*t18
1088 t28 = 0.1e1_dp/omega
1092 t34 = erf(0.3000000000e1_dp*t30*t31)
1102 t46 = exp(-0.8999999998e1_dp*t44)
1106 t51 = t46 - 0.10e1_dp
1108 t55 = t46 - 0.15e1_dp - 0.5555555558e-1_dp*t47*t52
1109 t59 = t26*t34 + 0.3333333334e0_dp*t36*t38*t55
1112 e_0(ii) = e_0(ii) - 0.2222222224e0_dp*t24*omega*t60*sx
1115 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
1119 t71 = 0.1e1_dp/t8/t69
1124 t79 = 0.1e1_dp/t1/t7
1129 t90 = -0.8000000000e1_dp*t11*t79*t12 - 0.8000000000e1_dp*t6*t87
1131 t94 = -0.5333333333e1_dp*t6*t72 - 0.20e1_dp*t6*t91
1134 t99 = sqrt(0.3141592654e1_dp)
1137 t103 = exp(-0.9000000000e1_dp*t44)
1141 t112 = -0.1500000000e1_dp*t105*t31*t94 + 0.1000000000e1_dp*t30* &
1149 t127 = 0.1e1_dp/t126
1154 t135 = 0.8999999998e1_dp*t130 - 0.5999999999e1_dp*t133
1158 t141 = 0.1e1_dp/t140
1163 t151 = t136 - 0.5555555558e-1_dp*t137*t52 + 0.3703703705e-1_dp*t47 &
1164 *t143 - 0.5555555558e-1_dp*t146*t148
1165 t155 = real(2*t101*t113, kind=
dp) + 0.1666666667e0_dp*t117*t118*t94 - &
1166 0.1111111111e0_dp*t36*t122*t55 + 0.3333333334e0_dp*t36*t38* &
1169 e_rho_spin(ii) = e_rho_spin(ii) + (-0.2222222224e0_dp*t64*t60 - 0.3333333336e0_dp*t68*t95 - &
1170 0.2222222224e0_dp*t24*t98*t155)*sx
1172 t168 = 0.60e1_dp*beta*t3*t12 + 0.60e1_dp*t11*t10*t86
1174 t172 = 0.40e1_dp*t11*t18 - 0.20e1_dp*t6*t169
1181 t196 = 0.8999999998e1_dp*t185*t186*t46 - 0.5555555558e-1_dp*t190 &
1182 *t52 - 0.5000000001e0_dp*t41*t172*t46
1183 t200 = -0.3000000000e1_dp*t177*t105*t1*t172 + 0.1666666667e0_dp* &
1184 t117*t118*t172 + 0.3333333334e0_dp*t36*t38*t196
1186 e_ndrho_spin(ii) = e_ndrho_spin(ii) + (-0.3333333336e0_dp*t68*t173 - 0.2222222224e0_dp*t24*t98 &
1190 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
1192 t211 = rho*t29*omega
1197 t221 = 0.1e1_dp/t8/t219
1201 t230 = 0.1e1_dp/t75/t16
1205 t237 = 0.1e1_dp/t1/t69
1209 t250 = 0.1e1_dp/t85/t84
1210 t251 = 0.1e1_dp/t1/t219/t69*t250
1211 t254 = 0.1866666667e2_dp*t11*t237*t12 + 0.4000000000e2_dp*t6*t241 &
1212 - 0.1066666667e2_dp*t245*t251
1214 t258 = 0.1955555555e2_dp*t6*t222 + 0.1066666667e2_dp*t6*t226 + 0.40e1_dp &
1215 *t6*t233 - 0.20e1_dp*t6*t255
1217 t264 = 0.9000000000e1_dp*t130 - 0.6000000000e1_dp*t133
1219 t270 = 0.1e1_dp/t22/t126
1222 t284 = 0.2250000000e1_dp*t271*t31*t212 - 0.1000000000e1_dp*t105* &
1223 t109*t94 - 0.1500000000e1_dp*t105*t31*t258 - 0.6666666667e0_dp &
1226 t289 = omega*t104*t27
1231 t312 = 0.1e1_dp/t311
1233 t316 = 0.1800000000e2_dp*t313*t43*t212
1234 t319 = 0.1200000000e2_dp*t128*t132*t94
1235 t321 = t128*t43*t258
1237 t325 = 0.2000000000e1_dp*t42*t323
1238 t326 = -t316 + t319 + 0.8999999998e1_dp*t321 + t325
1243 t343 = t141*t135*t46
1247 t354 = t326*t46 + t328*t46 - 0.5555555558e-1_dp*t330*t52 + 0.7407407410e-1_dp &
1248 *t137*t143 - 0.1111111112e0_dp*t335*t148 - 0.6172839508e-1_dp &
1249 *t47*t339 + 0.7407407410e-1_dp*t146*t343 - 0.5555555558e-1_dp &
1250 *t146*t347 - 0.5555555558e-1_dp*t146*t351
1251 t358 = real(2*t101*t265*t112, kind=
dp) + real(2*t101*t285, kind=
dp) - 0.8333333335e-1_dp &
1252 *t289*t118*t212 - 0.1111111111e0_dp*t117*t293*t94 &
1253 + 0.3333333334e0_dp*t117*t297*t94 + 0.1666666667e0_dp*t117* &
1254 t118*t258 + 0.1481481481e0_dp*t36*t304*t55 - 0.2222222222e0_dp* &
1255 t36*t122*t151 + 0.3333333334e0_dp*t36*t38*t354
1257 e_rho_rho_spin(ii) = e_rho_rho_spin(ii) + (-0.6666666672e0_dp*t36*t95 - 0.4444444448e0_dp*t64*t207 - &
1258 0.1666666668e0_dp*t211*t213 - 0.6666666672e0_dp*t68*t216 - 0.3333333336e0_dp &
1259 *t68*t259 - 0.2222222224e0_dp*t24*t98*t358)*sx
1268 t393 = beta*t5*ndrho
1269 t397 = 0.1e1_dp/t1/t219/t7*t250
1270 t400 = -0.8000000000e1_dp*beta*t79*t12 - 0.2400000000e2_dp*t11* &
1271 t87 + 0.8000000000e1_dp*t393*t397
1273 t404 = -0.1066666667e2_dp*t11*t72 + 0.5333333333e1_dp*t6*t377 - 0.40e1_dp &
1274 *t11*t91 + 0.40e1_dp*t382*t384 - 0.20e1_dp*t6*t401
1281 t428 = 0.2250000000e1_dp*t417*t418*t172 - 0.1500000000e1_dp*t105 &
1282 *t31*t404 - 0.5000000000e0_dp*t105*t109*t172
1287 t455 = 0.1800000000e2_dp*t451*t452*t172
1288 t457 = t128*t43*t404
1289 t460 = t128*t132*t172
1290 t462 = -t455 + 0.8999999998e1_dp*t457 + 0.5999999999e1_dp*t460
1303 t492 = t463 + 0.8999999998e1_dp*t465*t467 - 0.5555555558e-1_dp*t470 &
1304 *t52 - 0.5000000001e0_dp*t473*t466 + 0.3703703705e-1_dp*t190*t143 &
1305 + 0.3333333334e0_dp*t479*t466 - 0.5555555558e-1_dp*t482*t148 &
1306 - 0.5555555558e-1_dp*t146*t486 - 0.5000000001e0_dp*t489*t466
1307 t496 = 0.1800000000e2_dp*t413*t186*t113 + real(2*t101*t429, kind=
dp) &
1308 - 0.8333333335e-1_dp*t289*t118*t368 + 0.1666666667e0_dp*t117*t435 &
1309 *t94 + 0.1666666667e0_dp*t117*t118*t404 - 0.5555555555e-1_dp &
1310 *t117*t293*t172 - 0.1111111111e0_dp*t36*t122*t196 + 0.1666666667e0_dp &
1311 *t117*t297*t172 + 0.3333333334e0_dp*t36*t38*t492
1313 e_ndrho_rho_spin(ii) = e_ndrho_rho_spin(ii) + (-0.3333333336e0_dp*t36*t173 - 0.2222222224e0_dp*t64*t365 - &
1314 0.1666666668e0_dp*t211*t60*t368 - 0.3333333336e0_dp*t68*t372 &
1315 - 0.3333333336e0_dp*t68*t405 - 0.3333333336e0_dp*t68*t408 - 0.2222222224e0_dp &
1325 t521 = 0.1e1_dp/t1/t519
1326 t525 = 0.120e2_dp*t508*t86 - 0.60e1_dp*t6*t521*t250
1328 t529 = 0.40e1_dp*t508*t17 - 0.80e1_dp*t11*t169 + 0.40e1_dp*t6*t514 &
1333 t536 = 0.1e1_dp/t39/omega
1335 t539 = 0.1e1_dp/t22/t311
1339 t571 = 0.1e1_dp/t570
1341 t573 = 0.1e1_dp/t572
1346 t586 = -0.2250000000e2_dp*t451*t562*t46 + 0.8999999998e1_dp*t185 &
1347 *t566*t46 + 0.8099999996e2_dp*t575*t576*t46 - 0.5555555558e-1_dp &
1348 *t580*t52 - 0.5000000001e0_dp*t41*t529*t46
1349 t590 = -0.2700000000e2_dp*t537*t539*rho*t501*t103 + 0.4500000000e1_dp &
1350 *t177*t271*t1*t501 - 0.3000000000e1_dp*t177*t105* &
1351 t1*t529 - 0.8333333335e-1_dp*t289*t118*t501 + 0.3333333334e0_dp &
1352 *t117*t435*t172 + 0.1666666667e0_dp*t117*t118*t529 + 0.3333333334e0_dp &
1355 e_ndrho_ndrho_spin(ii) = e_ndrho_ndrho_spin(ii) + (-0.1666666668e0_dp*t211*t502 - 0.6666666672e0_dp*t68*t505 &
1356 - 0.3333333336e0_dp*t68*t530 - 0.2222222224e0_dp*t24*t98*t590) &
1360 IF (grad_deriv >= 3 .OR. grad_deriv == -3)
THEN
1362 t605 = rho*t104*omega
1365 t624 = 0.1e1_dp/t8/t519
1369 t640 = 0.1e1_dp/t639
1373 t669 = 0.1e1_dp/t85/t667
1374 t677 = -0.9125925923e2_dp*t6*t624*t17 - 0.5866666667e2_dp*t6*t628 &
1375 *t90 - 0.3200000001e2_dp*t6*t632*t232 + 0.1600000000e2_dp*t6 &
1376 *t225*t254 - 0.120e2_dp*t6*t641*t232*t90 + 0.120e2_dp*t382 &
1377 *t383*t254 - 0.20e1_dp*t6*t77*(-0.6222222223e2_dp*t11/t1/ &
1378 t219*t12 - 0.2115555556e3_dp*t6*t624*t86 + 0.1315555556e3_dp* &
1379 t245/t1/t657*t250 - 0.4266666668e2_dp*beta*t244*t5/t657 &
1383 t722 = omega*t270*t27
1388 t791 = 0.5400000000e2_dp*t769*t43*t606 - 0.3600000000e2_dp*t313* &
1389 t132*t212 - 0.5400000000e2_dp*t451*t452*t258 - 0.6000000000e1_dp &
1390 *t128*t323*t94 + 0.1800000000e2_dp*t128*t132*t258 + 0.8999999998e1_dp &
1391 *t128*t43*t677 - 0.2666666667e1_dp*t42*
pi*t79
1393 t838 = real(3*t326*t135*t46, kind=
dp) + real(t791*t46, kind=
dp) + real(t793* &
1394 t46, kind=
dp) - 0.5555555558e-1_dp*t39*t677*t52 + 0.1111111112e0_dp*t330 &
1395 *t143 - 0.1666666668e0_dp*t330*t48*t148 - 0.1851851853e0_dp*t137 &
1396 *t339 + 0.2222222223e0_dp*t335*t343 - 0.1666666668e0_dp*t335* &
1397 t347 - 0.1666666668e0_dp*t335*t351 + 0.1646090535e0_dp*t47*t48 &
1398 *t71*t51 - 0.1851851853e0_dp*real(t146, kind=
dp)*real(t10, kind=
dp)*real(t135, kind=
dp) &
1399 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t326, kind=
dp) &
1400 *real(t46, kind=
dp) + 0.1111111112e0_dp*real(t146, kind=
dp)*real(t141, kind=
dp)*real(t328, kind=
dp) &
1401 *real(t46, kind=
dp) - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t791, kind=
dp) &
1402 *real(t46, kind=
dp) - 0.1666666668e0_dp*real(t146, kind=
dp)*real(t346, kind=
dp)*real(t136, kind=
dp) &
1403 - 0.5555555558e-1_dp*real(t146, kind=
dp)*real(t49, kind=
dp)*real(t793, kind=
dp)* &
1405 t842 = 0.2e1_dp*t101*(-t316 + t319 + 0.9000000000e1_dp*t321 + t325) &
1406 *t103*t112 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp*t687*t31 &
1407 *t606 + 0.2250000000e1_dp*t271*t109*t212 + 0.6750000000e1_dp* &
1408 t417*t418*t258 + 0.1000000000e1_dp*t105*t281*t94 - 0.1500000000e1_dp &
1409 *t105*t109*t258 - 0.1500000000e1_dp*t105*t31*t677 &
1410 + 0.1111111111e1_dp*t30*t26*t10) + 0.4e1_dp*t101*t265*t284 + &
1411 0.2e1_dp*t101*t716*t103*t112 + 0.1250000000e0_dp*t722*t118 &
1412 *t606 + 0.8333333333e-1_dp*t289*t293*t212 - 0.2500000000e0_dp*t289 &
1413 *t297*t212 - 0.2500000000e0_dp*t289*t118*t613 + 0.2222222222e0_dp &
1414 *t117*t735*t94 - 0.3333333333e0_dp*t117*t739*t94 - &
1415 0.1666666667e0_dp*t117*t293*t258 + 0.5000000001e0_dp*t117*t746 &
1416 *t94 + 0.5000000001e0_dp*t117*t297*t258 + 0.1666666667e0_dp*t117 &
1417 *t118*t677 - 0.3456790122e0_dp*t36*t27*t237*t55 + 0.4444444444e0_dp &
1418 *t36*t304*t151 - 0.3333333333e0_dp*t36*t122*t354 &
1419 + 0.3333333334e0_dp*t36*t38*t838
1420 t846 = -0.5000000004e0_dp*t116*t213 - 0.2000000001e1_dp*t36*t216 &
1421 - 0.1000000001e1_dp*t36*t259 - 0.6666666672e0_dp*t64*t601 + 0.8333333340e-1_dp &
1422 *t605*t60*t606 - 0.5000000004e0_dp*t211*t207*t212 &
1423 - 0.5000000004e0_dp*t211*t60*t613 - 0.1000000001e1_dp*t68* &
1424 t601*t94 - 0.1000000001e1_dp*t68*t207*t258 - 0.3333333336e0_dp* &
1425 t68*t60*t677 - 0.2222222224e0_dp*t24*t98*t842
1427 e_rho_rho_rho_spin(ii) = e_rho_rho_rho_spin(ii) + t846*sx
1433 t933 = 0.3911111110e2_dp*t11*t222 - 0.1955555555e2_dp*t6*t628*t168 &
1434 + 0.2133333334e2_dp*t11*t226 - 0.2133333334e2_dp*t6*t71*t384 &
1435 + 0.1066666667e2_dp*t6*t225*t400 + 0.80e1_dp*t11*t233 - 0.120e2_dp &
1436 *t382*t640*t232*t168 + 0.80e1_dp*t382*t383*t400 - 0.40e1_dp &
1437 *t11*t255 + 0.40e1_dp*t382*t230*t254*t168 - 0.20e1_dp* &
1438 t6*t77*(0.1866666667e2_dp*beta*t237*t12 + 0.9866666667e2_dp* &
1439 t11*t241 - 0.8266666668e2_dp*t393*t251 + 0.3200000001e2_dp*beta &
1440 *t244*ndrho/t657/t7*t669)
1443 t1009 = 0.2e1_dp*t101*(-t455 + 0.9000000000e1_dp*t457 + 0.6000000000e1_dp &
1444 *t460)*t103*t112 + 0.1800000000e2_dp*t412*t264*t40*t127 &
1445 *t8*t172*t103*t112 + 0.2e1_dp*t101*t265*t428 + 0.1800000000e2_dp &
1446 *t413*t186*t285 + 0.2e1_dp*t101*t103*(-0.5625000000e1_dp &
1447 *t961*t1*t212*t172 + 0.4500000000e1_dp*t417*t418*t404 &
1448 + 0.1500000000e1_dp*t417*t49*t94*t172 - 0.1000000000e1_dp* &
1449 t105*t109*t404 + 0.2250000000e1_dp*t417*t1*t258*t172 - 0.1500000000e1_dp &
1450 *t105*t31*t933 + 0.3333333334e0_dp*t105*t281* &
1451 t172) + 0.1250000000e0_dp*t722*t118*t860 - 0.8333333335e-1_dp*t289 &
1452 *t435*t212 - 0.1666666667e0_dp*t289*t118*t867 + 0.5555555555e-1_dp &
1453 *t289*t293*t368 - 0.1111111111e0_dp*t117*t1002*t94 &
1454 - 0.1111111111e0_dp*t117*t293*t404
1457 t1069 = 0.5400000000e2_dp*t1044*t8*t212*t172 - 0.3600000000e2_dp &
1458 *t451*t452*t404 - 0.2400000000e2_dp*t451*t37*t94*t172 + &
1459 0.1200000000e2_dp*t128*t132*t404 - 0.1800000000e2_dp*t451*t8* &
1460 t258*t172 + 0.8999999998e1_dp*t128*t43*t933 - 0.2000000000e1_dp &
1462 t1091 = t127*t172*t46
1463 t1102 = t1069*t46 + 0.8999999998e1_dp*t326*t40*t127*t467 + real(2 &
1464 *t136*t462, kind=
dp) + 0.8999999998e1_dp*t328*t40*t127*t467 - &
1465 0.5555555558e-1_dp*t39*t933*t52 - 0.5000000001e0_dp*t258*t127 &
1466 *t466 + 0.7407407410e-1_dp*t470*t143 + 0.6666666668e0_dp*t94*t478 &
1467 *t1091 - 0.1111111112e0_dp*t470*t48*t148 - 0.1111111112e0_dp &
1468 *t335*t486 - 0.1000000001e1_dp*t94*t135*t1091
1469 t1136 = -0.6172839508e-1_dp*t190*t339 - 0.5555555556e0_dp*t41/t7 &
1470 *t466 + 0.7407407410e-1_dp*t482*t343 + 0.7407407410e-1_dp*t146* &
1471 t141*t462*t46 + 0.6666666668e0_dp*t479*t135*t172*t46 - 0.5555555558e-1_dp &
1472 *t482*t347 - 0.5555555558e-1_dp*t146*t49*t1069 &
1473 *t46 - 0.5000000001e0_dp*t41*t326*t466 - 0.5555555558e-1_dp*t482 &
1474 *t351 - 0.1111111112e0_dp*t146*t147*t463 - 0.5000000001e0_dp* &
1476 t1141 = -0.1666666667e0_dp*t289*t297*t368 + 0.3333333334e0_dp*t117 &
1477 *t1013*t94 + 0.3333333334e0_dp*t117*t297*t404 - 0.8333333335e-1_dp &
1478 *t289*t118*t880 + 0.1666666667e0_dp*t117*t435*t258 + &
1479 0.1666666667e0_dp*t117*t118*t933 + 0.7407407405e-1_dp*t117*t735 &
1480 *t172 + 0.1481481481e0_dp*t36*t304*t196 - 0.1111111111e0_dp* &
1481 t117*t739*t172 - 0.2222222222e0_dp*t36*t122*t492 + 0.1666666667e0_dp &
1482 *t117*t746*t172 + 0.3333333334e0_dp*t36*t38*(t1102 &
1484 t1146 = -0.3333333336e0_dp*t117*t59*t94*t172 - 0.6666666672e0_dp &
1485 *t36*t372 - 0.6666666672e0_dp*t36*t405 - 0.6666666672e0_dp*t36 &
1486 *t408 - 0.4444444448e0_dp*t64*t857 + 0.8333333340e-1_dp*t605*t60 &
1487 *t860 - 0.1666666668e0_dp*t211*t365*t212 - 0.3333333336e0_dp* &
1488 t211*t60*t867 - 0.3333333336e0_dp*t211*t207*t368 - 0.6666666672e0_dp &
1489 *t68*t857*t94 - 0.6666666672e0_dp*t68*t207*t404 - 0.1666666668e0_dp &
1490 *t211*t60*t880 - 0.3333333336e0_dp*t68*t365* &
1491 t258 - 0.3333333336e0_dp*t68*t60*t933 - 0.3333333336e0_dp*t68* &
1492 t601*t172 - 0.2222222224e0_dp*t24*t98*(t1009 + t1141)
1494 e_ndrho_rho_rho_spin(ii) = e_ndrho_rho_rho_spin(ii) + t1146*sx
1501 t1220 = -0.1066666667e2_dp*t1177*t17 + 0.2133333334e2_dp*t11*t377 &
1502 - 0.1066666667e2_dp*t6*t632*t513 + 0.5333333333e1_dp*t6*t225 &
1503 *t525 - 0.40e1_dp*t508*t76*t90 + 0.160e2_dp*t11*t10*t384 - &
1504 0.80e1_dp*t11*t401 - 0.120e2_dp*t382*t640*t90*t513 + 0.80e1_dp &
1505 *t382*t230*t400*t168 + 0.40e1_dp*t382*t383*t525 - 0.20e1_dp &
1506 *t6*t77*(-0.3200000000e2_dp*t1177*t86 + 0.4800000000e2_dp*t6 &
1507 *t397 - 0.2400000000e2_dp*t245/t657/rho*t669)
1509 t1334 = 0.5400000000e2_dp*t1044*t452*t501 - 0.3600000000e2_dp*t451 &
1510 *t8*t404*t172 - 0.1800000000e2_dp*t451*t452*t529 + 0.8999999998e1_dp &
1511 *t128*t43*t1220 - 0.1200000000e2_dp*t313*t132*t501 &
1512 + 0.5999999999e1_dp*t128*t132*t529
1516 t1396 = t1334*t46 + 0.1800000000e2_dp*t462*t40*t127*t467 - 0.2250000000e2_dp &
1517 *t464*t312*t43*t1341 + 0.8999999998e1_dp*t465 &
1518 *t43*t1345 - 0.1000000000e1_dp*t404*t127*t466 + 0.8099999996e2_dp &
1519 *t135*t571*t573*t533*t2*t1341 - 0.5555555558e-1_dp*t39 &
1520 *t1220*t52 - 0.5000000001e0_dp*t473*t1345 + 0.3333333334e0_dp* &
1521 t479*t1345 + 0.1000000000e1_dp*t94*t312*t1341 - 0.4500000000e1_dp &
1522 *t94*t573*t501*t1370*t8*t46 + 0.3703703705e-1_dp*t580 &
1523 *t143 + 0.3000000000e1_dp*t312*t37*t501*t1370*t46 - 0.5555555558e-1_dp &
1524 *t580*t48*t148 - 0.1111111112e0_dp*t482*t486 - 0.5555555558e-1_dp &
1525 *t146*t49*t1334*t46 - 0.1000000000e1_dp*t41* &
1526 t462*t466 - 0.5000000001e0_dp*t489*t1345
1527 t1400 = -0.3600000000e2_dp*t412*t313*t562*t113 + 0.1800000000e2_dp &
1528 *t413*t566*t113 + 0.3600000000e2_dp*t413*t186*t429 + 0.1620000000e3_dp &
1529 *t26*t533*t100*t574*t576*t113 + 0.2e1_dp*t101 &
1530 *t103*(-0.5625000000e1_dp*t961*t418*t501 + 0.4500000000e1_dp &
1531 *t417*t1*t404*t172 + 0.2250000000e1_dp*t417*t418*t529 - &
1532 0.1500000000e1_dp*t105*t31*t1220 + 0.7500000000e0_dp*t271*t109 &
1533 *t501 - 0.5000000000e0_dp*t105*t109*t529) + 0.1250000000e0_dp* &
1534 t722*t118*t1156 - 0.1666666667e0_dp*t289*t435*t368 - 0.1666666667e0_dp &
1535 *t289*t118*t1163 - 0.8333333335e-1_dp*t289*t118*t1167 &
1536 + 0.1666666667e0_dp*t117*t1284*t94 + 0.3333333334e0_dp*t117 &
1537 *t435*t404 + 0.1666666667e0_dp*t117*t118*t1220 + 0.2777777778e-1_dp &
1538 *t289*t293*t501 - 0.1111111111e0_dp*t117*t1002*t172 &
1539 - 0.5555555555e-1_dp*t117*t293*t529 - 0.1111111111e0_dp*t36*t122 &
1540 *t586 - 0.8333333335e-1_dp*t289*t297*t501 + 0.3333333334e0_dp &
1541 *t117*t1013*t172 + 0.1666666667e0_dp*t117*t297*t529 + 0.3333333334e0_dp &
1543 t1404 = -0.1666666668e0_dp*t116*t502 - 0.6666666672e0_dp*t36*t505 &
1544 - 0.3333333336e0_dp*t36*t530 - 0.2222222224e0_dp*t64*t1153 + 0.8333333340e-1_dp &
1545 *t605*t60*t1156 - 0.3333333336e0_dp*t211*t365 &
1546 *t368 - 0.3333333336e0_dp*t211*t60*t1163 - 0.1666666668e0_dp*t211 &
1547 *t60*t1167 - 0.3333333336e0_dp*t68*t1153*t94 - 0.6666666672e0_dp &
1548 *t68*t365*t404 - 0.3333333336e0_dp*t68*t60*t1220 - 0.1666666668e0_dp &
1549 *t211*t207*t501 - 0.6666666672e0_dp*t68*t857* &
1550 t172 - 0.3333333336e0_dp*t68*t207*t529 - 0.2222222224e0_dp*t24* &
1553 e_ndrho_ndrho_rho_spin(ii) = e_ndrho_ndrho_rho_spin(ii) + t1404*sx
1557 t1449 = -0.120e2_dp*t508*t76*t168 + 0.240e2_dp*t11*t514 - 0.120e2_dp &
1558 *t11*t526 - 0.120e2_dp*t6*t641*t513*t168 + 0.120e2_dp*t382 &
1559 *t230*t168*t525 - 0.20e1_dp*t6*t77*(-0.240e2_dp*beta*t521 &
1560 *t250*ndrho + 0.180e2_dp*t393/t657*t669)
1564 t1553 = 0.1350000000e3_dp*t537/t22/t572*rho*t1456 - 0.8100000000e2_dp &
1565 *t534*t536*t539*rho*t172*t103*t529 - 0.2430000000e3_dp &
1566 *t1467*t100/t570/omega/t22/t1472*t140*t1456 - &
1567 0.1125000000e2_dp*t177*t687*t1*t1405 + 0.1350000000e2_dp*t176 &
1568 *t103*t28*t270*t1*t1412 - 0.3000000000e1_dp*t177*t105* &
1569 t1*t1449 + 0.1250000000e0_dp*t722*t118*t1405 - 0.2500000000e0_dp &
1570 *t289*t435*t501 - 0.2500000000e0_dp*t289*t118*t1412 + 0.5000000001e0_dp &
1571 *t117*t1284*t172 + 0.5000000001e0_dp*t117*t435 &
1572 *t529 + 0.1666666667e0_dp*t117*t118*t1449 + 0.3333333334e0_dp*t36 &
1573 *t38*(0.6750000000e2_dp*t1044*t8*t1405*t46 - 0.6750000000e2_dp &
1574 *t451*t186*t1345 - 0.5264999998e3_dp*t571/t1472*t533 &
1575 *t2*t1405*t46 + 0.8999999998e1_dp*t185*t8*t1449*t46 + 0.2429999999e3_dp &
1576 *t575*t2*t529*t466 + 0.7289999995e3_dp/t570/t39 &
1577 /t572/t126*t1467*t7*t1405*t46 - 0.5555555558e-1_dp*t39 &
1578 *t1449*t52 - 0.5000000001e0_dp*t41*t1449*t46)
1580 e_ndrho_ndrho_ndrho_spin(ii) = e_ndrho_ndrho_ndrho_spin(ii) + (0.8333333340e-1_dp*t605*t60*t1405 - &
1581 0.5000000004e0_dp*t211*t365*t501 - 0.5000000004e0_dp*t211*t60*t1412 - 0.1000000001e1_dp &
1582 *t68*t1153*t172 - 0.1000000001e1_dp*t68*t365*t529 - 0.3333333336e0_dp &
1583 *t68*t60*t1449 - 0.2222222224e0_dp*t24*t98*t1553) &
1591 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