Commit 7417ad68 authored by Gregor Michalicek's avatar Gregor Michalicek

Even more changes to integrate the Wannier code

...I now reached linker error phase.
parent 63fd069d
......@@ -666,7 +666,7 @@ c*****************************************************************c
IF (l_gwf) THEN
do iqpt_b=1,nntot_q
WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,
eig_idList(iqpt_b)=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,
+ DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
......
......@@ -21,7 +21,7 @@ c***************************************************************
> bbmat,evac,evac_b,bkpt,bkpt_b,MM,vM,vz,vz_b,odi,
> nslibd,nslibd_b,jspin,jspin_b,k1,k2,k3,k1_b,k2_b,k3_b,
> jspd,nvd,area,nbasfcn,neigd,
> z,z_b,nv,nv_b,sk2,phi2,omtil,gb,qss,
> zMat,zMat_b,nv,nv_b,sk2,phi2,omtil,gb,qss,
> l_q, sign_q,
< mmn)
use m_constants
......@@ -38,6 +38,7 @@ c***************************************************************
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_zmat), INTENT(IN) :: zMat, zMat_b
c .. scalar Arguments..
logical, intent (in) :: l_noco
......@@ -65,13 +66,6 @@ c ..array arguments..
integer, intent (in) :: k1_b(:,:),k2_b(:,:),k3_b(:,:) !k1_b(nvd,jspd),k2_b(nvd,jspd),k3_b(nvd,jspd)
complex, intent (inout) :: mmn(:,:) !mmn(nbnd,nbnd)
#if ( !defined(CPP_INVERSION) || defined(CPP_SOC) )
complex, intent (in):: z(:,:),z_b(:,:) !z(nbasfcn,neigd),z_b(nbasfcn,neigd)
#else
real, intent (in):: z(:,:),z_b(:,:) !z(nbasfcn,neigd),z_b(nbasfcn,neigd)
#endif
!logical, intent (in) :: l_q ! dealing with q points?
c ..basis wavefunctions in the vacuum
......@@ -209,14 +203,25 @@ c...for the k-point
* 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
......@@ -253,14 +258,25 @@ c...for the b-point
& cmplx(-duz_b(l,m)*bess(m) +
- uz_b(l,m)*sk2(irec2)*dbss(m),0.0)/
/ ((wronk1)*sqrt(omtil))
do n = 1,nslibd_b
acof_b(l,m,n) = acof_b(l,m,n) +
+ z_b(k+addnoco2,n)*avac
c + conjg(z(k,n))*avac
bcof_b(l,m,n) = bcof_b(l,m,n) +
+ z_b(k+addnoco2,n)*bvac
c + conjg(z(k,n))*bvac
enddo
IF (zMat_b%l_real) THEN
do n = 1,nslibd_b
acof_b(l,m,n) = acof_b(l,m,n) +
+ zMat_b%z_r(k+addnoco2,n)*avac
c + conjg(zMat_b%z_r(k,n))*avac
bcof_b(l,m,n) = bcof_b(l,m,n) +
+ zMat_b%z_r(k+addnoco2,n)*bvac
c + conjg(zMat_b%z_r(k,n))*bvac
enddo
ELSE
do n = 1,nslibd_b
acof_b(l,m,n) = acof_b(l,m,n) +
+ zMat_b%z_c(k+addnoco2,n)*avac
c + conjg(zMat_b%z_c(k,n))*avac
bcof_b(l,m,n) = bcof_b(l,m,n) +
+ zMat_b%z_c(k+addnoco2,n)*bvac
c + conjg(zMat_b%z_c(k,n))*bvac
enddo
END IF
enddo ! -mb:mb
endif
enddo ! k = 1,nv
......
......@@ -21,12 +21,16 @@ c***************************************************************
> bbmat,evac,evac_b,bkpt,bkpt_b,vz,vz_b,
> nslibd,nslibd_b,jspin,jspin_b,
> k1,k2,k3,k1_b,k2_b,k3_b,jspd,nvd,
> nbasfcn,neigd,z,z_b,nv,nv_b,omtil,gb,
> nbasfcn,neigd,zMat,zMat_b,nv,nv_b,omtil,gb,
< mmn)
USE m_types
use m_constants, only : pimach
use m_intgr, only : intgz0
implicit none
TYPE(t_zmat), INTENT(IN) :: zMat, zMat_b
c .. scalar Arguments..
logical, intent (in) :: l_noco
integer, intent (in) :: nlotot,jspin_b
......@@ -49,12 +53,6 @@ c ..array arguments..
integer,intent(in)::k1_b(nvd,jspd),k2_b(nvd,jspd),k3_b(nvd,jspd)
complex, intent (inout) :: mmn(nbnd,nbnd)
#if ( !defined(CPP_INVERSION) || defined(CPP_SOC) )
complex, intent (in):: z(nbasfcn,neigd),z_b(nbasfcn,neigd)
#else
real, intent (in):: z(nbasfcn,neigd),z_b(nbasfcn,neigd)
#endif
c ..basis wavefunctions in the vacuum
complex, allocatable :: ac(:,:),bc(:,:),ac_b(:,:),bc_b(:,:)
real, allocatable :: dt(:),dte(:)
......@@ -232,10 +230,17 @@ c-----> construct a and b coefficients for the k-point
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
c...now for the k+b point
......@@ -269,10 +274,17 @@ c-----> construct a and b coefficients for the k+b point
av = -c_1 * cmplx( dte_b(l),zks*te_b(l) )
bv = c_1 * cmplx( dt_b(l),zks*t_b(l) )
c-----> loop over basis functions
do n = 1,nslibd_b
ac_b(l,n) = ac_b(l,n) + z_b(k+addnoco2,n)*av
bc_b(l,n) = bc_b(l,n) + z_b(k+addnoco2,n)*bv
enddo
IF(zMat_b%l_real) THEN
do n = 1,nslibd_b
ac_b(l,n) = ac_b(l,n) + zMat_b%z_r(k+addnoco,n)*av
bc_b(l,n) = bc_b(l,n) + zMat_b%z_r(k+addnoco,n)*bv
enddo
ELSE
do n = 1,nslibd_b
ac_b(l,n) = ac_b(l,n) + zMat_b%z_c(k+addnoco,n)*av
bc_b(l,n) = bc_b(l,n) + zMat_b%z_c(k+addnoco,n)*bv
enddo
END IF
enddo
......
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