Commit 8db15323 authored by Frank Freimuth's avatar Frank Freimuth

Update wann_uHu_dmi.F

parent 46600ea1
......@@ -188,8 +188,8 @@ c ..local arrays..
real :: eig(neigd),eig_b(neigd),eig_b2(neigd)
real :: uuilon(nlod,ntypd),duilon(nlod,ntypd)
real :: ulouilopn(nlod,nlod,ntypd)
real :: ello(nlod,ntypd,max(2,jspd)),evac(2,max(2,jspd))
real :: epar(0:lmaxd,ntypd,max(2,jspd)),evdu(2,max(jspd,2))
real :: evac(2,max(2,jspd))
real :: evdu(2,max(jspd,2))
real :: qpt_i(3),qptb_i(3)
real :: alph_i(ntypd),alphb_i(ntypd)
real :: beta_i(ntypd),betab_i(ntypd)
......@@ -860,12 +860,13 @@ c na = na + neq(n)
> memd,nlhd,ntypsd,ntypd,jmtd,lmaxd,jspd,ntype,dx,
> rmsh,jri,lmax,ntypsy,natd,lnonsph,lmd,lmplmd,clnu,
> mlh,nmem,llh,nlh,neq,irank,mlotot,mlolotot,
> vTot%mt(:,:,:,jspin3),nlod,llod,loplod,ello(1,1,jspin3),
> vTot%mt(:,:,:,jspin3),nlod,llod,loplod,
> enpara%ello(1,1,jspin3),
> llo,nlo,lo1l,l_dulo,ulo_der,ff(:,:,:,:,jspin),
> gg(:,:,:,:,jspin),flo(:,:,:,:,jspin),
> ff(:,:,:,:,jspin_b),gg(:,:,:,:,jspin_b),
> flo(:,:,:,:,jspin_b),kdiff,kdiff2,nntot,nntot2,bmat,bbmat,
> vr(1,1,jspin3),epar(0,1,1),invsat,jspin,jspin_b,
> vr(1,1,jspin3),enpara%el0(0,1,1),invsat,jspin,jspin_b,
> l_skip_sph,l_skip_non,l_skip_loc,
< tuu(:,:,:,:,doublespin),tud(:,:,:,:,doublespin),
> tdu(:,:,:,:,doublespin),tdd(:,:,:,:,doublespin),
......@@ -900,11 +901,11 @@ c na = na + neq(n)
> ntypd,jmtd,lmaxd,jspd,
> ntype,dx,rmsh,jri,lmax,natd,
> lmd,lmplmd,neq,irank,
> nlod,llod,loplod,ello,llo,nlo,lo1l,l_dulo,ulo_der,
> nlod,llod,loplod,enpara%ello0,llo,nlo,lo1l,l_dulo,ulo_der,
> ff(:,:,:,:,jspin),gg(:,:,:,:,jspin),flo(:,:,:,:,jspin),
> ff(:,:,:,:,jspin_b),gg(:,:,:,:,jspin_b),flo(:,:,:,:,jspin_b),
> kdiff,kdiff2,nntot,nntot2,bmat,bbmat,
> vr,epar,jspin,jspin5,jspins,
> vr,enpara%el0,jspin,jspin5,jspins,
> .true.,theta_i,phi_i,alph_i,beta_i,l_noco,l_skip_loc,
< tuu_soc(:,:,:,:,tspin),tud_soc(:,:,:,:,tspin),
> tdu_soc(:,:,:,:,tspin),tdd_soc(:,:,:,:,tspin),
......@@ -1184,6 +1185,21 @@ c***********************************************************
! < eigg,zz,cp_time)
!
!#endif
call lapw_b2%init(input,noco,kpts,atoms,sym,qptibz_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?&
& qptibz_b,jspin,DIMENSION%nbasfcn,
& noco%l_ss,noco%l_noco,DIMENSION%neigd,n_start,n_end,
& nbands_b2,eigg,zzMat)
nslibd_b2 = 0
IF(ANY(bkpt_b2.ne.bkpt)) stop 'bkpt_b2.ne.bkpt'
......@@ -1209,10 +1225,10 @@ c***********************************************************
eig_b2(nslibd_b2) = eigg(i)
we_b2(nslibd_b2) = we_b2(i)
if(l_noco)then
funbas = nv_b2(1) + nlotot
funbas = funbas+nv_b2(2) + nlotot
funbas = lapw_b2%nv(1) + atoms%nlotot
funbas = funbas+lapw_b2%nv(2) + atoms%nlotot
else
funbas = nv_b2(jspin_b) + nlotot
funbas = lapw_b2%nv(jspin_b) + atoms%nlotot
endif
IF (zzMat%l_real) THEN
do j = 1,funbas
......@@ -1236,7 +1252,7 @@ c***********************************************************
t_eig = t_eig + t1 - t0
addnoco2 = 0
if(l_noco.and.jspin_b.eq.2) addnoco2=nv_b2(1)+nlotot
if(l_noco.and.jspin_b.eq.2) addnoco2=lapw_b2%nv(1)+atoms%nlotot
! set up a(k+b2),b(k+b2),c(k+b2)
allocate( acof_b2(noccbd_b2,0:lmd,natd),
......@@ -1245,21 +1261,21 @@ c***********************************************************
call cpu_time(t0)
ALLOCATE(lapw_b2%k1(SIZE(k1_b2,1),SIZE(k1_b2,2)))
ALLOCATE(lapw_b2%k2(SIZE(k1_b2,1),SIZE(k1_b2,2)))
ALLOCATE(lapw_b2%k3(SIZE(k1_b2,1),SIZE(k1_b2,2)))
lapw_b2%k1 = k1_b2
lapw_b2%k2 = k2_b2
lapw_b2%k3 = k3_b2
lapw_b2%nmat = nmat_b2
lapw_b2%nv = nv_b2
! ALLOCATE(lapw_b2%k1(SIZE(k1_b2,1),SIZE(k1_b2,2)))
! ALLOCATE(lapw_b2%k2(SIZE(k1_b2,1),SIZE(k1_b2,2)))
! ALLOCATE(lapw_b2%k3(SIZE(k1_b2,1),SIZE(k1_b2,2)))
! lapw_b2%k1 = k1_b2
! lapw_b2%k2 = k2_b2
! lapw_b2%k3 = k3_b2
! lapw_b2%nmat = nmat_b2
! lapw_b2%nv = nv_b2
! I think the other variables of lapw are not needed here.
! CALL abcof(input,atoms,noccbd_b2,sym,cell,bkpt_b2,lapw_b2,
! + noccbd_b2,usdus,noco,jspin_b,kveclo_b2,oneD,
! + acof_b2,bcof_b2,ccof_b2,zMat_b2)
DEALLOCATE(lapw_b2%k1,lapw_b2%k2,lapw_b2%k3)
! DEALLOCATE(lapw_b2%k1,lapw_b2%k2,lapw_b2%k3)
call wann_abinv(atoms,
X acof_b2,bcof_b2,ccof_b2)
......@@ -1337,8 +1353,8 @@ c**************************************c
call wann_uHu_sph(
> chi,nbnd,llod,nslibd_b,nslibd_b2,nlod,natd,ntypd,
> lmd,jmtd,taual,nop,lmax,ntype,neq,nlo,llo,
> acof_b,bcof_b,ccof_b,bkpt_b2,
> acof_b2,bcof_b2,ccof_b2,bkpt_b,bkpt,
> acof_b,bcof_b,ccof_b,lapw_b2%bkpt,
> acof_b2,bcof_b2,ccof_b2,lapw_b%bkpt,lapw%bkpt,
> gb(:,ikpt_b,ikpt),(/0,0,0/),
< tuu_soc(:,:,:,:,1),
> tud_soc(:,:,:,:,1),
......@@ -1357,8 +1373,8 @@ c**************************************c
call wann_uHu_sph(
> chi2,nbnd,llod,nslibd_b,nslibd_b2,nlod,natd,ntypd,
> lmd,jmtd,taual,nop,lmax,ntype,neq,nlo,llo,
> acof_b,bcof_b,ccof_b,bkpt_b2,
> acof_b2,bcof_b2,ccof_b2,bkpt_b,bkpt,
> acof_b,bcof_b,ccof_b,lapw_b2%bkpt,
> acof_b2,bcof_b2,ccof_b2,lapw_b%bkpt,lapw%bkpt,
> gb(:,ikpt_b,ikpt),(/0,0,0/),
< tuu_soc(:,:,:,:,2),
> tud_soc(:,:,:,:,2),
......@@ -1384,12 +1400,12 @@ c**************************************c
! matrix elements < S | H_{SS} | S' > x chi
call cpu_time(t0)
call wann_uHu_int(chi,nvd,k1d,k2d,k3d,n3d,
> nv_b(jspin),nv_b2(jspin_b),nbnd,neigd,
> nslibd_b,nslibd_b2,nbasfcn,addnoco,addnoco2,
> k1_b(:,jspin), k2_b(:,jspin), k3_b(:,jspin),
> gb(:,ikpt_b,ikpt),
> k1_b2(:,jspin_b),k2_b2(:,jspin_b),k3_b2(:,jspin_b),
> (/0,0,0/),bkpt,bbmat,
> lapw_b%nv(jspin),lapw_b2%nv(jspin_b),nbnd,neigd,
> nslibd_b,nslibd_b2,nbasfcn,addnoco,addnoco2,
> lapw_b%k1(:,jspin),lapw_b%k2(:,jspin),lapw_b%k3(:,jspin),
> gb(:,ikpt_b,ikpt),
> lapw_b2%k1(:,jspin_b),lapw_b2%k2(:,jspin_b),lapw_b2%k3(:,jspin_b),
> (/0,0,0/),lapw%bkpt,bbmat,
> vpw(:,jspin3),zMat_b,zMat_b2,rgphs,
> ustep,ig,.true.,sign2,
> uHu(:,:,iqpt_b,ikpt_b,i_rec))
......@@ -1405,11 +1421,15 @@ c**************************************c
> chi,l_noco,l_soc,zrfs,jspins,nlotot,qpt_i,nbnd,z1,
> nmzxyd,nmzd,n2d,nv2d,k1d,k2d,k3d,n3d,nvac,ig,
> rgphs,nmzxy,nmz,delz,ig2,nq2,kv2,area,bmat,bbmat,
> evac(:,jspin),evac(:,jspin_b),bkpt_b,bkpt_b2,
> evac(:,jspin),evac(:,jspin_b),
> lapw_b%bkpt,lapw_b2%bkpt,
> vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,jspin,k1_b,k2_b,k3_b,
> k1_b2,k2_b2,k3_b2,wannierspin,nvd,nbasfcn,neigd,
> zMat_b,zMat_b2,nv_b,nv_b2,omtil,gb(:,ikpt_b,ikpt),
> jspin,jspin_b,jspin,
> lapw_b%k1,lapw_b%k2,lapw_b%k3,
> lapw_b2%k1,lapw_b2%k2,lapw_b2%k3,
> wannierspin,nvd,nbasfcn,neigd,
> zMat_b,zMat_b2,
> lapw_b%nv,lapw_b2%nv,omtil,gb(:,ikpt_b,ikpt),
> (/0,0,0/),sign2,
> uHu(:,:,iqpt_b,ikpt_b,i_rec))
call cpu_time(t1)
......@@ -1422,9 +1442,12 @@ c**************************************c
> DIMENSION,oneD,vacuum,stars,cell,
> chi,l_noco,l_soc,jspins,nlotot,nbnd,z1,nmzxyd,nmzd,
> nv2d,k1d,k2d,k3d,n2d,n3d,ig,nmzxy,nmz,delz,ig2,
> bbmat,evac(1,jspin),evac(1,jspin_b),bkpt_b,bkpt_b2,
> bbmat,evac(1,jspin),evac(1,jspin_b),
> lapw_b%bkpt,lapw_b2%bkpt,
> odi,vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,jspin,
> jspin_b,jspin,k1_b,k2_b,k3_b,k1_b2,k2_b2,k3_b2,
> jspin_b,jspin,
> lapw_b%k1,lapw_b%k2,lapw_b%k3,
> lapw_b2%k1,lapw_b2%k2,lapw_b2%k3,
> wannierspin,nvd,area,nbasfcn,neigd,zMat_b,zMat_b2,nv_b,
> nv_b2,sk2,phi2,omtil,gb(:,ikpt_b,ikpt),
> (/0,0,0/),qpt_i,sign2,
......
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