Commit 729088f4 authored by Gregor Michalicek's avatar Gregor Michalicek

Some more preparations for the Wannier code integration

In this commit there mainly are some adaptions to the new eigenvector I/O.
parent cab605d0
......@@ -162,51 +162,51 @@ MODULE m_fleur
! r.pentcheva,kfa,Feb'96
! Types, these variables contain a lot of data!
TYPE(t_input) :: input
TYPE(t_dimension) :: dimension
TYPE(t_atoms) :: atoms
TYPE(t_sphhar) :: sphhar
TYPE(t_cell) :: cell
TYPE(t_stars) :: stars
TYPE(t_sym) :: sym
TYPE(t_noco) :: noco
TYPE(t_vacuum) :: vacuum
TYPE(t_sliceplot) :: sliceplot
TYPE(t_banddos) :: banddos
TYPE(t_obsolete) :: obsolete
TYPE(t_enpara) :: enpara
TYPE(t_xcpot) :: xcpot
TYPE(t_results) :: results
TYPE(t_jij) :: jij
TYPE(t_kpts) :: kpts
TYPE(t_hybrid) :: hybrid
TYPE(t_oneD) :: oneD
TYPE(t_mpi) :: mpi
TYPE(t_wann) :: wann
TYPE(t_input) :: input
TYPE(t_dimension) :: dimension
TYPE(t_atoms) :: atoms
TYPE(t_sphhar) :: sphhar
TYPE(t_cell) :: cell
TYPE(t_stars) :: stars
TYPE(t_sym) :: sym
TYPE(t_noco) :: noco
TYPE(t_vacuum) :: vacuum
TYPE(t_sliceplot) :: sliceplot
TYPE(t_banddos) :: banddos
TYPE(t_obsolete) :: obsolete
TYPE(t_enpara) :: enpara
TYPE(t_xcpot) :: xcpot
TYPE(t_results) :: results
TYPE(t_jij) :: jij
TYPE(t_kpts) :: kpts
TYPE(t_hybrid) :: hybrid
TYPE(t_oneD) :: oneD
TYPE(t_mpi) :: mpi
TYPE(t_wann) :: wann
! .. Local Scalars ..
INTEGER :: eig_id
INTEGER :: i,it,ithf,jspin,n,pc
LOGICAL :: stop80,reap,l_endit,l_opti,l_cont
CHARACTER(len=12) :: fname(3)
INTEGER :: eig_id
INTEGER :: i,it,ithf,jspin,n,pc
LOGICAL :: stop80,reap,l_endit,l_opti,l_cont
!--- J<
INTEGER :: phn
REAL, PARAMETER :: tol = 1.e-8
INTEGER :: qcount ,imt,i_J,j_J
INTEGER :: phn
REAL, PARAMETER :: tol = 1.e-8
INTEGER :: qcount ,imt,i_J,j_J
!--- J>
! .. Local Arrays ..
CHARACTER(8) :: name(10)
CHARACTER(8) :: name(10)
! HF/hybrid-functionals/EXX
INTEGER :: l,j,m1,m2,isym,iisym
INTEGER :: ok
LOGICAL :: l_restart
COMPLEX :: cdum
INTEGER :: l,j,m1,m2,isym,iisym
INTEGER :: ok
LOGICAL :: l_restart
COMPLEX :: cdum
#ifdef CPP_MPI
include 'mpif.h'
integer :: ierr(2)
integer :: ierr(2)
#endif
INTEGER, ALLOCATABLE :: eig_idList(:)
mpi%mpi_comm = mpi_comm
CALL timestart("Initialization")
......@@ -244,6 +244,7 @@ MODULE m_fleur
END IF
IF (wann%l_gwf) input%itmax = 1
#endif
ALLOCATE (eig_idList(wann%nparampts))
l_restart = .TRUE.
......@@ -304,7 +305,8 @@ MODULE m_fleur
jij%alph1(:)=noco%alph(:)
stop80= .FALSE.
IF ((noco%l_soc.AND.noco%l_ss)) THEN
IF ((jij%l_J).OR.(jij%nqpt/=1).OR.(jij%nmagn/=1).OR.(jij%phnd/=1)) THEN
IF ((.NOT.wann%l_gwf).AND.&
((jij%l_J).OR.(jij%nqpt/=1).OR.(jij%nmagn/=1).OR.(jij%phnd/=1))) THEN
CALL juDFT_error("fleur: J-loop with ss+soc", calledby ="fleur")
END IF
END IF
......@@ -315,7 +317,7 @@ MODULE m_fleur
noco%qss(:)=jij%qj(:,qcount)
jij%qn = ( noco%qss(1)**2 + noco%qss(2)**2 + noco%qss(3)**2 )
END IF
IF (jij%l_J.AND.(mpi%irank.EQ.0)) THEN
IF ((input%l_wann.OR.jij%l_J).AND.(mpi%irank.EQ.0)) THEN
WRITE(6,*) 'qss=(',noco%qss(1),',',noco%qss(2),',',noco%qss(3),')'
CALL timestart("Q-point for J_ij(total)")
END IF
......@@ -348,8 +350,8 @@ MODULE m_fleur
IF (it==1) THEN
eig_id=open_eig(mpi%mpi_comm,dimension%nbasfcn,dimension%neigd,kpts%nkpt(1),&
dimension%jspd,atoms%lmaxd,atoms%nlod,atoms%ntype,atoms%nlotot,&
noco%l_noco,.FALSE.,.FALSE.)
dimension%jspd,atoms%lmaxd,atoms%nlod,atoms%ntype,atoms%nlotot,&
noco%l_noco,.FALSE.,.FALSE.)
! CALL open_eig(mpi_comm,
! > nbasfcn,neigd,nkpt(1),jspd,lmaxd,nlod,ntypd,nlotot,
! > l_noco,.false.,.true.)
......@@ -420,8 +422,8 @@ MODULE m_fleur
jij%qn = (noco%qss(1)**2 + noco%qss(2)**2 + noco%qss(3)**2)
noco%alph(:) = wann%param_alpha(:,pc)
ELSE IF (wann%l_socgwf) THEN
IF(wann%l_dim(2)) noco%phi = tpi_const*wann%param_vec(2,pc)
IF(wann%l_dim(3)) noco%theta = tpi_const*wann%param_vec(3,pc)
IF(wann%l_dim(2)) noco%phi = tpi_const * wann%param_vec(2,pc)
IF(wann%l_dim(3)) noco%theta = tpi_const * wann%param_vec(3,pc)
END IF
!---< gwf
......@@ -506,6 +508,7 @@ MODULE m_fleur
CALL eigen(mpi,stars,sphhar,atoms,obsolete,xcpot,&
sym,kpts,dimension,vacuum,input,cell,enpara,banddos,noco,jij,oneD,hybrid,&
it,eig_id, results)
eig_idList(pc) = eig_id
CALL timestop("eigen")
!
! add all contributions to total energy
......@@ -660,7 +663,7 @@ MODULE m_fleur
END DO !imt
IF ((mpi%irank.EQ.0).AND.(jij%l_J)) THEN
IF ((input%l_wann.OR.jij%l_J).AND.(mpi%irank.EQ.0)) THEN
CALL timestop("Q-point for J_ij(total)")
END IF
......@@ -804,7 +807,9 @@ MODULE m_fleur
IF (xcpot%icorr /= icorr_pbe0.AND.xcpot%icorr /= icorr_hse .AND. &
xcpot%icorr /= icorr_hf .AND.xcpot%icorr /= icorr_exx .AND. &
xcpot%icorr /= icorr_vhse) THEN
CALL close_eig(eig_id)
DO pc = 1, wann%nparampts
CALL close_eig(eig_idList(pc))
END DO
END IF
END IF !(if not jij%l_J)
......
......@@ -20,8 +20,8 @@ c*******************************************c
CONTAINS
SUBROUTINE wann_uHu(
> DIMENSION,stars,vacuum,atoms,sphhar,input,sym,mpi,banddos,
> lapw,oneD,noco,cell,
> l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> lapw,oneD,noco,cell,wann,
> eig_idList,l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
> omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,
> invsat,invsatnr,nkpt,taual,rmt,amat,bmat,bbmat,alph,
......@@ -84,11 +84,13 @@ c*******************************************c
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_wann),INTENT(INOUT) :: wann
c ..scalar arguments..
character(len=20),intent(in) :: param_file
type (od_inp), intent (in) :: odi
type (od_sym), intent (in) :: ods
INTEGER, INTENT (IN) :: eig_idList(wann%nparampts)
logical, intent (in) :: invs,invs2,film,slice,symor,zrfs
logical, intent (in) :: l_real,l_noco,l_ss,l_soc
logical, intent (in) :: l_ms,l_sgwf,l_socgwf
......@@ -143,7 +145,7 @@ c ..allocatable arrays..
integer, allocatable :: counts(:),displs(:)
integer, allocatable :: gb(:,:,:),bpt(:,:)
integer, allocatable :: gb_q(:,:,:),bpt_q(:,:)
INTEGER, ALLOCATABLE :: eig_idList(:)
INTEGER, ALLOCATABLE :: innerEig_idList(:)
real, allocatable :: we(:),we_b(:),we_b2(:)
real, allocatable :: eigg(:)
real, allocatable :: vr(:,:,:),vz(:,:,:),vrf(:,:,:,:)
......@@ -196,7 +198,6 @@ c ..local scalars..
character(len=8) :: dop,iop
character(len=12) fending
character(len=30) fstart
type(t_wann) :: wann
logical :: l_p0,l_bkpts,l_proj,l_file
logical :: l_bqpts,l_gwf,l_exist,l_nocosoc,l_symcheck
logical :: l_skip_sph,l_skip_non,l_skip_soc
......@@ -646,7 +647,7 @@ c START Q LOOP c
c*****************************************************************c
do 314 iqpt = 1,fullnqpts ! loop by q-points starts
ALLOCATE(eig_idList(nntot_q))
ALLOCATE(innerEig_idList(nntot_q))
qptibz=iqpt
if(wann%l_bzsym .AND. l_gwf) qptibz=irreduc_q(iqpt)
......@@ -676,46 +677,52 @@ c*****************************************************************c
IF (l_gwf) THEN
do iqpt_b=1,nntot_q
WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
eig_idList(iqpt_b)=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,
+ DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ l_noco,.FALSE.,l_real,l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
innerEig_idList(iqpt_b) = eig_idList(bpt_q(iqpt_b,iqpt))
! WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
! innerEig_idList(iqpt_b)=open_eig(mpi%mpi_comm,
! + DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
enddo
WRITE(fending,'("_",i4.4)')qptibz
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ l_noco,.FALSE.,l_real,l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
eig_id = eig_idList(qptibz)
! WRITE(fending,'("_",i4.4)')qptibz
! eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
! OPEN(66,file=trim(fstart)//fending,access='direct',
! > form='unformatted',recl=irecl,status='old')
ELSEIF(l_ms) THEN
WRITE(fending,'("_",i4.4)')qptibz
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ l_noco,.FALSE.,l_real,l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
eig_id = eig_idList(qptibz)
! WRITE(fending,'("_",i4.4)')qptibz
! eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
! OPEN(66,file=trim(fstart)//fending,access='direct',
! > form='unformatted',recl=irecl,status='old')
......@@ -1407,11 +1414,11 @@ c endif
! close eig files
IF (l_gwf) THEN
CALL close_eig(eig_id)
! CALL close_eig(eig_id)
! CLOSE(66)
DO iqpt_b=1,nntot_q
CALL close_eig(eig_idList(iqpt_b))
! CALL close_eig(innerEig_idList(iqpt_b))
ENDDO
ENDIF
......@@ -1425,7 +1432,7 @@ c > wann%l_unformatted,.true.)
if(allocated(uHu)) deallocate(uHu)
c if(allocated(uHuold)) deallocate(uHuold)
DEALLOCATE(eig_idList)
DEALLOCATE(innerEig_idList)
314 continue ! iqpt, q-points
c************************************************c
......
......@@ -20,8 +20,8 @@ c*******************************************c
CONTAINS
SUBROUTINE wann_uHu_dmi(
> DIMENSION,stars,vacuum,atoms,sphhar,input,sym,mpi,banddos,
> lapw,oneD,noco,cell,
> l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> lapw,oneD,noco,cell,wann,
> eig_idList,l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
> omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,
> invsat,invsatnr,nkpt,taual,rmt,amat,bmat,bbmat,alph,
......@@ -85,11 +85,13 @@ c*******************************************c
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_wann),INTENT(INOUT) :: wann
c ..scalar arguments..
character(len=20),intent(in) :: param_file
type (od_inp), intent (in) :: odi
type (od_sym), intent (in) :: ods
INTEGER, INTENT (IN) :: eig_idList(wann%nparampts)
logical, intent (in) :: invs,invs2,film,slice,symor,zrfs
logical, intent (in) :: l_real,l_noco,l_ss,l_soc,l_nochi
logical, intent (in) :: l_ms,l_sgwf,l_socgwf
......@@ -144,7 +146,7 @@ c ..allocatable arrays..
integer, allocatable :: counts(:),displs(:)
integer, allocatable :: gb(:,:,:),bpt(:,:)
integer, allocatable :: gb_q(:,:,:),bpt_q(:,:)
INTEGER, ALLOCATABLE :: eig_idList(:)
INTEGER, ALLOCATABLE :: innerEig_idList(:)
real, allocatable :: we(:),we_b(:),we_b2(:)
real, allocatable :: eigg(:)
real, allocatable :: vr(:,:,:),vz(:,:,:),vrf(:,:,:,:)
......@@ -197,7 +199,6 @@ c ..local scalars..
character(len=8) :: dop,iop
character(len=12) fending
character(len=30) fstart
type(t_wann) :: wann
logical :: l_p0,l_bkpts,l_proj,l_file
logical :: l_bqpts,l_gwf,l_exist
logical :: l_skip_sph,l_skip_non,l_skip_soc
......@@ -644,7 +645,7 @@ c START Q LOOP c
c*****************************************************************c
do 314 iqpt = 1,fullnqpts ! loop by q-points starts
ALLOCATE(eig_idList(nntot_q))
ALLOCATE(innerEig_idList(nntot_q))
qptibz=iqpt
if(wann%l_bzsym .AND. l_gwf) qptibz=irreduc_q(iqpt)
......@@ -665,39 +666,48 @@ c*****************************************************************c
IF (l_gwf) THEN
do iqpt_b=1,nntot_q
WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
eig_idList(iqpt_b)=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,
+ DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ l_noco,.FALSE.,l_real,l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
innerEig_idList(iqpt_b) = eig_idList(bpt_q(iqpt_b,iqpt))
! WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
! innerEig_idList(iqpt_b)=open_eig(mpi%mpi_comm,
! + DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
enddo
WRITE(fending,'("_",i4.4)')qptibz
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ l_noco,.FALSE.,l_real,l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
eig_id = eig_idList(qptibz)
! WRITE(fending,'("_",i4.4)')qptibz
! eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
ELSEIF(l_ms) THEN
WRITE(fending,'("_",i4.4)')qptibz
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ l_noco,.FALSE.,l_real,l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
eig_id = eig_idList(qptibz)
! WRITE(fending,'("_",i4.4)')qptibz
! eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
ELSE
fending=''
ENDIF ! l_gwf.or.l_ms
......@@ -1082,7 +1092,7 @@ c***********************************************************
WRITE(*,*) 'Do I read out the right record here? (wann_uHu_dmi)'
CALL cdn_read(
> eig_idList(iqpt_b),
> innerEig_idList(iqpt_b),
> nvd,jspd,irank,isize,kptibz,jspin_b,nbasfcn, !wannierspin instead of jspd? !kptibz_b2?
> l_ss,l_noco,neigd,n_start,n_end,
< nmat_b2,nv_b2,ello,evdu,epar,kveclo_b2,
......@@ -1382,9 +1392,9 @@ c**************************************c
! close eig files
IF (l_gwf) THEN
CALL close_eig(eig_id)
! CALL close_eig(eig_id)
DO iqpt_b=1,nntot_q
CALL close_eig(eig_idList(iqpt_b))
! CALL close_eig(innerEig_idList(iqpt_b))
ENDDO
ENDIF
......@@ -1396,7 +1406,7 @@ c**************************************c
> wann%l_unformatted,.false.,.false.)
if(allocated(uHu)) deallocate(uHu)
DEALLOCATE(eig_idList)
DEALLOCATE(innerEig_idList)
314 continue ! iqpt, q-points
c************************************************c
......
......@@ -10,7 +10,7 @@
SUBROUTINE wannier(
> DIMENSION,mpi,input,sym,atoms,stars,vacuum,sphhar,lapw,oneD,
> wann,noco,cell,enpara,banddos,sliceplot,odi,ods,results,
> l_real,nkpt,nkptd,k1d,k2d,k3d,
> eig_idList,l_real,nkpt,nkptd,k1d,k2d,k3d,
> l_ms,l_sgwf,l_socgwf,aux_latt_const,
> param_file,param_vec,nparampts,param_alpha,l_dim)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
......@@ -142,6 +142,7 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
integer, intent (in) :: nkptd
integer, intent (in) :: k1d,k2d,k3d
integer, intent (in) :: nkpt
INTEGER, INTENT (IN) :: eig_idList(wann%nparampts)
! NEW INPUT PARAMETERS (for gwf)
real, intent(in) :: aux_latt_const
......@@ -170,7 +171,7 @@ cccccccccccccccccc local variables cccccccccccccccccccc
integer, allocatable :: kveclo_b(:),nv_b(:)
integer, allocatable :: k1(:,:),k2(:,:),k3(:,:)
integer, allocatable :: k1_b(:,:),k2_b(:,:),k3_b(:,:)
INTEGER, ALLOCATABLE :: eig_idList(:)
INTEGER, ALLOCATABLE :: innerEig_idList(:)
real, allocatable :: we(:),we_b(:)
real, allocatable :: eigg(:)
......@@ -446,7 +447,7 @@ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
if(wann%l_matrixuHu)then
call wann_uHu(
> DIMENSION,stars,vacuum,atoms,sphhar,input,sym,mpi,banddos,
> lapw,oneD,noco,cell,
> lapw,oneD,noco,cell,wann,eig_idList,
> l_real,atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,
> atoms%ntype,DIMENSION%neigd,atoms%nat,sym%nop,DIMENSION%nvd,
> DIMENSION%jspd,DIMENSION%nbasfcn,atoms%llod,atoms%nlod,
......@@ -481,7 +482,7 @@ cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
if(wann%l_matrixuHu_dmi)then
call wann_uHu_dmi(
> DIMENSION,stars,vacuum,atoms,sphhar,input,sym,mpi,banddos,
> lapw,oneD,noco,cell,
> lapw,oneD,noco,cell,wann,eig_idList,
> l_real,atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,
> atoms%ntype,DIMENSION%neigd,atoms%nat,sym%nop,DIMENSION%nvd,
> DIMENSION%jspd,DIMENSION%nbasfcn,atoms%llod,atoms%nlod,
......@@ -809,7 +810,7 @@ c and l_ms = l_sgwf = l_socgwf = F c
c*****************************************************************c
do 314 iqpt = 1,fullnqpts ! loop by q-points starts
ALLOCATE(eig_idList(nntot_q))
ALLOCATE(innerEig_idList(nntot_q))
call cpu_time(tt1)
t_kov=0.0
......@@ -835,45 +836,51 @@ c*****************************************************************c
IF (l_gwf) THEN
IF(wann%l_matrixmmn)THEN
do iqpt_b=1,nntot_q
WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
eig_idList(iqpt_b)=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,
+ DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
innerEig_idList(iqpt_b) = eig_idList(bpt_q(iqpt_b,iqpt))
! WRITE(fending,'("_",i4.4)')bpt_q(iqpt_b,iqpt)
! innerEig_idList(iqpt_b)=open_eig(mpi%mpi_comm,
! + DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
enddo
ENDIF
WRITE(fending,'("_",i4.4)')qptibz
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
eig_id = eig_idList(qptibz)
! WRITE(fending,'("_",i4.4)')qptibz
! eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
ELSEIF(l_ms) THEN
WRITE(fending,'("_",i4.4)')qptibz
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
+ nkpts,wannierspin,atoms%lmaxd,
+ atoms%nlod,atoms%ntype,atoms%nlotot,
+ noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
+ mpi%n_size,filename=trim(fstart)//fending,
+ layers=vacuum%layers,nstars=vacuum%nstars,
+ ncored=DIMENSION%nstd,nsld=atoms%nat,
+ nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
+ l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
eig_id = eig_idList(qptibz)
! WRITE(fending,'("_",i4.4)')qptibz
! eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,
! + nkpts,wannierspin,atoms%lmaxd,
! + atoms%nlod,atoms%ntype,atoms%nlotot,
! + noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
ELSE
fending=''
......@@ -1948,7 +1955,7 @@ c*******************************************c
! in (k1_qb,k2_qb,k3_qb) for later use.
CALL cdn_read(
> eig_idList(iqpt_b),
> innerEig_idList(iqpt_b),
> DIMENSION%nvd,DIMENSION%jspd,mpi%irank,mpi%isize, !wannierspin instead of DIMENSION%jspd? !kptibz_b2?
> kptibz,jspin_b,DIMENSION%nbasfcn,
> noco%l_ss,noco%l_noco,DIMENSION%neigd,n_start,
......@@ -2673,10 +2680,10 @@ c#endif
! close eig files
IF (l_gwf) THEN
CALL close_eig(eig_id)
! CALL close_eig(eig_id)
IF(wann%l_matrixmmn)THEN
DO iqpt_b=1,nntot_q
CALL close_eig(eig_idList(iqpt_b))
! CALL close_eig(innerEig_idList(iqpt_b))
ENDDO
ENDIF
ENDIF
......@@ -2711,7 +2718,7 @@ c#endif
write(*,*)t_kov,t_qov,t_it
endif
DEALLOCATE(eig_idList)
DEALLOCATE(innerEig_idList)
314 continue ! iqpt, q-points
c************************************************c
......
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