Commit 63fd069d authored by Gregor Michalicek's avatar Gregor Michalicek

Some more changes to integrate the Wannier code

parent ebf2c3bc
......@@ -62,7 +62,7 @@ wannier/wann_plot_from_lapw.f
wannier/wann_plot_symm.f
wannier/wann_plot_um_dat.F
wannier/wann_plot_vac.F
wannier/wann_plotw90.F
#wannier/wann_plotw90.F
wannier/wann_postproc.F
wannier/wann_postproc_setup4.f
wannier/wann_postproc_setup5.f
......
......@@ -23,7 +23,7 @@ c***************************************************************
> ig,nmzxy,nmz,delz,ig2,n2d_1,
> bbmat,evac,bkpt,MM,vM,vz,odi,
> nslibd,jspin,k1,k2,k3,jspd,nvd,area,
> nbasfcn,neigd,z,nv,sk2,phi2,omtil,qss,
> nbasfcn,neigd,zMat,nv,sk2,phi2,omtil,qss,
< mmn)
use m_constants, only : pimach
......@@ -35,6 +35,8 @@ c***************************************************************
implicit none
TYPE(t_zmat), INTENT(IN) :: zMat
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_vacuum),INTENT(IN) :: vacuum
......@@ -60,12 +62,6 @@ c ..array arguments..
integer, intent (in) :: k1(:,:),k2(:,:),k3(:,:)!k1(nvd,jspd),k2(nvd,jspd),k3(nvd,jspd)
complex, intent (inout) :: mmn(:,:)!mmn(nslibd,nslibd)
#if ( !defined(CPP_INVERSION) || defined(CPP_SOC) )
complex, intent (in):: z(:,:) !z(nbasfcn,neigd)
#else
real, intent (in):: z(:,:) !z(nbasfcn,neigd)
#endif
c ..basis wavefunctions in the vacuum
real, allocatable :: udz(:,:)
real, allocatable :: uz(:,:)
......@@ -160,14 +156,25 @@ c ..intrinsic functions..
* cmplx(-duz(l,m)*bess(m) +
- uz(l,m)*sk2(irec2)*dbss(m),0.0)/
/ ((wronk1)*sqrt(omtil))
do n = 1,nslibd
acof(l,m,n) = acof(l,m,n) +
+ z(k+addnoco,n)*avac
c + conjg(z(k,n))*avac
bcof(l,m,n) = bcof(l,m,n) +
+ z(k+addnoco,n)*bvac
c + conjg(z(k,n))*bvac
enddo
IF(zMat%l_real) THEN
do n = 1,nslibd
acof(l,m,n) = acof(l,m,n) +
+ zMat%z_r(k+addnoco,n)*avac
c + conjg(zMat%z_r(k,n))*avac
bcof(l,m,n) = bcof(l,m,n) +
+ zMat%z_r(k+addnoco,n)*bvac
c + conjg(zMat%z_r(k,n))*bvac
enddo
ELSE
do n = 1,nslibd
acof(l,m,n) = acof(l,m,n) +
+ zMat%z_c(k+addnoco,n)*avac
c + conjg(zMat%z_c(k,n))*avac
bcof(l,m,n) = bcof(l,m,n) +
+ zMat%z_c(k+addnoco,n)*bvac
c + conjg(zMat%z_c(k,n))*bvac
enddo
END IF
enddo ! -mb:mb
endif
enddo ! k = 1,nv
......
......@@ -20,12 +20,15 @@ c***************************************************************
> ig,nmz,delz,ig2,area,bmat,
> bbmat,evac,bkpt,vz,
> nslibd,jspin,k1,k2,k3,jspd,nvd,
> nbasfcn,neigd,z,nv,omtil,
> nbasfcn,neigd,zMat,nv,omtil,
< mmn)
USE m_types
use m_constants, only : pimach
implicit none
TYPE(t_zmat), INTENT(IN) :: zMat
c .. scalar Arguments..
logical, intent (in) :: l_noco
integer, intent (in) :: nlotot
......@@ -49,12 +52,6 @@ c ..array arguments..
integer, intent (in) :: k3(:,:) !k3(nvd,jspd)
complex, intent (inout) :: mmn(:,:) !mmn(nslibd,nslibd)
#if ( !defined(CPP_INVERSION) || defined(CPP_SOC) )
complex, intent (in):: z(:,:) !z(nbasfcn,neigd)
#else
real, intent (in):: z(:,:) !z(nbasfcn,neigd)
#endif
c ..basis wavefunctions in the vacuum
complex, allocatable :: ac(:,:),bc(:,:)
real, allocatable :: dt(:),dte(:)
......@@ -175,10 +172,17 @@ c-----> construct a and b coefficients
av = -c_1 * cmplx( dte(l),zks*te(l) )
bv = c_1 * cmplx( dt(l),zks* t(l) )
c-----> loop over basis functions
do n = 1,nslibd
ac(l,n) = ac(l,n) + z(k+addnoco,n)*av
bc(l,n) = bc(l,n) + z(k+addnoco,n)*bv
enddo
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
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
enddo
END IF
enddo
do l = 1,nv2
......
This diff is collapsed.
This diff is collapsed.
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