Commit 3009ecb0 authored by Gregor Michalicek's avatar Gregor Michalicek

Bugfix for hybrid functionals + LOs in hybrid/subvxc.F90

The factors in the l=0 component of the vr array were wrong for LOs.
parent ceda7bd7
......@@ -90,6 +90,11 @@ CONTAINS
#endif
CALL timestart("subvxc")
integ = 0.0
bas1 = 0.0
bas2 = 0.0
vxc = 0
! Calculate radial functions
......@@ -306,7 +311,7 @@ CONTAINS
DO i = 1, atoms%jri(itype)
IF (l == 0) THEN
! vr(i,0)= vrtot(i,0,itype)*sfp/rmsh(i,itype) - vrcou(i,0,itype,jsp)
vr(i, 0) = vx%mt(i, 0, itype, jsp)*sfp_const/atoms%rmsh(i, itype)
vr(i, 0) = vx%mt(i, 0, itype, jsp) !*sfp_const/atoms%rmsh(i, itype)
ELSE ! vxc = vtot - vcoul
vr(i, l) = vx%mt(i, l, itype, jsp) !
! vr(i,l)= vrtot(i,l,itype)-vrcou(i,l,itype,jsp)
......@@ -498,9 +503,6 @@ CONTAINS
i = i + 1
IF (hmat%l_real) THEN
hmat%data_r(nn, n) = hmat%data_r(nn, n) - a_ex*REAL(vxc(i))
IF ((n <= 5) .AND. (nn <= 5)) THEN
WRITE (1235, '(2i7,3f15.8)') n, nn, hmat%data_r(n, nn), hmat%data_r(nn, n), REAL(vxc(i))
END IF
ELSE
hmat%data_c(nn, n) = hmat%data_c(nn, n) - a_ex*vxc(i)
ENDIF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment