35 #include "../base/base_uses.f90"
40 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
41 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'xc_xbecke88'
42 REAL(kind=
dp),
PARAMETER :: beta = 0.0042_dp
59 CHARACTER(LEN=*),
INTENT(OUT),
OPTIONAL :: reference, shortform
60 TYPE(xc_rho_cflags_type),
INTENT(inout),
OPTIONAL :: needs
61 INTEGER,
INTENT(out),
OPTIONAL :: max_deriv
63 IF (
PRESENT(reference))
THEN
64 reference =
"A. Becke, Phys. Rev. A 38, 3098 (1988) {LDA version}"
66 IF (
PRESENT(shortform))
THEN
67 shortform =
"Becke 1988 Exchange Functional (LDA)"
69 IF (
PRESENT(needs))
THEN
71 needs%rho_1_3 = .true.
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
124 TYPE(xc_rho_set_type),
INTENT(IN) :: rho_set
125 TYPE(xc_derivative_set_type),
INTENT(IN) :: deriv_set
126 INTEGER,
INTENT(in) :: grad_deriv
127 TYPE(section_vals_type),
POINTER :: xb88_params
129 CHARACTER(len=*),
PARAMETER :: routinen =
'xb88_lda_eval'
131 INTEGER :: handle, npoints
132 INTEGER,
DIMENSION(2, 3) :: bo
133 REAL(kind=
dp) :: epsilon_rho, sx
134 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :),
POINTER :: dummy, e_0, e_ndrho, &
135 e_ndrho_ndrho, e_ndrho_ndrho_ndrho, e_ndrho_ndrho_rho, e_ndrho_rho, e_ndrho_rho_rho, &
136 e_rho, e_rho_rho, e_rho_rho_rho, norm_drho, rho, rho_1_3
137 TYPE(xc_derivative_type),
POINTER :: deriv
139 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)
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
162 IF (grad_deriv >= 0)
THEN
164 allocate_deriv=.true.)
167 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
169 allocate_deriv=.true.)
172 allocate_deriv=.true.)
175 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
177 allocate_deriv=.true.)
180 allocate_deriv=.true.)
186 IF (grad_deriv >= 3 .OR. grad_deriv == -3)
THEN
188 allocate_deriv=.true.)
200 IF (grad_deriv > 3 .OR. grad_deriv < -3)
THEN
201 cpabort(
"derivatives bigger than 3 not implemented")
212 CALL xb88_lda_calc(rho=rho, rho_1_3=rho_1_3, norm_drho=norm_drho, &
213 e_0=e_0, e_rho=e_rho, e_ndrho=e_ndrho, e_rho_rho=e_rho_rho, &
214 e_ndrho_rho=e_ndrho_rho, e_ndrho_ndrho=e_ndrho_ndrho, &
215 e_rho_rho_rho=e_rho_rho_rho, e_ndrho_rho_rho=e_ndrho_rho_rho, &
216 e_ndrho_ndrho_rho=e_ndrho_ndrho_rho, &
217 e_ndrho_ndrho_ndrho=e_ndrho_ndrho_ndrho, grad_deriv=grad_deriv, &
218 npoints=npoints, epsilon_rho=epsilon_rho, sx=sx)
222 CALL timestop(handle)
251 SUBROUTINE xb88_lda_calc(rho, rho_1_3, norm_drho, &
252 e_0, e_rho, e_ndrho, e_rho_rho, e_ndrho_rho, &
253 e_ndrho_ndrho, e_rho_rho_rho, e_ndrho_rho_rho, e_ndrho_ndrho_rho, &
254 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_1_3, rho
260 REAL(kind=
dp),
INTENT(in) :: epsilon_rho, sx
263 REAL(kind=
dp) :: c, epsilon_rho43, my_rho, my_rho_1_3, t1, t10, t100, t104, t11, t12, t126, &
264 t13, t159, t164, t17, t170, t176, t18, t189, t2, t21, t23, t29, t3, t31, t33, t37, t39, &
265 t40, t43, t44, t49, t5, t51, t54, t6, t64, t67, t7, t72, t74, t75, t79, t83, t86, t90, &
268 c = 1.5_dp*(0.75_dp/
pi)**(1.0_dp/3.0_dp)
269 t1 = 2**(0.1e1_dp/0.3e1_dp)
273 epsilon_rho43 = epsilon_rho**(4./3.)
275 SELECT CASE (grad_deriv)
283 IF (my_rho > epsilon_rho)
THEN
284 my_rho_1_3 = rho_1_3(ii)
285 t3 = my_rho_1_3*my_rho
286 x = norm_drho(ii)/max(t3, epsilon_rho43)
288 t10 = t2*t6 + 0.1e1_dp
292 t17 = 0.1e1_dp + 0.6e1_dp*t7*x*t13
296 e_0(ii) = e_0(ii) + (t2*t3*t21/0.2e1_dp)*sx
309 IF (my_rho > epsilon_rho)
THEN
310 my_rho_1_3 = rho_1_3(ii)
311 t3 = my_rho_1_3*my_rho
314 t10 = t2*t6 + 0.1e1_dp
318 t17 = 0.1e1_dp + 0.6e1_dp*t7*x*t13
322 e_0(ii) = e_0(ii) + (t2*t3*t21/0.2e1_dp)*sx
328 t37 = 0.6e1_dp*t7*t13 + 0.6e1_dp*t7*x*t31*t33
331 t43 = -0.2e1_dp*t5*x*t18 + t5*t6*t37*t40
334 e_rho(ii) = e_rho(ii) &
335 - (0.2e1_dp/0.3e1_dp*t23*t44 - 0.2e1_dp/0.3e1_dp* &
337 e_ndrho(ii) = e_ndrho(ii) &
338 + (t2*t43/0.2e1_dp)*sx
352 IF (my_rho > epsilon_rho)
THEN
353 my_rho_1_3 = rho_1_3(ii)
354 t3 = my_rho_1_3*my_rho
357 t10 = t2*t6 + 0.1e1_dp
361 t17 = 0.1e1_dp + 0.6e1_dp*t7*x*t13
369 t37 = 0.6e1_dp*t7*t13 + 0.6e1_dp*t7*x*t31*t33
372 t43 = -0.2e1_dp*t5*x*t18 + t5*t6*t37*t40
375 e_rho(ii) = e_rho(ii) &
376 - (0.2e1_dp/0.3e1_dp*t23*t44 - 0.2e1_dp/0.3e1_dp* &
378 e_ndrho(ii) = e_ndrho(ii) &
379 + (t2*t43/0.2e1_dp)*sx
392 IF (my_rho > epsilon_rho)
THEN
393 my_rho_1_3 = rho_1_3(ii)
394 t3 = my_rho_1_3*my_rho
397 t10 = t2*t6 + 0.1e1_dp
401 t17 = 0.1e1_dp + 0.6e1_dp*t7*x*t13
405 e_0(ii) = e_0(ii) + (t2*t3*t21/0.2e1_dp)*sx
411 t37 = 0.6e1_dp*t7*t13 + 0.6e1_dp*t7*x*t31*t33
414 t43 = -0.2e1_dp*t5*x*t18 + t5*t6*t37*t40
417 e_rho(ii) = e_rho(ii) &
418 - (0.2e1_dp/0.3e1_dp*t23*t44 - 0.2e1_dp/0.3e1_dp* &
420 e_ndrho(ii) = e_ndrho(ii) &
421 + (t2*t43/0.2e1_dp)*sx
426 t64 = 0.1e1_dp/t11/t10
427 t67 = t2*t29 - 0.2e1_dp*t1*t6*t64
431 t79 = 0.12e2_dp*t7*t31*t33 + 0.6e1_dp*t7*x*t67*t33 &
432 - 0.6e1_dp*t7*x*t72*t75
434 t86 = 0.1e1_dp/t39/t17
435 t90 = -0.2e1_dp*t5*t18 + 0.4e1_dp*t5*t54*t37 + t5*t6* &
436 t79*t40 - 0.2e1_dp*t5*t6*t83*t86
438 t98 = 0.1e1_dp/my_rho
443 e_rho_rho(ii) = e_rho_rho(ii) &
444 + (0.8e1_dp/0.9e1_dp*t51*t91 - 0.2e1_dp/0.9e1_dp* &
445 t51*t44 + 0.2e1_dp/0.9e1_dp*t51*t21)*sx
446 e_ndrho_rho(ii) = e_ndrho_rho(ii) &
447 - (0.2e1_dp/0.3e1_dp*t99*t100)*sx
448 e_ndrho_ndrho(ii) = e_ndrho_ndrho(ii) &
449 + (t2*t90*t104/0.2e1_dp)*sx
462 IF (my_rho > epsilon_rho)
THEN
463 my_rho_1_3 = rho_1_3(ii)
464 t3 = my_rho_1_3*my_rho
467 t10 = t2*t6 + 0.1e1_dp
471 t17 = 0.1e1_dp + 0.6e1_dp*t7*x*t13
479 t37 = 0.6e1_dp*t7*t13 + 0.6e1_dp*t7*x*t31*t33
482 t43 = -0.2e1_dp*t5*x*t18 + t5*t6*t37*t40
488 t64 = 0.1e1_dp/t11/t10
489 t67 = t2*t29 - 0.2e1_dp*t1*t6*t64
493 t79 = 0.12e2_dp*t7*t31*t33 + 0.6e1_dp*t7*x*t67*t33 &
494 - 0.6e1_dp*t7*x*t72*t75
496 t86 = 0.1e1_dp/t39/t17
497 t90 = -0.2e1_dp*t5*t18 + 0.4e1_dp*t5*t54*t37 + t5*t6* &
498 t79*t40 - 0.2e1_dp*t5*t6*t83*t86
500 t98 = 0.1e1_dp/my_rho
505 e_rho_rho(ii) = e_rho_rho(ii) &
506 + (0.8e1_dp/0.9e1_dp*t51*t91 - 0.2e1_dp/0.9e1_dp* &
507 t51*t44 + 0.2e1_dp/0.9e1_dp*t51*t21)*sx
508 e_ndrho_rho(ii) = e_ndrho_rho(ii) &
509 - (0.2e1_dp/0.3e1_dp*t99*t100)*sx
510 e_ndrho_ndrho(ii) = e_ndrho_ndrho(ii) &
511 + (t2*t90*t104/0.2e1_dp)*sx
524 IF (my_rho > epsilon_rho)
THEN
525 my_rho_1_3 = rho_1_3(ii)
526 t3 = my_rho_1_3*my_rho
529 t10 = t2*t6 + 0.1e1_dp
533 t17 = 0.1e1_dp + 0.6e1_dp*t7*x*t13
537 IF (grad_deriv >= 0)
THEN
538 e_0(ii) = e_0(ii) + (t2*t3*t21/0.2e1_dp)*sx
545 t37 = 0.6e1_dp*t7*t13 + 0.6e1_dp*t7*x*t31*t33
548 t43 = -0.2e1_dp*t5*x*t18 + t5*t6*t37*t40
551 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
552 e_rho(ii) = e_rho(ii) &
553 - (0.2e1_dp/0.3e1_dp*t23*t44 - 0.2e1_dp/0.3e1_dp* &
555 e_ndrho(ii) = e_ndrho(ii) &
556 + (t2*t43/0.2e1_dp)*sx
562 t64 = 0.1e1_dp/t11/t10
563 t67 = t2*t29 - 0.2e1_dp*t1*t6*t64
567 t79 = 0.12e2_dp*t7*t31*t33 + 0.6e1_dp*t7*x*t67*t33 &
568 - 0.6e1_dp*t7*x*t72*t75
570 t86 = 0.1e1_dp/t39/t17
571 t90 = -0.2e1_dp*t5*t18 + 0.4e1_dp*t5*t54*t37 + t5*t6* &
572 t79*t40 - 0.2e1_dp*t5*t6*t83*t86
574 t98 = 0.1e1_dp/my_rho
579 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
580 e_rho_rho(ii) = e_rho_rho(ii) &
581 + (0.8e1_dp/0.9e1_dp*t51*t91 - 0.2e1_dp/0.9e1_dp* &
582 t51*t44 + 0.2e1_dp/0.9e1_dp*t51*t21)*sx
583 e_ndrho_rho(ii) = e_ndrho_rho(ii) &
584 - (0.2e1_dp/0.3e1_dp*t99*t100)*sx
585 e_ndrho_ndrho(ii) = e_ndrho_ndrho(ii) &
586 + (t2*t90*t104/0.2e1_dp)*sx
591 t164 = 0.6e1_dp*t5*t40*t37 - 0.12e2_dp*t5*x*t86*t83 &
592 + 0.6e1_dp*t5*t54*t79 + t5*t6*(0.18e2_dp*t7*t67 &
593 *t33 - 0.18e2_dp*t7*t72*t75 + 0.6e1_dp*t7*x* &
594 (-0.6e1_dp*t1*t64*x + 0.12e2_dp*t6*x/t11/t126) &
595 *t33 - 0.18e2_dp*t7*x*t67*t75*t31 + 0.12e2_dp*t7 &
596 *x*t72*t31/t74/t12)*t40 - 0.6e1_dp*t5*t6*t79 &
597 *t86*t37 + 0.6e1_dp*t5*t6*t83*t37/t159
598 t170 = 0.8e1_dp/0.9e1_dp*t51*t164*t6 + 0.14e2_dp/0.9e1_dp &
603 IF (grad_deriv == -3 .OR. grad_deriv >= 3)
THEN
604 e_rho_rho_rho(ii) = e_rho_rho_rho(ii) &
605 - (0.4e1_dp/0.3e1_dp*t170*x*t98 + 0.16e2_dp/0.27e2_dp &
606 *t176*t91 - 0.4e1_dp/0.27e2_dp*t176*t44 + &
607 0.4e1_dp/0.27e2_dp*t176*t21)*sx
608 e_ndrho_rho_rho(ii) = e_ndrho_rho_rho(ii) &
610 e_ndrho_ndrho_rho(ii) = e_ndrho_ndrho_rho(ii) &
611 + ((-0.2e1_dp/0.3e1_dp*t99*t164*x - &
612 0.2e1_dp/0.3e1_dp*t99*t90)*t104)*sx
613 e_ndrho_ndrho_ndrho(ii) = e_ndrho_ndrho_ndrho(ii) &
614 + (t2*t164/t49/t189/0.2e1_dp)*sx
623 END SUBROUTINE xb88_lda_calc
637 TYPE(xc_rho_set_type),
INTENT(IN) :: rho_set
638 TYPE(xc_derivative_set_type),
INTENT(IN) :: deriv_set
639 INTEGER,
INTENT(in) :: grad_deriv
640 TYPE(section_vals_type),
POINTER :: xb88_params
642 CHARACTER(len=*),
PARAMETER :: routinen =
'xb88_lsd_eval'
644 INTEGER :: handle, i, ispin, npoints
645 INTEGER,
DIMENSION(2, 3) :: bo
646 REAL(kind=
dp) :: epsilon_rho, sx
647 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :), &
648 POINTER :: dummy, e_0
649 TYPE(cp_3d_r_cp_type),
DIMENSION(2) :: e_ndrho, e_ndrho_ndrho, e_ndrho_ndrho_ndrho, &
650 e_ndrho_ndrho_rho, e_ndrho_rho, e_ndrho_rho_rho, e_rho, e_rho_rho, e_rho_rho_rho, &
651 norm_drho, rho, rho_1_3
652 TYPE(xc_derivative_type),
POINTER :: deriv
654 CALL timeset(routinen, handle)
660 NULLIFY (norm_drho(i)%array, rho(i)%array, rho_1_3(i)%array)
665 rhob_1_3=rho_1_3(2)%array, rhoa=rho(1)%array, &
666 rhob=rho(2)%array, norm_drhoa=norm_drho(1)%array, &
667 norm_drhob=norm_drho(2)%array, rho_cutoff=epsilon_rho, &
669 npoints = (bo(2, 1) - bo(1, 1) + 1)*(bo(2, 2) - bo(1, 2) + 1)*(bo(2, 3) - bo(1, 3) + 1)
671 dummy => rho(1)%array
675 e_rho(i)%array => dummy
676 e_ndrho(i)%array => dummy
677 e_rho_rho(i)%array => dummy
678 e_ndrho_rho(i)%array => dummy
679 e_ndrho_ndrho(i)%array => dummy
680 e_rho_rho_rho(i)%array => dummy
681 e_ndrho_rho_rho(i)%array => dummy
682 e_ndrho_ndrho_rho(i)%array => dummy
683 e_ndrho_ndrho_ndrho(i)%array => dummy
686 IF (grad_deriv >= 0)
THEN
688 allocate_deriv=.true.)
691 IF (grad_deriv >= 1 .OR. grad_deriv == -1)
THEN
693 allocate_deriv=.true.)
696 allocate_deriv=.true.)
699 allocate_deriv=.true.)
702 allocate_deriv=.true.)
705 IF (grad_deriv >= 2 .OR. grad_deriv == -2)
THEN
707 allocate_deriv=.true.)
710 allocate_deriv=.true.)
713 allocate_deriv=.true.)
716 allocate_deriv=.true.)
725 IF (grad_deriv >= 3 .OR. grad_deriv == -3)
THEN
727 allocate_deriv=.true.)
730 allocate_deriv=.true.)
751 IF (grad_deriv > 3 .OR. grad_deriv < -3)
THEN
752 cpabort(
"derivatives bigger than 3 not implemented")
765 CALL xb88_lsd_calc( &
766 rho_spin=rho(ispin)%array, &
767 rho_1_3_spin=rho_1_3(ispin)%array, &
768 norm_drho_spin=norm_drho(ispin)%array, &
770 e_rho_spin=e_rho(ispin)%array, &
771 e_ndrho_spin=e_ndrho(ispin)%array, &
772 e_rho_rho_spin=e_rho_rho(ispin)%array, &
773 e_ndrho_rho_spin=e_ndrho_rho(ispin)%array, &
774 e_ndrho_ndrho_spin=e_ndrho_ndrho(ispin)%array, &
775 e_rho_rho_rho_spin=e_rho_rho_rho(ispin)%array, &
776 e_ndrho_rho_rho_spin=e_ndrho_rho_rho(ispin)%array, &
777 e_ndrho_ndrho_rho_spin=e_ndrho_ndrho_rho(ispin)%array, &
778 e_ndrho_ndrho_ndrho_spin=e_ndrho_ndrho_ndrho(ispin)%array, &
779 grad_deriv=grad_deriv, npoints=npoints, &
780 epsilon_rho=epsilon_rho, sx=sx)
786 CALL timestop(handle)
815 SUBROUTINE xb88_lsd_calc(rho_spin, rho_1_3_spin, norm_drho_spin, e_0, &
816 e_rho_spin, e_ndrho_spin, e_rho_rho_spin, e_ndrho_rho_spin, &
817 e_ndrho_ndrho_spin, e_rho_rho_rho_spin, e_ndrho_rho_rho_spin, &
818 e_ndrho_ndrho_rho_spin, &
819 e_ndrho_ndrho_ndrho_spin, grad_deriv, npoints, epsilon_rho, sx)
820 REAL(kind=
dp),
DIMENSION(*),
INTENT(in) :: rho_spin, rho_1_3_spin, norm_drho_spin
821 REAL(kind=
dp),
DIMENSION(*),
INTENT(inout) :: e_0, e_rho_spin, e_ndrho_spin, e_rho_rho_spin, &
822 e_ndrho_rho_spin, e_ndrho_ndrho_spin, e_rho_rho_rho_spin, e_ndrho_rho_rho_spin, &
823 e_ndrho_ndrho_rho_spin, e_ndrho_ndrho_ndrho_spin
824 INTEGER,
INTENT(in) :: grad_deriv, npoints
825 REAL(kind=
dp),
INTENT(in) :: epsilon_rho, sx
828 REAL(kind=
dp) :: c, epsilon_rho43, my_epsilon_rho, my_rho, t1, t103, t11, t12, t127, t133, &
829 t138, t14, t151, t17, t18, t2, t20, t22, t23, t27, t28, t3, t30, t35, t36, t4, t42, t43, &
830 t44, t5, t51, t53, t57, t58, t59, t6, t63, t64, t66, t67, t7, t75, t76, t79, t8, t87, x
832 c = 1.5_dp*(0.75_dp/
pi)**(1.0_dp/3.0_dp)
833 my_epsilon_rho = 0.5_dp*epsilon_rho
834 epsilon_rho43 = my_epsilon_rho**(4._dp/3._dp)
836 SELECT CASE (grad_deriv)
842 my_rho = rho_spin(ii)
843 IF (my_rho > my_epsilon_rho)
THEN
844 t1 = rho_1_3_spin(ii)*my_rho
845 x = norm_drho_spin(ii)/t1
853 t11 = 0.1e1_dp + 0.6e1_dp*t4*t8
869 my_rho = rho_spin(ii)
870 IF (my_rho > my_epsilon_rho)
THEN
871 t1 = rho_1_3_spin(ii)*my_rho
872 x = norm_drho_spin(ii)/t1
880 t11 = 0.1e1_dp + 0.6e1_dp*t4*t8
890 t22 = 0.1e1_dp + t20*x
892 t27 = 0.6e1_dp*beta*t8 + 0.6e1_dp*t4*t22*t23
894 t30 = -0.2e1_dp*t4*t12 + t3*t28
896 e_rho_spin(ii) = e_rho_spin(ii) &
897 - (0.4e1_dp/0.3e1_dp*rho_1_3_spin(ii)*t30*x - &
898 0.4e1_dp/0.3e1_dp*rho_1_3_spin(ii)*t14)*sx
899 e_ndrho_spin(ii) = e_ndrho_spin(ii) &
911 my_rho = rho_spin(ii)
912 IF (my_rho > my_epsilon_rho)
THEN
913 t1 = rho_1_3_spin(ii)*my_rho
914 x = norm_drho_spin(ii)/t1
922 t11 = 0.1e1_dp + 0.6e1_dp*t4*t8
926 IF (grad_deriv >= 0)
THEN
934 t22 = 0.1e1_dp + t20*x
936 t27 = 0.6e1_dp*beta*t8 + 0.6e1_dp*t4*t22*t23
938 t30 = -0.2e1_dp*t4*t12 + t3*t28
940 IF (grad_deriv == -1 .OR. grad_deriv >= 1)
THEN
941 e_rho_spin(ii) = e_rho_spin(ii) &
942 - (0.4e1_dp/0.3e1_dp*rho_1_3_spin(ii)*t30*x - &
943 0.4e1_dp/0.3e1_dp*rho_1_3_spin(ii)*t14)*sx
944 e_ndrho_spin(ii) = e_ndrho_spin(ii) &
948 t35 = rho_1_3_spin(ii)**2
950 t42 = 0.1e1_dp/t17/t11
958 t63 = 0.12e2_dp*beta*t22*t23 + 0.6e1_dp*t4*t53*t23 - 0.6e1_dp*t4*t57*t59
960 t66 = -0.2e1_dp*beta*t12 + 0.4e1_dp*t4*t28 - 0.2e1_dp*t3*t44 + t3*t64
962 t75 = 0.1e1_dp/my_rho
966 IF (grad_deriv == -2 .OR. grad_deriv >= 2)
THEN
967 e_rho_rho_spin(ii) = e_rho_rho_spin(ii) &
968 + (0.16e2_dp/0.9e1_dp*t67*t2 - 0.4e1_dp/0.9e1_dp &
969 *t36*t30*x + 0.4e1_dp/0.9e1_dp*t36*t14)*sx
970 e_ndrho_rho_spin(ii) = e_ndrho_rho_spin(ii) &
971 - (0.4e1_dp/0.3e1_dp*t76*x)*sx
972 e_ndrho_ndrho_spin(ii) = e_ndrho_ndrho_spin(ii) + &
978 t127 = 0.6e1_dp*beta*t18*t27 - 0.12e2_dp*t4*t44 + 0.6e1_dp &
979 *t4*t64 + 0.6e1_dp*t3/t87*t43*t27 - 0.6e1_dp*t3 &
980 *t42*t27*t63 + t3*t18*(0.18e2_dp*beta*t53*t23 &
981 - 0.18e2_dp*beta*t57*t59 + 0.6e1_dp*t4*(0.3e1_dp/ &
982 t6/t103*t2*x - 0.3e1_dp*t51*x)*t23 - 0.18e2_dp* &
983 t4*t53*t59*t22 + 0.12e2_dp*t4*t57*t22/t58/t7)
984 t133 = 0.16e2_dp/0.9e1_dp*t36*t127*t2 + 0.28e2_dp/0.9e1_dp &
986 t138 = 0.1e1_dp/t35/my_rho
989 IF (grad_deriv == -3 .OR. grad_deriv >= 3)
THEN
990 e_rho_rho_rho_spin(ii) = e_rho_rho_rho_spin(ii) &
991 - (0.4e1_dp/0.3e1_dp*t133*x*t75 + 0.32e2_dp/0.27e2_dp &
992 *t138*t66*t2 - 0.8e1_dp/0.27e2_dp*t138*t30* &
993 x + 0.8e1_dp/0.27e2_dp*t138*t14)*sx
994 e_ndrho_rho_rho_spin(ii) = e_ndrho_rho_rho_spin(ii) &
996 e_ndrho_ndrho_rho_spin(ii) = e_ndrho_ndrho_rho_spin(ii) &
997 + ((-0.4e1_dp/0.3e1_dp*t75*t127*x - &
998 0.4e1_dp/0.3e1_dp*t76)*t79)*sx
999 e_ndrho_ndrho_ndrho_spin(ii) = e_ndrho_ndrho_ndrho_spin(ii) &
1000 + (t127/t35/t151)*sx
1009 END SUBROUTINE xb88_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
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 Becke 88 exchange functional
subroutine, public xb88_lsd_info(reference, shortform, needs, max_deriv)
return various information on the functional
subroutine, public xb88_lda_eval(rho_set, deriv_set, grad_deriv, xb88_params)
evaluates the becke 88 exchange functional for lda
subroutine, public xb88_lsd_eval(rho_set, deriv_set, grad_deriv, xb88_params)
evaluates the becke 88 exchange functional for lsd
subroutine, public xb88_lda_info(reference, shortform, needs, max_deriv)
return various information on the functional