Commit 807cac9d authored by Henning Janssen's avatar Henning Janssen

Merge branch 'develop' into DFT+HubbardI

parents 4617b508 e6b8dae6
......@@ -137,7 +137,7 @@ CONTAINS
atoms%nlo(:) = 0
atoms%llo(:,:) = -1
input%eig66(1)=.FALSE.
! HF/hybrid functionals/EXX
ALLOCATE ( hybrid%nindx(0:atoms%lmaxd,atoms%ntype) )
......@@ -196,6 +196,7 @@ CONTAINS
#ifdef CPP_MPI
CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(l_krla,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%eig66(1),1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%ntype,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
#ifndef CPP_OLDINTEL
CALL mpi_dist_forcetheorem(mpi,forcetheo)
......
......@@ -882,7 +882,7 @@
9120 FORMAT ('vchk=',l1,',cdinf=',l1,',pot8=',l1,',gw=',i1,&
& ',numbands=',i4)
WRITE (5,9130) 0,.false.,input%l_f,input%eonly
9130 FORMAT ('lpr=',i1,',form66=',l1,',l_f=',l1,',eonly=',l1)
9130 FORMAT ('lpr=',i1,',form66=',l1,',l_f=',l1,',eonly=',l1,',eig66',l1)
IF ( l_hyb ) THEN
WRITE (chntype,'(i3)') 2*atoms%ntype
chform = '('//chntype//'i3 )'
......
......@@ -171,7 +171,7 @@ CONTAINS
! Open/allocate eigenvector storage (start)
l_real=sym%invs.AND..NOT.noco%l_noco.AND..NOT.(noco%l_soc.AND.atoms%n_u+atoms%n_hia>0)
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,kpts%nkpt,input%jspins,&
noco%l_noco,.TRUE.,l_real,noco%l_soc,.FALSE.,mpi%n_size)
noco%l_noco,.NOT.INPUT%eig66(1),l_real,noco%l_soc,INPUT%eig66(1),mpi%n_size)
#ifdef CPP_CHASE
CALL init_chase(mpi,dimension,input,atoms,kpts,noco,.AND..NOT.(noco%l_soc.AND.atoms%n_u+atoms%n_hia>0))
......@@ -229,8 +229,9 @@ CONTAINS
IF(input%l_rdmft) THEN
CALL open_hybrid_io1(DIMENSION,sym%invs)
END IF
CALL reset_eig(eig_id,noco%l_soc) ! This has to be placed after the calc_hybrid call but before eigen
IF(.not.input%eig66(1))THEN
CALL reset_eig(eig_id,noco%l_soc) ! This has to be placed after the calc_hybrid call but before eigen
END IF
!$ call omp_set_num_threads(num_threads)
!#endif
......@@ -265,8 +266,10 @@ CONTAINS
CALL timestart("Updating energy parameters")
CALL enpara%update(mpi,atoms,vacuum,input,vToT)
CALL timestop("Updating energy parameters")
CALL eigen(mpi,stars,sphhar,atoms,xcpot,sym,kpts,DIMENSION,vacuum,input,&
IF(.not.input%eig66(1))THEN
CALL eigen(mpi,stars,sphhar,atoms,xcpot,sym,kpts,DIMENSION,vacuum,input,&
cell,enpara,banddos,noco,oneD,hybrid,iter,eig_id,results,inDen,vTemp,vx,gOnsite,hub1)
ENDIF
vTot%mmpMat = vTemp%mmpMat
!!$ eig_idList(pc) = eig_id
CALL timestop("eigen")
......@@ -289,7 +292,7 @@ CONTAINS
#endif
! WRITE(6,fmt='(A)') 'Starting 2nd variation ...'
IF (noco%l_soc.AND..NOT.noco%l_noco) &
IF (noco%l_soc.AND..NOT.noco%l_noco.AND..NOT.INPUT%eig66(1)) &
CALL eigenso(eig_id,mpi,DIMENSION,stars,vacuum,atoms,sphhar,&
obsolete,sym,cell,noco,input,kpts, oneD,vTot,enpara,results,hub1)
CALL timestop("gen. of hamil. and diag. (total)")
......
......@@ -39,6 +39,7 @@
USE m_types_xcpot_inbuild
USE m_mpi_bc_xcpot
#ifdef CPP_MPI
USE m_mpi_bc_all, ONLY : mpi_bc_all
#ifndef CPP_OLDINTEL
......@@ -117,7 +118,7 @@
#endif
!call juDFT_check_para()
CALL field%init(input)
input%eig66(1)=.FALSE.
input%gw = -1
input%gw_neigd = 0
!-t3e
......
This diff is collapsed.
......@@ -238,6 +238,8 @@ c ..local scalars..
TYPE(t_mat) :: zMat, zzMat, zMat_b, zMat_b2
TYPE(t_lapw) :: lapw_b, lapw_b2
eig_id = eig_idList(1)
if(.not.l_socgwf) stop 'wann_uHu_dmi only with l_socgwf=T'
if(l_sgwf) stop 'wann_uHu_dmi only with l_sgwf=F'
if(l_noco) stop 'noco and dmi not implemented'
......@@ -256,6 +258,12 @@ c ..initializations..
fullnqpts = 1
funit_start = 5000
! In some modes the code skips the Hamiltonian setup and
! jumps directly into the Wannier branch.
if(.not.allocated (usdus%us))then
call usdus%init(atoms,input%jspins)
endif
aoff = iachar('1')-1
d1 = mod(irank,10)
IF (irank < 100) THEN
......@@ -546,26 +554,26 @@ cccccccccccccccc end of the potential part ccccccccccc
allocate ( flo(ntypd,jmtd,2,nlod,2) )
allocate ( ff(ntypd,jmtd,2,0:lmaxd,2) )
allocate ( gg(ntypd,jmtd,2,0:lmaxd,2) )
allocate ( usdus%us(0:lmaxd,ntypd,2) )
allocate ( usdus%uds(0:lmaxd,ntypd,2) )
allocate ( usdus%dus(0:lmaxd,ntypd,2) )
allocate ( usdus%duds(0:lmaxd,ntypd,2) )
allocate ( usdus%ddn(0:lmaxd,ntypd,2) )
allocate ( usdus%ulos(nlod,ntypd,2) )
allocate ( usdus%dulos(nlod,ntypd,2) )
allocate ( usdus%uulon(nlod,ntypd,2) )
allocate ( usdus%dulon(nlod,ntypd,2) )
allocate ( usdus%uloulopn(nlod,nlod,ntypd,2) )
allocate ( kveclo(nlotot),nv(wannierspin) )
allocate ( kveclo_b(nlotot),nv_b(wannierspin) )
allocate ( kveclo_b2(nlotot),nv_b2(wannierspin) )
allocate ( k1(nvd,wannierspin),k2(nvd,wannierspin),
& k3(nvd,wannierspin) )
allocate ( k1_b(nvd,wannierspin),k2_b(nvd,wannierspin),
& k3_b(nvd,wannierspin) )
allocate ( k1_b2(nvd,wannierspin),k2_b2(nvd,wannierspin),
& k3_b2(nvd,wannierspin) )
! allocate ( usdus%us(0:lmaxd,ntypd,2) )
! allocate ( usdus%uds(0:lmaxd,ntypd,2) )
! allocate ( usdus%dus(0:lmaxd,ntypd,2) )
! allocate ( usdus%duds(0:lmaxd,ntypd,2) )
! allocate ( usdus%ddn(0:lmaxd,ntypd,2) )
! allocate ( usdus%ulos(nlod,ntypd,2) )
! allocate ( usdus%dulos(nlod,ntypd,2) )
! allocate ( usdus%uulon(nlod,ntypd,2) )
! allocate ( usdus%dulon(nlod,ntypd,2) )
! allocate ( usdus%uloulopn(nlod,nlod,ntypd,2) )
! allocate ( kveclo(nlotot),nv(wannierspin) )
! allocate ( kveclo_b(nlotot),nv_b(wannierspin) )
! allocate ( kveclo_b2(nlotot),nv_b2(wannierspin) )
! allocate ( k1(nvd,wannierspin),k2(nvd,wannierspin),
! & k3(nvd,wannierspin) )
! allocate ( k1_b(nvd,wannierspin),k2_b(nvd,wannierspin),
! & k3_b(nvd,wannierspin) )
! allocate ( k1_b2(nvd,wannierspin),k2_b2(nvd,wannierspin),
! & k3_b2(nvd,wannierspin) )
doublespin_start=1
if(l_noco.or.l_soc) then
......@@ -768,6 +776,11 @@ cccccccccccc read in the eigenvalues and vectors cccccc
! call cdn_read0(eig_id,irank,isize,jspin5,jspd,l_noco, !wannierspin instead of jspd?
! < ello,evac,epar,wk,n_bands,n_size)
CALL cdn_read0(eig_id,mpi%irank,mpi%isize,jspin5,
& input%jspins, !wannierspin instead of DIMENSION%jspd?&
& noco%l_noco, n_bands,n_size)
enddo
c.. now we want to define the maximum number of the bands by all kpts
......@@ -929,16 +942,18 @@ c if (mod(i_rec-1,isize).eq.irank) then
zzMat%l_real = l_real
! zzMat%nbasfcn = nbasfcn
zzMat%matsize1 = nbasfcn
zzMat%matsize1 = DIMENSION%nbasfcn
! zzMat%nbands = neigd
zzMat%matsize2 = neigd
zzMat%matsize2 = DIMENSION%neigd
IF(l_real) THEN
! ALLOCATE (zzMat%z_r(zzMat%nbasfcn,zzMat%nbands))
ALLOCATE (zzMat%data_r(zzMat%matsize1,zzMat%matsize2))
IF(.NOT.ALLOCATED(zzMat%data_r))
& ALLOCATE (zzMat%data_r(zzMat%matsize1,zzMat%matsize2))
ELSE
! ALLOCATE (zzMat%z_c(zzMat%nbasfcn,zzMat%nbands))
ALLOCATE (zzMat%data_c(zzMat%matsize1,zzMat%matsize2))
IF(.NOT.ALLOCATED(zzMat%data_c))
& ALLOCATE (zzMat%data_c(zzMat%matsize1,zzMat%matsize2))
END IF
! CALL cdn_read(
......@@ -967,13 +982,18 @@ c if (mod(i_rec-1,isize).eq.irank) then
IF(zzMat%l_real) THEN
! ALLOCATE (zMat_b%z_r(zMat%nbasfcn,zMat%nbands))
! ALLOCATE (zMat_b2%z_r(zMat%nbasfcn,zMat%nbands))
ALLOCATE (zMat_b%data_r(zMat%matsize1,zMat%matsize2))
ALLOCATE (zMat_b2%data_r(zMat%matsize1,zMat%matsize2))
IF(.NOT.ALLOCATED(zMat_b%data_r))
& ALLOCATE (zMat_b%data_r(zMat%matsize1,zMat%matsize2))
IF(.NOT.ALLOCATED(zMat_b2%data_r))
& ALLOCATE (zMat_b2%data_r(zMat%matsize1,zMat%matsize2))
ELSE
! ALLOCATE (zMat_b%z_c(zMat%nbasfcn,zMat%nbands))
! ALLOCATE (zMat_b2%z_c(zMat%nbasfcn,zMat%nbands))
ALLOCATE (zMat_b%data_c(zMat%matsize1,zMat%matsize2))
ALLOCATE (zMat_b2%data_c(zMat%matsize1,zMat%matsize2))
IF(.NOT.ALLOCATED(zMat_b%data_c))
& ALLOCATE (zMat_b%data_c(zMat%matsize1,zMat%matsize2))
IF(.NOT.ALLOCATED(zMat_b2%data_c))
& ALLOCATE (zMat_b2%data_c(zMat_b%matsize1,zMat_b%matsize2))
END IF
allocate (we_b(neigd), we_b2(neigd))
......@@ -987,7 +1007,7 @@ c if (mod(i_rec-1,isize).eq.irank) then
if (wann%l_bzsym) kptibz_b=irreduc(kptibz_b)
n_start=1
n_end=neigd
n_end=DIMENSION%neigd
eigg = 0.
call cpu_time(t0)
......@@ -999,6 +1019,21 @@ c if (mod(i_rec-1,isize).eq.irank) then
! < nmat_b,nv_b,ello,evdu,epar,kveclo_b,
! < k1_b,k2_b,k3_b,bkpt_b,wk_b,nbands_b,eigg,zzMat)
call lapw_b%init(input,noco,kpts,atoms,sym,kptibz_b,cell,
& (sym%zrfs.AND.(SUM(ABS(kpts%bk(3,:kpts%nkpt))).LT.1e-9)
& .AND..NOT.noco%l_noco.and.mpi%n_size==1),mpi)
CALL cdn_read(
& eig_id,
& DIMENSION%nvd,input%jspins,mpi%irank,mpi%isize, !wannierspin instead of DIMENSION%jspd?
& kptibz_b,jspin,DIMENSION%nbasfcn,
& noco%l_ss,noco%l_noco,DIMENSION%neigd,n_start,n_end,
& nbands_b,eigg,zzMat)
nslibd_b = 0
IF(zzMat%l_real) THEN
......@@ -1022,10 +1057,10 @@ c if (mod(i_rec-1,isize).eq.irank) then
eig_b(nslibd_b) = eigg(i)
we_b(nslibd_b) = we_b(i)
if(l_noco)then
funbas = nv_b(1) + nlotot
funbas = funbas+nv_b(2) + nlotot
funbas = lapw_b%nv(1) + atoms%nlotot
funbas = funbas+lapw_b%nv(2) + atoms%nlotot
else
funbas = nv_b(jspin) + nlotot
funbas = lapw_b%nv(jspin) + atoms%nlotot
endif
IF (zzMat%l_real) THEN
do j = 1,funbas
......@@ -1073,21 +1108,27 @@ c***********************************************************
call cpu_time(t0)
ALLOCATE(lapw_b%k1(SIZE(k1_b,1),SIZE(k1_b,2)))
ALLOCATE(lapw_b%k2(SIZE(k1_b,1),SIZE(k1_b,2)))
ALLOCATE(lapw_b%k3(SIZE(k1_b,1),SIZE(k1_b,2)))
lapw_b%k1 = k1_b
lapw_b%k2 = k2_b
lapw_b%k3 = k3_b
lapw_b%nmat = nmat_b
lapw_b%nv = nv_b
! ALLOCATE(lapw_b%k1(SIZE(k1_b,1),SIZE(k1_b,2)))
! ALLOCATE(lapw_b%k2(SIZE(k1_b,1),SIZE(k1_b,2)))
! ALLOCATE(lapw_b%k3(SIZE(k1_b,1),SIZE(k1_b,2)))
! lapw_b%k1 = k1_b
! lapw_b%k2 = k2_b
! lapw_b%k3 = k3_b
! lapw_b%nmat = nmat_b
! lapw_b%nv = nv_b
! I think the other variables of lapw are not needed here.
! CALL abcof(input,atoms,noccbd_b,sym,cell,bkpt_b,lapw_b,
! + noccbd_b,usdus,noco,jspin,kveclo_b,oneD,
! + acof_b,bcof_b,ccof_b,zMat_b)
DEALLOCATE(lapw_b%k1,lapw_b%k2,lapw_b%k3)
CALL abcof(input,atoms,sym,cell,lapw_b,
& noccbd_b,usdus,noco,jspin,oneD,
& acof_b,bcof_b,ccof_b,zMat_b)
! DEALLOCATE(lapw_b%k1,lapw_b%k2,lapw_b%k3)
call wann_abinv(atoms,
X acof_b,bcof_b,ccof_b)
......
......@@ -16,6 +16,7 @@ c*****************************************c
c J.-P. Hanke, Dec. 2015 c
c*****************************************c
module m_wann_uHu_int
use m_juDFT
contains
subroutine wann_uHu_int(
> chi,nvd,k1d,k2d,k3d,
......@@ -111,7 +112,8 @@ c ..local variables..
phase = rgphs(i1,i2,i3) ! TODO: sign also here?
phase2= rgphs(sign*i1,sign*i2,sign*i3)
if(phase.ne.phase2) then
stop 'rgphs in wann_uHu_int'
call juDFT_error("rgphs in wann_uHu_int",
& calledby="wann_uHu_int")
endif
ekk = rk_b(i) + rk_b2(j)
......
......@@ -34,6 +34,7 @@ c**************************c
integer :: ikpt_b,ikpt_b2
character(len=3) :: spin12(2)
integer :: cpu_index
character(len=60) :: header
data spin12/'WF1' , 'WF2'/
#ifdef CPP_MPI
......@@ -94,21 +95,25 @@ c******************************************************
open (305,file=spin12(jspin2)//trim(fending)//'.uHu'
> //trim(ftype))
write (305,*) 'Elements uHu at k+b1 and k+b2'
write (305,'(3i5)') nbnd,fullnkpts,nntot,nntot2
write (305,'(4i5)') nbnd,fullnkpts,nntot,nntot2
write (305,*)" "
write (305,*)" "
do ikpt = 1,fullnkpts
do ikpt_b = 1,nntot
do ikpt_b2 = 1,nntot2
write(305,'(i6,i6,i6)')ikpt,ikpt_b,ikpt_b2
! write(305,'(i6,i6,i6)')ikpt,ikpt_b,ikpt_b2
do i = 1,nbnd
do j = 1,nbnd
if(isize.gt.1) then
write (305,'(2f24.18)')
& real(uHu(j,i,ikpt_b2,ikpt_b,ikpt)),
& -aimag(uHu(j,i,ikpt_b2,ikpt_b,ikpt))
! & -aimag(uHu(j,i,ikpt_b2,ikpt_b,ikpt))
& aimag(uHu(j,i,ikpt_b2,ikpt_b,ikpt))
else
write (305,'(2f24.18)')
& real(uHu_in(j,i,ikpt_b2,ikpt_b,ikpt)),
& -aimag(uHu_in(j,i,ikpt_b2,ikpt_b,ikpt))
! & -aimag(uHu_in(j,i,ikpt_b2,ikpt_b,ikpt))
& aimag(uHu_in(j,i,ikpt_b2,ikpt_b,ikpt))
endif
enddo
enddo
......@@ -119,15 +124,25 @@ c******************************************************
else
open (305,file=spin12(jspin2)//trim(fending)//'.uHu'
> //trim(ftype),form='unformatted')
write (305) nbnd,fullnkpts,nntot,nntot2
write (305) bpt,gb
if(isize.gt.1) then
write (305) conjg(uHu)
else
write (305) conjg(uHu_in)
endif
close (305)
write (305) header
write (305) nbnd,fullnkpts,nntot !,nntot2
! write (305) bpt,gb
do ikpt = 1,fullnkpts
do ikpt_b = 1,nntot
do ikpt_b2 = 1,nntot2
if(isize.gt.1) then
! write (305) conjg(uHu)
write (305) uHu(:,:,ikpt_b2,ikpt_b,ikpt)
else
! write (305) conjg(uHu_in)
write (305) uHu_in(:,:,ikpt_b2,ikpt_b,ikpt)
endif
close (305)
enddo
enddo
enddo
endif
if((trim(ftype).ne.'_kq').and.l_check) then
write(*,*)'perform symcheck...'
......
......@@ -8,7 +8,8 @@
use m_juDFT
CONTAINS
SUBROUTINE wann_updown(
> mpi,input,sym,atoms,stars,vacuum,sphhar,oneD,noco,cell,vTot,
> DIMENSION,mpi,input,kpts,sym,atoms,stars,vacuum,
> sphhar,oneD,noco,cell,vTot,
> enpara,
> eig_id,l_real,mpi_comm,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
......@@ -73,8 +74,10 @@ c****************************************************************************
#endif
TYPE(t_dimension), INTENT(IN) :: DIMENSION
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_input),INTENT(IN) :: input
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_stars),INTENT(IN) :: stars
......@@ -201,7 +204,7 @@ c..wf-hamiltonian in real space (hopping in the same unit cell)
integer :: fullnkpts,kpt,kptibz,kptibz_b,j1,j2,j3,oper,oper_b,k
real :: bkrot(3)
integer :: ios,kplot,kplotoper,plotoper,gfcut
integer :: funbas_start,funbas_stop
integer :: funbas_start,funbas_stop,jspin5
complex :: phasust
integer,allocatable::pair_to_do(:,:)
integer :: ngopr1(natd)
......@@ -252,11 +255,11 @@ c..wf-hamiltonian in real space (hopping in the same unit cell)
complex,allocatable :: ubeffdg(:,:,:)
complex,allocatable :: dbeffug(:,:,:)
complex,allocatable :: dbeffdg(:,:,:)
complex,allocatable :: ubeffulog(:,:,:)
complex,allocatable :: dbeffulog(:,:,:)
complex,allocatable :: ulobeffug(:,:,:)
complex,allocatable :: ulobeffdg(:,:,:)
complex,allocatable :: ulobeffulog(:,:,:)
complex,allocatable :: ubeffulog(:,:,:,:)
complex,allocatable :: dbeffulog(:,:,:,:)
complex,allocatable :: ulobeffug(:,:,:,:)
complex,allocatable :: ulobeffdg(:,:,:,:)
complex,allocatable :: ulobeffulog(:,:,:,:,:)
integer :: spinloop1,spinloop2,ilop
TYPE(t_usdus) :: usdus
......@@ -430,10 +433,16 @@ c..reading the proj.1 / proj.2 / proj file
cccccccccccc read in the eigenvalues and vectors cccccc
do jspin=1,jspins
do jspin5=1,jspins
CALL judft_error("TODO:wann_updown")
! call cdn_read0(eig_id,irank,isize,jspin,jspd,l_noco,
! < ello,evac,epar,wk,n_bands,n_size)
CALL cdn_read0(eig_id,mpi%irank,mpi%isize,jspin5,
> input%jspins, !wannierspin instead of DIMENSION%jspd?&
> noco%l_noco, n_bands,n_size)
enddo
jspin=1
......@@ -725,19 +734,39 @@ c****************************************************************
zzMat(jspin)%matsize1 = nbasfcn
zzMat(jspin)%matsize2 = neigd
IF(l_real) THEN
ALLOCATE (zzMat(jspin)%data_r(zzMat(jspin)%matsize1,
IF(.NOT.ALLOCATED(zzMat(jspin)%data_r))
& ALLOCATE (zzMat(jspin)%data_r(zzMat(jspin)%matsize1,
+ zzMat(jspin)%matsize2))
ELSE
ALLOCATE (zzMat(jspin)%data_c(zzMat(jspin)%matsize1,
IF(.NOT.ALLOCATED(zzMat(jspin)%data_c))
& ALLOCATE (zzMat(jspin)%data_c(zzMat(jspin)%matsize1,
+ zzMat(jspin)%matsize2))
END IF
CALL lapw%init(input,noco,kpts,atoms,sym,
& kptibz,cell,
& (sym%zrfs.AND.(SUM(ABS(kpts%bk(3,:kpts%nkpt))).LT.1e-9)
& .AND..NOT.noco%l_noco.and.mpi%n_size==1),mpi)
CALL cdn_read(
& eig_id,
& DIMENSION%nvd,input%jspins,mpi%irank,mpi%isize, !wannierspin instead of DIMENSION%jspd?
& kptibz,jspin,DIMENSION%nbasfcn,
& noco%l_ss,noco%l_noco,DIMENSION%neigd,n_start,n_end,
& nbands,eigg(:,jspin),zzMat(jspin))
! CALL cdn_read(
! > eig_id,
! > nvd,jspd,irank,isize,kptibz,jspin,nbasfcn,
! > l_ss,l_noco,neigd,n_start,n_end,
! < nmat,nv,ello,evdu,epar,
! < k1,k2,k3,bkpt,wk,nbands,eigg(:,jspin),zzMat(jspin))
call judft_error("cdn_read in wann_updown")
nrec=0
enddo !jspin
......@@ -784,10 +813,10 @@ c...we work only within the energy window
nslibd = nslibd + 1
eig(nslibd) = eigg(i,1)
if(l_noco)then
funbas=nv(1)+nlotot
funbas=funbas+nv(2)+nlotot
funbas=lapw%nv(1)+atoms%nlotot
funbas=funbas+lapw%nv(2)+atoms%nlotot
else
funbas=nv(jspin)+nlotot
funbas=lapw%nv(jspin)+atoms%nlotot
endif
IF (zzMat(jspin)%l_real) THEN
do j = 1,funbas
......@@ -841,14 +870,14 @@ c...the overlap matrix Mmn which is computed for each k- and b-point
c...generation the A,B,C coefficients in the spheres
c...for the lapws and local orbitals, summed by the basis functions
ALLOCATE(lapw%k1(SIZE(k1,1),SIZE(k1,2)))
ALLOCATE(lapw%k2(SIZE(k1,1),SIZE(k1,2)))
ALLOCATE(lapw%k3(SIZE(k1,1),SIZE(k1,2)))
lapw%nv = nv
lapw%nmat = nmat
lapw%k1 = k1
lapw%k2 = k2
lapw%k3 = k3
! ALLOCATE(lapw%k1(SIZE(k1,1),SIZE(k1,2)))
! ALLOCATE(lapw%k2(SIZE(k1,1),SIZE(k1,2)))
! ALLOCATE(lapw%k3(SIZE(k1,1),SIZE(k1,2)))
! lapw%nv = nv
! lapw%nmat = nmat
! lapw%k1 = k1
1 lapw%k2 = k2
! lapw%k3 = k3
! I think the other variables of lapw are not needed here.
call cpu_time(delta)
......@@ -864,7 +893,7 @@ c...for the lapws and local orbitals, summed by the basis functions
< ccof(-llod:,:,:,:,jspin))
enddo !jspin
DEALLOCATE(lapw%k1,lapw%k2,lapw%k3)
! DEALLOCATE(lapw%k1,lapw%k2,lapw%k3)
jspin=1
call cpu_time(delta1)
......
......@@ -360,7 +360,8 @@ CONTAINS
IF(wann%l_updown)THEN
CALL wann_updown(&
mpi,input,sym,atoms,stars,vacuum,sphhar,oneD,noco,cell,vTot,&
DIMENSION,mpi,input,kpts,sym,atoms,stars,vacuum,sphhar, &
oneD,noco,cell,vTot,&
enpara,eig_idList(1),l_real,&
mpi%mpi_comm,atoms%l_dulo,noco%l_noco,noco%l_ss,&
atoms%lmaxd,atoms%ntype,DIMENSION%neigd,atoms%nat,sym%nop,&
......
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