From 3009ecb002f93ac5dfa2bb1e8c2bf959ce7b1947 Mon Sep 17 00:00:00 2001 From: Gregor Michalicek Date: Tue, 22 Oct 2019 14:40:39 +0200 Subject: [PATCH] Bugfix for hybrid functionals + LOs in hybrid/subvxc.F90 The factors in the l=0 component of the vr array were wrong for LOs. --- hybrid/subvxc.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hybrid/subvxc.F90 b/hybrid/subvxc.F90 index 2b79a0ca..2eafcf66 100644 --- a/hybrid/subvxc.F90 +++ b/hybrid/subvxc.F90 @@ -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 -- GitLab