Commit f9c0678e authored by Robin Hilgers's avatar Robin Hilgers

Merge branch 'develop' into 'fullyfullynoco'

# Conflicts:
#   main/fleur.F90
parents 8b985477 d2438580
...@@ -2,6 +2,37 @@ ...@@ -2,6 +2,37 @@
try_compile(FLEUR_USE_WANN ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_Wannier90.f90 try_compile(FLEUR_USE_WANN ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_Wannier90.f90
LINK_LIBRARIES ${FLEUR_LIBRARIES} LINK_LIBRARIES ${FLEUR_LIBRARIES}
) )
message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}")
foreach(ADD_String "-lwannier;-lmkl_intel_lp64;-lmkl_sequential;-lmkl_core" )
if (NOT FLEUR_USE_WANN)
set(TEST_LIBRARIES "${FLEUR_LIBRARIES};${ADD_String}")
message("compilation test:${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_Wannier90.f90
LINK_LIBRARIES ${TEST_LIBRARIES}")
try_compile(FLEUR_USE_WANN ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_Wannier90.f90
LINK_LIBRARIES ${TEST_LIBRARIES} OUTPUT_VARIABLE TELL_ME
)
message("TELL_ME=${TELL_ME}")
if (FLEUR_USE_WANN)
set(FLEUR_WANNIER90_LIBRARIES ${TEST_LIBRARIES})
set( FLEUR_LIBRARIES "${FLEUR_LIBRARIES};${ADD_String}" )
endif()
endif()
endforeach()
message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}") message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}")
......
FROM ubuntu:18.10 FROM iffregistry.fz-juelich.de/fleur/fleur/intel-libs
MAINTAINER d.wortmann@fz-juelich.de MAINTAINER d.wortmann@fz-juelich.de
COPY ../fleur /home COPY fleur /home
COPY ../inpgen /home RUN echo "#!/bin/sh \n if [ -r /mnt/inp.xml ] ; then cd /mnt ; ulimit -s unlimited ;/home/fleur \$@; else echo 'You should provide your working directory by specifying e.g. -v \$PWD:/mnt ' ; fi " >/home/fleur.sh ; chmod a+x /home/fleur.sh
ENTRYPOINT ["/home/fleur.sh"]
MODULE m_anglso MODULE m_anglso
contains contains
COMPLEX FUNCTION anglso(theta,phi,l1,m1,is1,l2,m2,is2) COMPLEX FUNCTION anglso(theta,phi,l1,m1,is1,l2,m2,is2,compo)
USE m_juDFT USE m_juDFT
! !
! calculates spin-orbit matrix for theta,phi =/= 0 ! calculates spin-orbit matrix for theta,phi =/= 0
...@@ -9,6 +9,7 @@ contains ...@@ -9,6 +9,7 @@ contains
! .. ! ..
! .. Scalar Arguments .. ! .. Scalar Arguments ..
INTEGER, INTENT(IN) :: is1,is2,l1,l2,m1,m2 INTEGER, INTENT(IN) :: is1,is2,l1,l2,m1,m2
INTEGER, INTENT(IN),OPTIONAL :: compo
REAL, INTENT(IN) :: theta,phi REAL, INTENT(IN) :: theta,phi
! .. ! ..
! .. Local Scalars .. ! .. Local Scalars ..
...@@ -63,6 +64,29 @@ contains ...@@ -63,6 +64,29 @@ contains
ELSE IF (m1.EQ.m2 ) THEN ELSE IF (m1.EQ.m2 ) THEN
xlz = m2 xlz = m2
END IF END IF
IF(PRESENT(compo))THEN
! Used for the wannier-interpolation of SOC:
! wann_socmat_vec allow us to
! add SOC during the wannier-interpolation.
! Therefore, theta and phi are specified during the
! Wannier-interpolation step and not here.
! Therefore, write out only xlz, xlpl, and xlmn and RETURN
! afterwards, without using theta and phi.
! xlz, xlpl and xlmn are needed in subroutine wann_socmat_vec.F
if(compo.eq.1)then
anglso = CMPLX(xlz,0.0)
elseif(compo.eq.2)then
anglso = CMPLX(xlmn,0.0)
elseif(compo.eq.3)then
anglso = CMPLX(xlpl,0.0)
else
CALL juDFT_error("maucompo",calledby ="anglso")
endif
RETURN
END IF
! !
! rotated spin-orbit angular matrix ! rotated spin-orbit angular matrix
! <1| |1> or <2| |2> ! <1| |1> or <2| |2>
......
...@@ -94,7 +94,7 @@ CONTAINS ...@@ -94,7 +94,7 @@ CONTAINS
CALL spnorb_angles(atoms,mpi,noco%theta,noco%phi,rsoc%soangl) CALL spnorb_angles(atoms,mpi,noco%theta,noco%phi,rsoc%soangl)
END SUBROUTINE spnorb END SUBROUTINE spnorb
SUBROUTINE spnorb_angles(atoms,mpi,theta,phi,soangl) SUBROUTINE spnorb_angles(atoms,mpi,theta,phi,soangl,compo)
USE m_anglso USE m_anglso
USE m_sgml USE m_sgml
USE m_sorad USE m_sorad
...@@ -104,6 +104,7 @@ CONTAINS ...@@ -104,6 +104,7 @@ CONTAINS
TYPE(t_mpi),INTENT(IN) :: mpi TYPE(t_mpi),INTENT(IN) :: mpi
REAL,INTENT(IN) :: theta,phi REAL,INTENT(IN) :: theta,phi
COMPLEX,INTENT(INOUT) :: soangl(:,-atoms%lmaxd:,:,:,-atoms%lmaxd:,:) COMPLEX,INTENT(INOUT) :: soangl(:,-atoms%lmaxd:,:,:,-atoms%lmaxd:,:)
INTEGER, INTENT(IN),OPTIONAL :: compo
! .. ! ..
! .. ! ..
! .. Local Scalars .. ! .. Local Scalars ..
...@@ -116,7 +117,8 @@ CONTAINS ...@@ -116,7 +117,8 @@ CONTAINS
DATA ispjsp/1,-1/ DATA ispjsp/1,-1/
IF ((ABS(theta).LT.0.00001).AND.(ABS(phi).LT.0.00001)) THEN IF ((ABS(theta).LT.0.00001).AND.(ABS(phi).LT.0.00001)&
.AND..NOT.PRESENT(compo)) THEN
! !
! TEST for real function sgml(l1,m1,is1,l2,m2,is2) ! TEST for real function sgml(l1,m1,is1,l2,m2,is2)
! !
...@@ -151,7 +153,7 @@ CONTAINS ...@@ -151,7 +153,7 @@ CONTAINS
DO m1 = -l1,l1,1 DO m1 = -l1,l1,1
DO m2 = -l2,l2,1 DO m2 = -l2,l2,1
soangl(l1,m1,jspin1,l2,m2,jspin2) =& soangl(l1,m1,jspin1,l2,m2,jspin2) =&
anglso(theta,phi,l1,m1,is1,l2,m2,is2) anglso(theta,phi,l1,m1,is1,l2,m2,is2,compo)
ENDDO ENDDO
ENDDO ENDDO
! !
......
...@@ -318,7 +318,7 @@ CONTAINS ...@@ -318,7 +318,7 @@ CONTAINS
DO i=1,SIZE(list) DO i=1,SIZE(list)
CALL io_read_real3(d%evsetid,(/1,1,list(i),nk,jspin/),& CALL io_read_real3(d%evsetid,(/1,1,list(i),nk,jspin/),&
& (/2,nmat,1,1,1/),z1) & (/2,nmat,1,1,1/),z1)
z(:,i) = CMPLX( z1(1,:,i) ,z1(2,:,i) ) z(:,i) = CMPLX( z1(1,:,1) ,z1(2,:,1) )
ENDDO ENDDO
END IF END IF
END SUBROUTINE priv_r_vecc END SUBROUTINE priv_r_vecc
......
...@@ -5,13 +5,6 @@ ...@@ -5,13 +5,6 @@
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_fleur MODULE m_fleur
IMPLICIT NONE IMPLICIT NONE
INTEGER, PARAMETER :: PLOT_INPDEN_INDEX_const=1
INTEGER, PARAMETER :: PLOT_OUTDEN_Y_CORE_INDEX_const=2
INTEGER, PARAMETER :: PLOT_INPDEN_N_CORE_INDEX_const=3
INTEGER, PARAMETER :: PLOT_POT_TOT_INDEX_const=7
INTEGER, PARAMETER :: PLOT_POT_EXT_INDEX_const=8
INTEGER, PARAMETER :: PLOT_POT_COU_INDEX_const=9
INTEGER, PARAMETER :: PLOT_POT_VXC_INDEX_const=10
CONTAINS CONTAINS
SUBROUTINE fleur_execute(mpi_comm) SUBROUTINE fleur_execute(mpi_comm)
...@@ -71,7 +64,6 @@ CONTAINS ...@@ -71,7 +64,6 @@ CONTAINS
USE m_dwigner USE m_dwigner
USE m_ylm USE m_ylm
USE m_metagga USE m_metagga
! USE m_plot
#ifdef CPP_MPI #ifdef CPP_MPI
USE m_mpi_bc_potden USE m_mpi_bc_potden
#endif #endif
...@@ -157,11 +149,6 @@ CONTAINS ...@@ -157,11 +149,6 @@ CONTAINS
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,& CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,-1.0,results%ef,.FALSE.,inDen) 0,-1.0,results%ef,.FALSE.,inDen)
END IF END IF
! IF ((sliceplot%iplot.NE.0 ).AND.(mpi%irank==0) ) THEN
! CALL makeplots(input%jspins,noco,sliceplot%iplot,PLOT_INPDEN_INDEX_const,inDen)
! END IF
! Initialize and load inDen density (end) ! Initialize and load inDen density (end)
! Initialize potentials (start) ! Initialize potentials (start)
...@@ -254,14 +241,6 @@ CONTAINS ...@@ -254,14 +241,6 @@ CONTAINS
obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,inDen,vTot,vx,vCoul) obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,inDen,vTot,vx,vCoul)
CALL timestop("generation of potential") CALL timestop("generation of potential")
! IF ((sliceplot%iplot.NE.0 ).AND.(mpi%irank==0) ) THEN
! CALL makeplots(input%jspins,noco,sliceplot%iplot,PLOT_POT_TOT_INDEX_const,vTot)
! END IF
! IF ((sliceplot%iplot.NE.0 ).AND.(mpi%irank==0) ) THEN
! CALL makeplots(input%jspins,noco,sliceplot%iplot,PLOT_POT_COU_INDEX_const,vCoul)
! END IF
#ifdef CPP_MPI #ifdef CPP_MPI
CALL MPI_BARRIER(mpi%mpi_comm,ierr) CALL MPI_BARRIER(mpi%mpi_comm,ierr)
#endif #endif
...@@ -385,14 +364,6 @@ CONTAINS ...@@ -385,14 +364,6 @@ CONTAINS
dimension,kpts,atoms,sphhar,stars,sym,& dimension,kpts,atoms,sphhar,stars,sym,&
enpara,cell,noco,vTot,results,oneD,coreSpecInput,& enpara,cell,noco,vTot,results,oneD,coreSpecInput,&
archiveType,xcpot,outDen,EnergyDen) archiveType,xcpot,outDen,EnergyDen)
! IF ((sliceplot%iplot.NE.0 ).AND.(mpi%irank==0) ) THEN
! IF-statement to check whether we remove core densities
! CALL makeplots(input%jspins,noco,sliceplot%iplot,PLOT_OUTDEN_Y_CORE_INDEX_const,outDen)
! ELSE
! CALL makeplots(input%jspins,noco,sliceplot%iplot,PLOT_OUTDEN_N_CORE_INDEX_const,outDen)
! END IF
! END IF
IF (input%l_rdmft) THEN IF (input%l_rdmft) THEN
SELECT TYPE(xcpot) SELECT TYPE(xcpot)
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
USE m_fleur_init_old USE m_fleur_init_old
USE m_types_xcpot_inbuild USE m_types_xcpot_inbuild
USE m_mpi_bc_xcpot USE m_mpi_bc_xcpot
USE m_wann_read_inp
#ifdef CPP_MPI #ifdef CPP_MPI
USE m_mpi_bc_all, ONLY : mpi_bc_all USE m_mpi_bc_all, ONLY : mpi_bc_all
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
REAL :: a1(3),a2(3),a3(3) REAL :: a1(3),a2(3),a3(3)
REAL :: dtild, phi_add REAL :: dtild, phi_add
LOGICAL :: l_found, l_kpts, l_exist LOGICAL :: l_found, l_kpts, l_exist
LOGICAL :: l_wann_inp
#ifdef CPP_MPI #ifdef CPP_MPI
INCLUDE 'mpif.h' INCLUDE 'mpif.h'
INTEGER ierr(3) INTEGER ierr(3)
...@@ -534,5 +535,12 @@ ...@@ -534,5 +535,12 @@
!new check mode will only run the init-part of FLEUR !new check mode will only run the init-part of FLEUR
IF (judft_was_argument("-check")) CALL judft_end("Check-mode done",mpi%irank) IF (judft_was_argument("-check")) CALL judft_end("Check-mode done",mpi%irank)
INQUIRE (file='wann_inp',exist=l_wann_inp)
input%l_wann = input%l_wann.OR.l_wann_inp
IF(input%l_wann) THEN
CALL wann_read_inp(DIMENSION,input,noco,(mpi%irank.EQ.0),wann)
END IF
END SUBROUTINE fleur_init END SUBROUTINE fleur_init
END MODULE m_fleur_init END MODULE m_fleur_init
...@@ -72,6 +72,7 @@ wannier/wann_real.F ...@@ -72,6 +72,7 @@ wannier/wann_real.F
wannier/wann_rmat.f wannier/wann_rmat.f
wannier/wann_rw_eig.F wannier/wann_rw_eig.F
wannier/wann_socmat.F wannier/wann_socmat.F
wannier/wann_socmat_vec.F
wannier/wann_socmat_rs.f wannier/wann_socmat_rs.f
wannier/wann_tlmw.f wannier/wann_tlmw.f
wannier/wann_ujugaunt.F wannier/wann_ujugaunt.F
......
...@@ -20,7 +20,7 @@ c*******************************************c ...@@ -20,7 +20,7 @@ c*******************************************c
CONTAINS CONTAINS
SUBROUTINE wann_uHu( SUBROUTINE wann_uHu(
> DIMENSION,stars,vacuum,atoms,sphhar,input,kpts,sym,mpi, > DIMENSION,stars,vacuum,atoms,sphhar,input,kpts,sym,mpi,
> banddos,oneD,noco,cell,vTot,wann, > banddos,oneD,noco,cell,vTot,wann,enpara,
> eig_idList,l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd, > eig_idList,l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype, > neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
> omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax, > omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,
...@@ -47,7 +47,7 @@ c*******************************************c ...@@ -47,7 +47,7 @@ c*******************************************c
use m_wann_projmethod use m_wann_projmethod
use m_wann_abinv use m_wann_abinv
use m_wann_kptsrotate use m_wann_kptsrotate
use m_wann_read_inp ! use m_wann_read_inp !Call wann_read_inp in fleur_init
use m_matmul,only : matmul3,matmul3r use m_matmul,only : matmul3,matmul3r
use m_wann_maxbnd use m_wann_maxbnd
use m_wann_uHu_tlmplm use m_wann_uHu_tlmplm
...@@ -85,6 +85,7 @@ c*******************************************c ...@@ -85,6 +85,7 @@ c*******************************************c
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_potden),INTENT(IN) :: vTot TYPE(t_potden),INTENT(IN) :: vTot
TYPE(t_wann),INTENT(INOUT) :: wann TYPE(t_wann),INTENT(INOUT) :: wann
TYPE(t_enpara),INTENT(IN) :: enpara
c ..scalar arguments.. c ..scalar arguments..
character(len=20),intent(in) :: param_file character(len=20),intent(in) :: param_file
...@@ -290,7 +291,7 @@ c ..initializations.. ...@@ -290,7 +291,7 @@ c ..initializations..
c-----read the input file to determine what to do c-----read the input file to determine what to do
call wann_read_inp(input,l_p0,wann) ! call wann_read_inp(input,l_p0,wann) !Call wann_read_inp in fleur_init
if(wann%l_byenergy.and.wann%l_byindex) CALL juDFT_error if(wann%l_byenergy.and.wann%l_byindex) CALL juDFT_error
+ ("byenergy.and.byindex",calledby ="wannier") + ("byenergy.and.byindex",calledby ="wannier")
...@@ -850,18 +851,18 @@ c uHuold = cmplx(0.,0.) ...@@ -850,18 +851,18 @@ c uHuold = cmplx(0.,0.)
c...compute the l-dependent, k-independent radial MT- basis functions c...compute the l-dependent, k-independent radial MT- basis functions
call radfun( call radfun(
> l,n,jspin4,epar(l,n,jspin3),vr(1,n,jspin3),atoms, > l,n,jspin4,enpara%el0(l,n,jspin3),vr(1,n,jspin3),atoms,
< ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus, < ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus,
< nodeu,noded,wronk) < nodeu,noded,wronk)
30 continue 30 continue
c...and the local orbital radial functions c...and the local orbital radial functions
do ilo = 1, nlo(n) do ilo = 1, nlo(n)
call radflo( call radflo(
> atoms,n,jspin4,ello(:,:,jspin3),vr(1,n,jspin3), > atoms,n,jspin4,enpara%ello0(:,:,jspin3),vr(1,n,jspin3),
> ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi, > ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi,
< usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4)) < usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4))
enddo enddo
c na = na + neq(n) c na = na + neq(n)
...@@ -1030,36 +1031,36 @@ c if (mod(i_rec-1,isize).eq.irank) then ...@@ -1030,36 +1031,36 @@ c if (mod(i_rec-1,isize).eq.irank) then
& nbands,eigg,zzMat) & nbands,eigg,zzMat)
c$$$ nslibd=0
do i = 1,nbands ! do i = 1,nbands
if((eigg(i).ge.e1s.and.nslibd.lt.numbands ! if((eigg(i).ge.e1s.and.nslibd.lt.numbands
& .and.wann%l_bynumber) ! & .and.wann%l_bynumber)
&.or.(eigg(i).ge.e1s.and.eigg(i).le.e2s.and.wann%l_byenergy) ! &.or.(eigg(i).ge.e1s.and.eigg(i).le.e2s.and.wann%l_byenergy)
&.or.(i.ge.wann%band_min(jspin) ! &.or.(i.ge.wann%band_min(jspin)
& .and. ! & .and.
& (i.le.wann%band_max(jspin)) ! & (i.le.wann%band_max(jspin))
& .and. ! & .and.
& wann%l_byindex))then ! & wann%l_byindex))then
nslibd = nslibd + 1 ! nslibd = nslibd + 1
eig(nslibd) = eigg(i) ! eig(nslibd) = eigg(i)
we(nslibd) = we(i) ! we(nslibd) = we(i)
if(l_noco)then ! if(l_noco)then
! funbas = nv(1) + nlotot ! ! funbas = nv(1) + nlotot
! funbas = funbas+nv(2) + nlotot ! ! funbas = funbas+nv(2) + nlotot
else ! else
! funbas = nv(jspin) + nlotot ! ! funbas = nv(jspin) + nlotot
endif ! endif
IF (zzMat%l_real) THEN ! IF (zzMat%l_real) THEN
! do j = 1,funbas ! ! do j = 1,funbas
zMat%data_r(:,nslibd) = zzMat%data_r(:,i) ! zMat%data_r(:,nslibd) = zzMat%data_r(:,i)
! enddo ! ! enddo
ELSE ! ELSE
! do j = 1,funbas ! ! do j = 1,funbas
zMat%data_c(:,nslibd) = zzMat%data_c(:,i) ! zMat%data_c(:,nslibd) = zzMat%data_c(:,i)
! enddo ! ! enddo
END IF ! END IF
endif ! endif
enddo ! enddo
...@@ -1367,8 +1368,8 @@ c endif ...@@ -1367,8 +1368,8 @@ c endif
call wann_uHu_sph( call wann_uHu_sph(
> cmplx(1.,0.),nbnd,llod,nslibd_b,nslibd_b2,nlod,natd,ntypd, > cmplx(1.,0.),nbnd,llod,nslibd_b,nslibd_b2,nlod,natd,ntypd,
> lmd,jmtd,taual,nop,lmax,ntype,neq,nlo,llo, > lmd,jmtd,taual,nop,lmax,ntype,neq,nlo,llo,
> acof_b,bcof_b,ccof_b,bkpt_b2, > acof_b,bcof_b,ccof_b,lapw_b2%bkpt,
> acof_b2,bcof_b2,ccof_b2,bkpt_b,bkpt, > acof_b2,bcof_b2,ccof_b2,lapw_b%bkpt,lapw%bkpt,
> gb(:,ikpt_b,ikpt),gb(:,ikpt_b2,ikpt), > gb(:,ikpt_b,ikpt),gb(:,ikpt_b2,ikpt),
< tuu(:,:,:,:,tspin2),tud(:,:,:,:,tspin2), < tuu(:,:,:,:,tspin2),tud(:,:,:,:,tspin2),
> tdu(:,:,:,:,tspin2),tdd(:,:,:,:,tspin2), > tdu(:,:,:,:,tspin2),tdd(:,:,:,:,tspin2),
...@@ -1393,8 +1394,8 @@ c endif ...@@ -1393,8 +1394,8 @@ c endif
call wann_uHu_sph( call wann_uHu_sph(
> cmplx(1.,0.),nbnd,llod,nslibd_b,nslibd_b2,nlod,natd,ntypd, > cmplx(1.,0.),nbnd,llod,nslibd_b,nslibd_b2,nlod,natd,ntypd,
> lmd,jmtd,taual,nop,lmax,ntype,neq,nlo,llo, > lmd,jmtd,taual,nop,lmax,ntype,neq,nlo,llo,
> acof_b,bcof_b,ccof_b,bkpt_b2, > acof_b,bcof_b,ccof_b,lapw_b2%bkpt,
> acof_b2,bcof_b2,ccof_b2,bkpt_b,bkpt, > acof_b2,bcof_b2,ccof_b2,lapw_b%bkpt,lapw%bkpt,
> gb(:,ikpt_b,ikpt),gb(:,ikpt_b2,ikpt), > gb(:,ikpt_b,ikpt),gb(:,ikpt_b2,ikpt),
< tuu_soc,tud_soc, < tuu_soc,tud_soc,
> tdu_soc,tdd_soc, > tdu_soc,tdd_soc,
...@@ -1445,7 +1446,7 @@ c endif ...@@ -1445,7 +1446,7 @@ c endif
! > k1_b2(:,jspin_b),k2_b2(:,jspin_b),k3_b2(:,jspin_b), ! > k1_b2(:,jspin_b),k2_b2(:,jspin_b),k3_b2(:,jspin_b),
> lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin), > lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin),
> gb(:,ikpt_b2,ikpt), > gb(:,ikpt_b2,ikpt),
> bkpt,bbmat,vpw(:,jspin3),zMat_b,zMat_b2,rgphs, > lapw%bkpt,bbmat,vpw(:,jspin3),zMat_b,zMat_b2,rgphs,
> ustep,ig,jspin.eq.jspin_b,sign2, > ustep,ig,jspin.eq.jspin_b,sign2,
> uHu(:,:,ikpt_b2,ikpt_b,i_rec)) > uHu(:,:,ikpt_b2,ikpt_b,i_rec))
call cpu_time(t1) call cpu_time(t1)
...@@ -1465,16 +1466,16 @@ c endif ...@@ -1465,16 +1466,16 @@ c endif
call cpu_time(t0) call cpu_time(t0)
call wann_uHu_vac( call wann_uHu_vac(
> cmplx(1.,0.),l_noco,l_soc,zrfs,jspins,nlotot,qpt_i, > cmplx(1.,0.),l_noco,l_soc,zrfs,jspins,nlotot,qpt_i,
> nbnd,z1,nmzxyd,nmzd,n2d,nv2d,k1d,k2d,k3d,n3d,nvac,ig, > nbnd,z1,nmzxyd,nmzd,n2d,nv2d,k1d,k2d,k3d,n3d,nvac,ig,
> rgphs,nmzxy,nmz,delz,ig2,nq2,kv2,area,bmat,bbmat, > rgphs,nmzxy,nmz,delz,ig2,nq2,kv2,area,bmat,bbmat,
> evac(:,jspin4),evac(:,jspin4_b),bkpt_b,bkpt_b2, > evac(:,jspin4),evac(:,jspin4_b),lapw_b%bkpt,lapw_b2%bkpt,
> vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2, > vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,doublespin, > jspin,jspin_b,doublespin,
! > k1_b,k2_b,k3_b, ! > k1_b,k2_b,k3_b,
> lapw_b%k1(:,jspin),lapw_b%k2(:,jspin),lapw_b%k3(:,jspin), > lapw_b%k1(:,jspin),lapw_b%k2(:,jspin),lapw_b%k3(:,jspin),
! > k1_b2,k2_b2,k3_b2, ! > k1_b2,k2_b2,k3_b2,
> lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin), > lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin),
> wannierspin,nvd,nbasfcn,neigd, > wannierspin,nvd,nbasfcn,neigd,
> zMat_b,zMat_b2, > zMat_b,zMat_b2,
> lapw_b%nv,!nv_b, > lapw_b%nv,!nv_b,
> lapw_b2%nv,! nv_b2, > lapw_b2%nv,! nv_b2,
...@@ -1491,14 +1492,14 @@ c endif ...@@ -1491,14 +1492,14 @@ c endif
> DIMENSION,oneD,vacuum,stars,cell, > DIMENSION,oneD,vacuum,stars,cell,
> cmplx(1.,0.),l_noco,l_soc,jspins,nlotot,nbnd,z1, > cmplx(1.,0.),l_noco,l_soc,jspins,nlotot,nbnd,z1,
> nmzxyd,nmzd,nv2d,k1d,k2d,k3d,n2d,n3d,ig,nmzxy,nmz, > nmzxyd,nmzd,nv2d,k1d,k2d,k3d,n2d,n3d,ig,nmzxy,nmz,
> delz,ig2,bbmat,evac(1,jspin4),evac(1,jspin4_b),bkpt_b, > delz,ig2,bbmat,evac(1,jspin4),evac(1,jspin4_b),lapw_b%bkpt,
> bkpt_b2,odi,vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2, > lapw_b2%bkpt,odi,vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,doublespin, > jspin,jspin_b,doublespin,
! > k1_b,k2_b,k3_b, ! > k1_b,k2_b,k3_b,
> lapw_b%k1(:,:),lapw_b%k2(:,:),lapw_b%k3(:,:), > lapw_b%k1(:,:),lapw_b%k2(:,:),lapw_b%k3(:,:),
! > k1_b2,k2_b2,k3_b2, ! > k1_b2,k2_b2,k3_b2,
> lapw_b2%k1(:,:),lapw_b2%k2(:,:),lapw_b2%k3(:,:), > lapw_b2%k1(:,:),lapw_b2%k2(:,:),lapw_b2%k3(:,:),
> wannierspin,nvd,area,nbasfcn,neigd,zMat_b,zMat_b2, > wannierspin,nvd,area,nbasfcn,neigd,zMat_b,zMat_b2,
> lapw_b%nv,!nv_b, > lapw_b%nv,!nv_b,
> lapw_b2%nv,!nv_b2, > lapw_b2%nv,!nv_b2,
> sk2,phi2,omtil,gb(:,ikpt_b,ikpt), > sk2,phi2,omtil,gb(:,ikpt_b,ikpt),
......
...@@ -20,7 +20,7 @@ c*******************************************c ...@@ -20,7 +20,7 @@ c*******************************************c
CONTAINS CONTAINS
SUBROUTINE wann_uHu_dmi( SUBROUTINE wann_uHu_dmi(
> DIMENSION,stars,vacuum,atoms,sphhar,input,kpts,sym,mpi, > DIMENSION,stars,vacuum,atoms,sphhar,input,kpts,sym,mpi,
> banddos,oneD,noco,cell,vTot,wann, > banddos,oneD,noco,cell,vTot,wann,enpara,
> eig_idList,l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd, > eig_idList,l_real,l_dulo,l_noco,l_ss,lmaxd,ntypd,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype, > neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
> omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax, > omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,
...@@ -48,7 +48,7 @@ c*******************************************c ...@@ -48,7 +48,7 @@ c*******************************************c
use m_wann_projmethod use m_wann_projmethod
use m_wann_abinv use m_wann_abinv
use m_wann_kptsrotate use m_wann_kptsrotate
use m_wann_read_inp ! use m_wann_read_inp !Call wann_read_inp in fleur_init
use m_matmul,only : matmul3,matmul3r use m_matmul,only : matmul3,matmul3r
use m_wann_maxbnd use m_wann_maxbnd
use m_wann_uHu_tlmplm2 use m_wann_uHu_tlmplm2
...@@ -86,6 +86,7 @@ c*******************************************c ...@@ -86,6 +86,7 @@ c*******************************************c
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_potden),INTENT(IN) :: vTot TYPE(t_potden),INTENT(IN) :: vTot
TYPE(t_wann),INTENT(INOUT) :: wann TYPE(t_wann),INTENT(INOUT) :: wann
TYPE(t_enpara),INTENT(IN) :: enpara
c ..scalar arguments.. c ..scalar arguments..
character(len=20),intent(in) :: param_file character(len=20),intent(in) :: param_file
...@@ -295,7 +296,7 @@ c ..initializations.. ...@@ -295,7 +296,7 @@ c ..initializations..
c-----read the input file to determine what to do c-----read the input file to determine what to do
call wann_read_inp(input,l_p0,wann) ! call wann_read_inp(input,l_p0,wann) CAll wann_read_inp in fleur_init
if(wann%l_byenergy.and.wann%l_byindex) CALL juDFT_error if(wann%l_byenergy.and.wann%l_byindex) CALL juDFT_error
+ ("byenergy.and.byindex",calledby ="wannier") + ("byenergy.and.byindex",calledby ="wannier")
...@@ -831,18 +832,18 @@ c################################################################## ...@@ -831,18 +832,18 @@ c##################################################################
do 30 l = 0,lmax(n) do 30 l = 0,lmax(n)
c...compute the l-dependent, k-independent radial MT- basis functions c...compute the l-dependent, k-independent radial MT- basis functions
call radfun( call radfun(
> l,n,jspin4,epar(l,n,jspin3),vr(1,n,jspin3),atoms, > l,n,jspin4,enpara%el0(l,n,jspin3),vr(1,n,jspin3),atoms,
< ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus, < ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus,
< nodeu,noded,wronk) < nodeu,noded,wronk)
30 continue 30 continue
c...and the local orbital radial functions c...and the local orbital radial functions
do ilo = 1, nlo(n) do ilo = 1, nlo(n)
call radflo( call radflo(
> atoms,n,jspin4,ello(:,:,jspin3),vr(1,n,jspin3), > atoms,n,jspin4,enpara%ello0(:,:,jspin3),vr(1,n,jspin3),
> ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi, > ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi,
< usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4)) < usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4))
enddo enddo
c na = na + neq(n) c na = na + neq(n)
......
...@@ -62,6 +62,8 @@ c uHu = uHu_in ...@@ -62,6 +62,8 @@ c uHu = uHu_in
#endif #endif
endif endif
header='Elements uHu at k+b1 and k+b2'
c****************************************************** c******************************************************
c Write mmnk matrix to file. c Write mmnk matrix to file.
c****************************************************** c******************************************************
...@@ -137,10 +139,12 @@ c****************************************************** ...@@ -137,10 +139,12 @@ c******************************************************
! write (305) conjg(uHu_in) ! write (305) conjg(uHu_in)
write (305) uHu_in(:,:,ikpt_b2,ikpt_b,ikpt) write (305) uHu_in(:,:,ikpt_b2,ikpt_b,ikpt)
endif endif
close (305)
enddo enddo
enddo enddo
enddo enddo