Commit dbee6795 authored by P.Buhl's avatar P.Buhl

fleur.F90 wannier call should put l_real=.false. also if l_soc is true;...

fleur.F90 wannier call should put l_real=.false. also if l_soc is true; wannier.F allocations of zmat*%z_* should only be done one<- bug due to 110 spin loop
parent b7132ca3
...@@ -564,7 +564,7 @@ CONTAINS ...@@ -564,7 +564,7 @@ CONTAINS
IF ((input%l_wann).AND.(.NOT.wann%l_bs_comf)) THEN IF ((input%l_wann).AND.(.NOT.wann%l_bs_comf)) THEN
CALL wannier(DIMENSION,mpi,input,sym,atoms,stars,vacuum,sphhar,oneD,& CALL wannier(DIMENSION,mpi,input,sym,atoms,stars,vacuum,sphhar,oneD,&
wann,noco,cell,enpara,banddos,sliceplot,vTot,results,& wann,noco,cell,enpara,banddos,sliceplot,vTot,results,&
eig_idList,(sym%invs).AND.(.NOT.noco%l_noco),kpts%nkpt) eig_idList,(sym%invs).AND.(.NOT.noco%l_soc).AND.(.NOT.noco%l_noco),kpts%nkpt)
END IF END IF
IF (wann%l_gwf) CALL juDFT_error("provide wann_inp if l_gwf=T", calledby = "fleur") IF (wann%l_gwf) CALL juDFT_error("provide wann_inp if l_gwf=T", calledby = "fleur")
!-Wannier !-Wannier
......
...@@ -1224,19 +1224,23 @@ c**************************************************************** ...@@ -1224,19 +1224,23 @@ c****************************************************************
zzMat%nbasfcn = DIMENSION%nbasfcn zzMat%nbasfcn = DIMENSION%nbasfcn
zzMat%nbands = DIMENSION%neigd zzMat%nbands = DIMENSION%neigd
IF(l_real) THEN IF(l_real) THEN
ALLOCATE (zzMat%z_r(zzMat%nbasfcn,zzMat%nbands)) IF(.not.ALLOCATED(zzMat%z_r))
> ALLOCATE (zzMat%z_r(zzMat%nbasfcn,zzMat%nbands))
ELSE ELSE
ALLOCATE (zzMat%z_c(zzMat%nbasfcn,zzMat%nbands)) IF(.not.ALLOCATED(zzMat%z_c))
> ALLOCATE (zzMat%z_c(zzMat%nbasfcn,zzMat%nbands))
END IF END IF
zMat%l_real = zzMat%l_real zMat%l_real = zzMat%l_real
zMat%nbasfcn = zzMat%nbasfcn zMat%nbasfcn = zzMat%nbasfcn
zMat%nbands = zzMat%nbands zMat%nbands = zzMat%nbands
IF (zzMat%l_real) THEN IF (zzMat%l_real) THEN
ALLOCATE (zMat%z_r(zMat%nbasfcn,zMat%nbands)) IF(.not.ALLOCATED(zMat%z_r))
> ALLOCATE (zMat%z_r(zMat%nbasfcn,zMat%nbands))
zMat%z_r = 0.0 zMat%z_r = 0.0
ELSE ELSE
ALLOCATE (zMat%z_c(zMat%nbasfcn,zMat%nbands)) IF(.not.ALLOCATED(zMat%z_c))
> ALLOCATE (zMat%z_c(zMat%nbasfcn,zMat%nbands))
zMat%z_c = CMPLX(0.0,0.0) zMat%z_c = CMPLX(0.0,0.0)
END IF END IF
...@@ -1244,10 +1248,12 @@ c**************************************************************** ...@@ -1244,10 +1248,12 @@ c****************************************************************
zMat_b%nbasfcn = zzMat%nbasfcn zMat_b%nbasfcn = zzMat%nbasfcn
zMat_b%nbands = zzMat%nbands zMat_b%nbands = zzMat%nbands
IF (zzMat%l_real) THEN IF (zzMat%l_real) THEN
ALLOCATE (zMat_b%z_r(zMat_b%nbasfcn,zMat_b%nbands)) IF(.not.ALLOCATED(zMat_b%z_r))
> ALLOCATE (zMat_b%z_r(zMat_b%nbasfcn,zMat_b%nbands))
zMat_b%z_r = 0.0 zMat_b%z_r = 0.0
ELSE ELSE
ALLOCATE (zMat_b%z_c(zMat_b%nbasfcn,zMat_b%nbands)) IF(.not.ALLOCATED(zMat_b%z_c))
> ALLOCATE (zMat_b%z_c(zMat_b%nbasfcn,zMat_b%nbands))
zMat_b%z_c = CMPLX(0.0,0.0) zMat_b%z_c = CMPLX(0.0,0.0)
END IF END IF
......
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