Commit ffadc8e9 authored by Daniel Wortmann's avatar Daniel Wortmann

Small bugfixes in hybrid part

parent 7ae82272
......@@ -90,13 +90,12 @@ MODULE m_add_vnonlocal
DO nn=1,n
IF (hamovlp%l_real) THEN
hamovlp%a_r(ic) = hamovlp%a_r(ic) - a_ex*v_x%data_r(n,nn)
WRITE(732,*) n,nn,v_x%data_r(n,nn)
ELSE
hamovlp%a_c(ic) = hamovlp%a_c(ic) - a_ex*v_x%data_c(n,nn)
ENDIF
ic=ic+1
ENDDO
END DO
STOP "DEBUG"
! calculate HF energy
IF( hybrid%l_calhf ) THEN
WRITE(6,'(A)') new_line('n')//new_line('n')//' ### '// ' diagonal HF exchange elements (eV) ###'
......@@ -119,7 +118,7 @@ MODULE m_add_vnonlocal
! in the case of a spin-unpolarized calculation the factor 2 is added in eigen.F90
if (.not.v_x%l_real) v_x%data_c=conjg(v_x%data_c)
exch = 0
print *,"sizes:",shape(z%data_r),shape(v_x%data_r)
z%matsize1=MIN(z%matsize1,v_x%matsize2)
call v_x%multiply(z,tmp)
DO iband = 1,hybrid%nbands(nk)
if (z%l_real) THEN
......
......@@ -261,7 +261,18 @@ MODULE m_hsfock
call olap%multiply(z,trafo)
call invtrafo%alloc(olap%l_real,hybrid%nbands(nk),ic)
CALL trafo%transpose(invtrafo)
CALL trafo%TRANSPOSE(invtrafo)
DO i=1,hybrid%nbands(nk)
DO j=1,i-1
IF (ex%l_real) THEN
ex%data_r(i,j)=ex%data_r(j,i)
ELSE
ex%data_c(i,j)=conjg(ex%data_c(j,i))
END IF
ENDDO
ENDDO
CALL ex%multiply(invtrafo,tmp)
CALL trafo%multiply(tmp,v_x)
......
......@@ -197,7 +197,7 @@
END DO
cdum = cdum/ic
cdum = cdum!/ic
DO isym = 1,nsymop
iop = psym(isym)
igpt = pointer_apw(i,isym)
......@@ -466,9 +466,9 @@
END IF
END DO
IF (hmat%l_real) THEN
hmat%data_r(lapw%nv(jsp)+i,j) = cdum/ic
hmat%data_r(lapw%nv(jsp)+i,j) = cdum!/ic
ELSE
hmat%data_c(lapw%nv(jsp)+i,j) = cdum/ic
hmat%data_c(lapw%nv(jsp)+i,j) = cdum!/ic
END IF
END DO
END DO
......
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