Commit ecd2a603 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents f6288a06 e6b8dae6
......@@ -47,8 +47,6 @@ pages:
paths:
- public
only:
- schedules
- triggers
- web
doxygen:
......@@ -65,8 +63,6 @@ doxygen:
- build/fleur_MPI
- build/inpgen
only:
- schedules
- triggers
- web
......@@ -179,4 +175,4 @@ gfortran-coverage:
url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html
only:
- web
- schedules
\ No newline at end of file
......@@ -74,7 +74,7 @@ CONTAINS
INTEGER,INTENT(IN) :: eig_id
! Local Scalars
INTEGER jsp,nk,nred,ne_all,ne_found
INTEGER jsp,nk,nred,ne_all,ne_found,neigd2
INTEGER ne, nk_i
INTEGER isp,i,j,err
LOGICAL l_wu,l_file,l_real,l_zref
......@@ -257,18 +257,19 @@ CONTAINS
END DO k_loop
END DO ! spin loop ends
neigd2 = MIN(dimension%neigd,dimension%nbasfcn)
#ifdef CPP_MPI
IF (banddos%unfoldband) THEN
results%unfolding_weights = CMPLX(0.0,0.0)
CALL MPI_ALLREDUCE(unfoldingBuffer,results%unfolding_weights,SIZE(results%unfolding_weights,1)*SIZE(results%unfolding_weights,2)*SIZE(results%unfolding_weights,3),CPP_MPI_COMPLEX,MPI_SUM,mpi%mpi_comm,ierr)
END IF
CALL MPI_ALLREDUCE(neigBuffer,results%neig,kpts%nkpt*input%jspins,MPI_INTEGER,MPI_SUM,mpi%mpi_comm,ierr)
CALL MPI_ALLREDUCE(eigBuffer(:dimension%neigd,:,:),results%eig(:dimension%neigd,:,:),dimension%neigd*kpts%nkpt*input%jspins,MPI_DOUBLE_PRECISION,MPI_MIN,mpi%mpi_comm,ierr)
CALL MPI_ALLREDUCE(eigBuffer(:neigd2,:,:),results%eig(:neigd2,:,:),neigd2*kpts%nkpt*input%jspins,MPI_DOUBLE_PRECISION,MPI_MIN,mpi%mpi_comm,ierr)
CALL MPI_BARRIER(mpi%MPI_COMM,ierr)
#else
results%neig(:,:) = neigBuffer(:,:)
results%eig(:dimension%neigd,:,:) = eigBuffer(:dimension%neigd,:,:)
results%eig(:neigd2,:,:) = eigBuffer(:neigd2,:,:)
results%unfolding_weights(:,:,:) = unfoldingBuffer(:,:,:)
#endif
......
......@@ -136,7 +136,7 @@ CONTAINS
atoms%nlo(:) = 0
atoms%llo(:,:) = -1
input%eig66(1)=.FALSE.
! HF/hybrid functionals/EXX
ALLOCATE ( hybrid%nindx(0:atoms%lmaxd,atoms%ntype) )
......@@ -195,6 +195,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)
......
......@@ -879,7 +879,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 )'
......
......@@ -161,7 +161,7 @@ CONTAINS
! Open/allocate eigenvector storage (start)
l_real=sym%invs.AND..NOT.noco%l_noco
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,sym%invs.AND..NOT.noco%l_noco)
......@@ -218,8 +218,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
......@@ -253,8 +254,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)
ENDIF
vTot%mmpMat = vTemp%mmpMat
!!$ eig_idList(pc) = eig_id
CALL timestop("eigen")
......@@ -277,7 +280,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)
CALL timestop("gen. of hamil. and diag. (total)")
......
......@@ -37,6 +37,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
......@@ -114,7 +115,7 @@
#endif
!call juDFT_check_para()
CALL field%init(input)
input%eig66(1)=.FALSE.
input%gw = -1
input%gw_neigd = 0
!-t3e
......
......@@ -354,7 +354,7 @@ MODULE m_types_setup
END TYPE t_noco
TYPE t_input
INTEGER :: eig66(2)
LOGICAL :: eig66(2)
LOGICAL :: strho
LOGICAL :: cdinf
LOGICAL :: vchk
......@@ -574,6 +574,10 @@ MODULE m_types_setup
LOGICAL :: l_hsomtxvec_to_lmpzsoc_unf
LOGICAL :: l_hsomtxvec_to_lmpzsoc
LOGICAL :: l_hsomtxvec_unf_to_lmpzsoc
LOGICAL :: l_hsomtx_unf_to_hsoc_unf
LOGICAL :: l_hsomtx_to_hsoc_unf
LOGICAL :: l_hsomtx_to_hsoc
LOGICAL :: l_hsomtx_unf_to_hsoc
LOGICAL :: l_unformatted
LOGICAL :: l_oc_f
LOGICAL :: l_ndegen
......@@ -601,9 +605,13 @@ MODULE m_types_setup
LOGICAL :: l_perpmagrs
LOGICAL :: l_perpmag
LOGICAL :: l_perpmagat
INTEGER :: perpmagl
LOGICAL :: l_perpmagatlres
LOGICAL :: l_perpmagatrs
LOGICAL :: l_socmatrs
LOGICAL :: l_socmat
LOGICAL :: l_socmatvec
LOGICAL :: l_socmatvecrs
LOGICAL :: l_soctomom
LOGICAL :: l_kptsreduc2
LOGICAL :: l_nablapaulirs
......
......@@ -81,9 +81,9 @@ wannier/wann_wan90prep.F
wannier/wann_wannierize.F
wannier/wann_wigner_seitz.f
wannier/wann_write_amn.F
wannier/wann_write_hsomtx.F
wannier/wann_write_matrix4.F
wannier/wann_write_matrix5.F
wannier/wann_write_matrix6.F
wannier/wann_write_mmnk2.F
wannier/wann_write_mmnk.F
wannier/wann_write_nabla.F
......
......@@ -28,6 +28,7 @@ SUBROUTINE initWannierDefaults(wann)
wann%oc_num_orbs = 0
! integer,allocatable :: oc_orbs(:)
wann%l_perpmagatlres= .FALSE.
wann%l_unformatted = .FALSE.
wann%l_oc_f = .FALSE.
wann%l_ndegen = .FALSE.
......@@ -60,6 +61,8 @@ SUBROUTINE initWannierDefaults(wann)
wann%l_perpmagatrs = .FALSE.
wann%l_socmatrs = .FALSE.
wann%l_socmat = .FALSE.
wann%l_socmatvecrs = .FALSE.
wann%l_socmatvec = .FALSE.
wann%l_soctomom = .FALSE.
wann%l_kptsreduc2 = .FALSE.
wann%l_nablapaulirs = .FALSE.
......@@ -116,6 +119,25 @@ SUBROUTINE initWannierDefaults(wann)
wann%l_matrixuHu = .FALSE.
wann%l_matrixuHu_dmi = .FALSE.
wann%l_mmn0_unf_to_spn_unf= .FALSE.
wann%l_mmn0_to_spn_unf= .FALSE.
wann%l_mmn0_to_spn= .FALSE.
wann%l_mmn0_to_spn2= .FALSE.
wann%l_mmn0_unf_to_spn= .FALSE.
wann%l_perpmag_unf_to_tor_unf= .FALSE.
wann%l_perpmag_to_tor_unf= .FALSE.
wann%l_perpmag_to_tor= .FALSE.
wann%l_perpmag_unf_to_tor= .FALSE.
wann%l_hsomtxvec_unf_to_lmpzsoc_unf= .FALSE.
wann%l_hsomtxvec_to_lmpzsoc_unf= .FALSE.
wann%l_hsomtxvec_to_lmpzsoc= .FALSE.
wann%l_hsomtxvec_unf_to_lmpzsoc= .FALSE.
wann%l_hsomtx_unf_to_hsoc_unf= .FALSE.
wann%l_hsomtx_to_hsoc_unf= .FALSE.
wann%l_hsomtx_to_hsoc= .FALSE.
wann%l_hsomtx_unf_to_hsoc= .FALSE.
wann%ikptstart = 1
wann%band_min(1:2) = -1
wann%band_max(1:2) = -1
......
This diff is collapsed.
This diff is collapsed.
......@@ -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,
......@@ -32,7 +33,7 @@ c*****************************************c
implicit none
TYPE(t_zmat), INTENT(IN) :: zMat_b, zMat_b2
TYPE(t_mat), INTENT(IN) :: zMat_b, zMat_b2
c ..arguments..
logical, intent(in) :: l_kin
......@@ -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)
......@@ -131,20 +133,20 @@ c ..local variables..
! complex conjugate of (z(k+b1,g))^* vstep(g,g') z(k+b2,g')
IF(zMat_b%l_real) THEN
call CPP_BLAS_sgemm('T','N',nv_b,nslibd_b2,nv_b2,real(1.0),
> vstep_r,nv_b2,zMat_b2%z_r(1+addnoco2,1),nbasfcn,
> vstep_r,nv_b2,zMat_b2%data_r(1+addnoco2,1),nbasfcn,
> real(0.0),mat_r,nv_b)
call CPP_BLAS_sgemm('T','N',nslibd_b,nslibd_b2,nv_b,
> real(1.0),zMat_b%z_r(1+addnoco,1),nbasfcn,
> real(1.0),zMat_b%data_r(1+addnoco,1),nbasfcn,
> mat_r,nv_b,real(0.0),uHu_tmp,nslibd_b)
uHu(1:nslibd_b,1:nslibd_b2) = uHu(1:nslibd_b,1:nslibd_b2)
> + uHu_tmp(1:nslibd_b,1:nslibd_b2)*chi
ELSE
call CPP_BLAS_cgemm('T','N',nv_b,nslibd_b2,nv_b2,cmplx(1.0),
> vstep_c,nv_b2,zMat_b2%z_c(1+addnoco2,1),nbasfcn,
> vstep_c,nv_b2,zMat_b2%data_c(1+addnoco2,1),nbasfcn,
> cmplx(0.0),mat_c,nv_b)
mat_c = conjg(mat_c)
call CPP_BLAS_cgemm('T','N',nslibd_b,nslibd_b2,nv_b,
> chi,zMat_b%z_c(1+addnoco,1),nbasfcn,
> chi,zMat_b%data_c(1+addnoco,1),nbasfcn,
> mat_c,nv_b,cmplx(1.0),uHu,nbnd)
END IF
......
This diff is collapsed.
......@@ -28,7 +28,7 @@ c***************************************c
implicit none
TYPE(t_zmat), INTENT(IN) :: zMat, zMat_b
TYPE(t_mat), INTENT(IN) :: zMat, zMat_b
c .. scalar Arguments..
logical, intent (in) :: l_noco,l_soc,zrfs
......@@ -276,13 +276,13 @@ c-----> loop over basis functions
IF(zMat%l_real) THEN
do n = 1,nslibd
ac(l,n) = ac(l,n) + zMat%z_r(k+addnoco,n)*av
bc(l,n) = bc(l,n) + zMat%z_r(k+addnoco,n)*bv
ac(l,n) = ac(l,n) + zMat%data_r(k+addnoco,n)*av
bc(l,n) = bc(l,n) + zMat%data_r(k+addnoco,n)*bv
enddo
ELSE
do n = 1,nslibd
ac(l,n) = ac(l,n) + zMat%z_c(k+addnoco,n)*av
bc(l,n) = bc(l,n) + zMat%z_c(k+addnoco,n)*bv
ac(l,n) = ac(l,n) + zMat%data_c(k+addnoco,n)*av
bc(l,n) = bc(l,n) + zMat%data_c(k+addnoco,n)*bv
enddo
END IF
enddo
......@@ -323,13 +323,13 @@ c-----> loop over basis functions
IF(zMat_b%l_real) THEN
do n = 1,nslibd_b
ac_b(l,n) = ac_b(l,n) + zMat_b%z_r(k+addnoco2,n)*av
bc_b(l,n) = bc_b(l,n) + zMat_b%z_r(k+addnoco2,n)*bv
ac_b(l,n) = ac_b(l,n) + zMat_b%data_r(k+addnoco2,n)*av
bc_b(l,n) = bc_b(l,n) + zMat_b%data_r(k+addnoco2,n)*bv
enddo
ELSE
do n = 1,nslibd_b
ac_b(l,n) = ac_b(l,n) + zMat_b%z_c(k+addnoco2,n)*av
bc_b(l,n) = bc_b(l,n) + zMat_b%z_c(k+addnoco2,n)*bv
ac_b(l,n) = ac_b(l,n) + zMat_b%data_c(k+addnoco2,n)*av
bc_b(l,n) = bc_b(l,n) + zMat_b%data_c(k+addnoco2,n)*bv
enddo
END IF
enddo
......
......@@ -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...'
......
This diff is collapsed.
......@@ -111,6 +111,11 @@ CONTAINS
wann%l_perpmag_to_tor.or. &
wann%l_perpmag_unf_to_tor.or. &
wann%l_hsomtx_unf_to_hsoc_unf.or. &
wann%l_hsomtx_to_hsoc_unf.or. &
wann%l_hsomtx_to_hsoc.or. &
wann%l_hsomtx_unf_to_hsoc .or.&
wann%l_hsomtxvec_unf_to_lmpzsoc_unf.or. &
wann%l_hsomtxvec_to_lmpzsoc_unf.or. &
wann%l_hsomtxvec_to_lmpzsoc.or. &
......
This diff is collapsed.
......@@ -27,6 +27,7 @@ subroutine wann_read_inp(input,l_p0,wann)
real :: version_real
!-----some defaults
wann%l_perpmagatlres=.false.
wann%l_atomlist=.false.
wann%l_ndegen=.false.
wann%l_orbitalmom=.false.
......@@ -53,6 +54,7 @@ subroutine wann_read_inp(input,l_p0,wann)
wann%l_perpmagatrs=.false.
wann%l_socmatrs=.false.
wann%l_socmat=.false.
wann%l_socmatvec=.false.
wann%l_soctomom=.false.
wann%l_kptsreduc2=.false.
wann%l_nablars=.false.
......@@ -123,6 +125,10 @@ subroutine wann_read_inp(input,l_p0,wann)
wann%l_hsomtxvec_to_lmpzsoc_unf=.false.
wann%l_hsomtxvec_to_lmpzsoc=.false.
wann%l_hsomtxvec_unf_to_lmpzsoc=.false.
wann%l_hsomtx_unf_to_hsoc_unf=.false.
wann%l_hsomtx_to_hsoc_unf=.false.
wann%l_hsomtx_to_hsoc=.false.
wann%l_hsomtx_unf_to_hsoc=.false.
!-----read the input file 'wann_inp'
l_file=.false.
......@@ -240,8 +246,27 @@ subroutine wann_read_inp(input,l_p0,wann)
wann%l_hsomtxvec_to_lmpzsoc=.true.
elseif(trim(task).eq.'hsomtxvec_unf_to_lmpzsoc')then
wann%l_hsomtxvec_unf_to_lmpzsoc=.true.
elseif(trim(task).eq.'hsomtx_unf_to_hsoc_unf')then
wann%l_hsomtx_unf_to_hsoc_unf=.true.
elseif(trim(task).eq.'hsomtx_to_hsoc_unf')then
wann%l_hsomtx_to_hsoc_unf=.true.
elseif(trim(task).eq.'hsomtx_to_hsoc')then
wann%l_hsomtx_to_hsoc=.true.
elseif(trim(task).eq.'hsomtx_unf_to_hsoc')then
wann%l_hsomtx_unf_to_hsoc=.true.
elseif(trim(task).eq.'perpmagatlres')then
wann%l_perpmagatlres=.true.
backspace(916)
read(916,*,iostat=ios)task,wann%perpmagl
if (ios /= 0) &
CALL juDFT_error ("error reading perpmagl", &
calledby="wann_read_inp")
elseif(trim(task).eq.'socmat')then
wann%l_socmat=.true.
elseif(trim(task).eq.'socmatvec')then
wann%l_socmatvec=.true.
elseif(trim(task).eq.'socmatrs')then
wann%l_socmatrs=.true.
elseif(trim(task).eq.'soctomom')then
......@@ -505,8 +530,27 @@ subroutine wann_read_inp(input,l_p0,wann)
wann%l_hsomtxvec_to_lmpzsoc=.true.
elseif(trim(task).eq.'hsomtxvec_unf_to_lmpzsoc')then
wann%l_hsomtxvec_unf_to_lmpzsoc=.true.
elseif(trim(task).eq.'hsomtx_unf_to_hsoc_unf')then
wann%l_hsomtx_unf_to_hsoc_unf=.true.
elseif(trim(task).eq.'hsomtx_to_hsoc_unf')then
wann%l_hsomtx_to_hsoc_unf=.true.
elseif(trim(task).eq.'hsomtx_to_hsoc')then
wann%l_hsomtx_to_hsoc=.true.
elseif(trim(task).eq.'hsomtx_unf_to_hsoc')then
wann%l_hsomtx_unf_to_hsoc=.true.
elseif(trim(task).eq.'perpmagatlres')then
wann%l_perpmagatlres=.true.
backspace(916)
read(916,*,iostat=ios)task,wann%perpmagl
if (ios /= 0) &
CALL juDFT_error ("error reading perpmagl", &
calledby="wann_read_inp")
elseif(trim(task).eq.'socmat')then
wann%l_socmat=.true.
elseif(trim(task).eq.'socmatvec')then
wann%l_socmatvec=.true.
elseif(trim(task).eq.'socmatrs')then
wann%l_socmatrs=.true.
elseif(trim(task).eq.'soctomom')then
......
......@@ -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,
......@@ -50,8 +51,9 @@ c****************************************************************************
use m_wann_radovlp_integrals
use m_matmul,only : matmul3,matmul3r
use m_wann_socmat
use m_wann_write_hsomtx
use m_wann_write_matrix5
use m_wann_write_nabla
use m_wann_write_matrix6
use m_wann_write_amn
use m_wann_write_nabla
use m_wann_mmkb_int
......@@ -72,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
......@@ -168,6 +172,7 @@ cccccccccccccccccc local variables cccccccccccccccccccc
!!! the Mmn matrices
complex, allocatable :: surfcurr(:,:,:,:)
complex, allocatable :: hsomtx(:,:,:,:,:),hsomtx_l(:,:,:,:)
complex, allocatable :: hsomtxvec(:,:,:,:,:,:)
complex, allocatable :: mmnk(:,:,:,:),mmn(:,:,:)
complex, allocatable :: perpmag(:,:,:)
complex, allocatable :: amn(:,:,:),nablamat(:,:,:,:)
......@@ -199,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)
......@@ -250,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
......@@ -428,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
......@@ -496,6 +507,11 @@ c##################################################################
allocate ( hsomtx_l(nbnd,nbnd,2,2) )
endif
if(wann%l_socmatvec)then
allocate ( hsomtxvec(2,2,nbnd,nbnd,3,fullnkpts) )
hsomtxvec=0.0
endif
write (*,*) 'nwfs=',nwfs
allocate ( flo(ntypd,jmtd,2,nlod,2) )
......@@ -666,15 +682,20 @@ c****************************************************************
allocate( ubeffdg(0:lmd,0:lmd,1:ntype) )
allocate( dbeffug(0:lmd,0:lmd,1:ntype) )
allocate( dbeffdg(0:lmd,0:lmd,1:ntype) )
allocate( ubeffulog(0:lmd,0:15,1:ntype) )
allocate( dbeffulog(0:lmd,0:15,1:ntype) )
allocate( ulobeffug(0:lmd,0:15,1:ntype) )
allocate( ulobeffdg(0:lmd,0:15,1:ntype) )
allocate( ulobeffulog(0:15,0:15,1:ntype) )
allocate( ubeffulog(0:lmd,1:nlod,-llod:llod,1:ntype) )
allocate( dbeffulog(0:lmd,1:nlod,-llod:llod,1:ntype) )
allocate( ulobeffug(0:lmd,1:nlod,-llod:llod,1:ntype) )
allocate( ulobeffdg(0:lmd,1:nlod,-llod:llod,1:ntype) )
allocate( ulobeffulog(1:nlod,-llod:llod,
& 1:nlod,-llod:llod,1:ntype) )
call wann_gabeffgagaunt(
> wann