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 @@
try_compile(FLEUR_USE_WANN ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_Wannier90.f90
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}")
......
FROM ubuntu:18.10
FROM iffregistry.fz-juelich.de/fleur/fleur/intel-libs
MAINTAINER d.wortmann@fz-juelich.de
COPY ../fleur /home
COPY ../inpgen /home
COPY fleur /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
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
!
! calculates spin-orbit matrix for theta,phi =/= 0
......@@ -9,6 +9,7 @@ contains
! ..
! .. Scalar Arguments ..
INTEGER, INTENT(IN) :: is1,is2,l1,l2,m1,m2
INTEGER, INTENT(IN),OPTIONAL :: compo
REAL, INTENT(IN) :: theta,phi
! ..
! .. Local Scalars ..
......@@ -63,6 +64,29 @@ contains
ELSE IF (m1.EQ.m2 ) THEN
xlz = m2
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
! <1| |1> or <2| |2>
......
......@@ -94,7 +94,7 @@ CONTAINS
CALL spnorb_angles(atoms,mpi,noco%theta,noco%phi,rsoc%soangl)
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_sgml
USE m_sorad
......@@ -104,6 +104,7 @@ CONTAINS
TYPE(t_mpi),INTENT(IN) :: mpi
REAL,INTENT(IN) :: theta,phi
COMPLEX,INTENT(INOUT) :: soangl(:,-atoms%lmaxd:,:,:,-atoms%lmaxd:,:)
INTEGER, INTENT(IN),OPTIONAL :: compo
! ..
! ..
! .. Local Scalars ..
......@@ -116,7 +117,8 @@ CONTAINS
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)
!
......@@ -151,7 +153,7 @@ CONTAINS
DO m1 = -l1,l1,1
DO m2 = -l2,l2,1
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
!
......
......@@ -318,7 +318,7 @@ CONTAINS
DO i=1,SIZE(list)
CALL io_read_real3(d%evsetid,(/1,1,list(i),nk,jspin/),&
& (/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
END IF
END SUBROUTINE priv_r_vecc
......
......@@ -5,13 +5,6 @@
!--------------------------------------------------------------------------------
MODULE m_fleur
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
SUBROUTINE fleur_execute(mpi_comm)
......@@ -71,7 +64,6 @@ CONTAINS
USE m_dwigner
USE m_ylm
USE m_metagga
! USE m_plot
#ifdef CPP_MPI
USE m_mpi_bc_potden
#endif
......@@ -157,11 +149,6 @@ CONTAINS
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,-1.0,results%ef,.FALSE.,inDen)
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 potentials (start)
......@@ -254,14 +241,6 @@ CONTAINS
obsolete,cell,oneD,sliceplot,mpi,results,noco,EnergyDen,inDen,vTot,vx,vCoul)
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
CALL MPI_BARRIER(mpi%mpi_comm,ierr)
#endif
......@@ -385,14 +364,6 @@ CONTAINS
dimension,kpts,atoms,sphhar,stars,sym,&
enpara,cell,noco,vTot,results,oneD,coreSpecInput,&
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
SELECT TYPE(xcpot)
......
......@@ -36,7 +36,7 @@
USE m_fleur_init_old
USE m_types_xcpot_inbuild
USE m_mpi_bc_xcpot
USE m_wann_read_inp
#ifdef CPP_MPI
USE m_mpi_bc_all, ONLY : mpi_bc_all
......@@ -90,7 +90,8 @@
REAL :: a1(3),a2(3),a3(3)
REAL :: dtild, phi_add
LOGICAL :: l_found, l_kpts, l_exist
LOGICAL :: l_wann_inp
#ifdef CPP_MPI
INCLUDE 'mpif.h'
INTEGER ierr(3)
......@@ -534,5 +535,12 @@
!new check mode will only run the init-part of FLEUR
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 MODULE m_fleur_init
......@@ -72,6 +72,7 @@ wannier/wann_real.F
wannier/wann_rmat.f
wannier/wann_rw_eig.F
wannier/wann_socmat.F
wannier/wann_socmat_vec.F
wannier/wann_socmat_rs.f
wannier/wann_tlmw.f
wannier/wann_ujugaunt.F
......
......@@ -20,7 +20,7 @@ c*******************************************c
CONTAINS
SUBROUTINE wann_uHu(
> 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,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
> omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,
......@@ -47,7 +47,7 @@ c*******************************************c
use m_wann_projmethod
use m_wann_abinv
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_wann_maxbnd
use m_wann_uHu_tlmplm
......@@ -85,6 +85,7 @@ c*******************************************c
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_potden),INTENT(IN) :: vTot
TYPE(t_wann),INTENT(INOUT) :: wann
TYPE(t_enpara),INTENT(IN) :: enpara
c ..scalar arguments..
character(len=20),intent(in) :: param_file
......@@ -290,7 +291,7 @@ c ..initializations..
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
+ ("byenergy.and.byindex",calledby ="wannier")
......@@ -850,18 +851,18 @@ c uHuold = cmplx(0.,0.)
c...compute the l-dependent, k-independent radial MT- basis functions
call radfun(
> l,n,jspin4,epar(l,n,jspin3),vr(1,n,jspin3),atoms,
< ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus,
< nodeu,noded,wronk)
> l,n,jspin4,enpara%el0(l,n,jspin3),vr(1,n,jspin3),atoms,
< ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus,
< nodeu,noded,wronk)
30 continue
c...and the local orbital radial functions
do ilo = 1, nlo(n)
call radflo(
> atoms,n,jspin4,ello(:,:,jspin3),vr(1,n,jspin3),
> ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi,
< usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4))
> atoms,n,jspin4,enpara%ello0(:,:,jspin3),vr(1,n,jspin3),
> ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi,
< usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4))
enddo
c na = na + neq(n)
......@@ -1030,36 +1031,36 @@ c if (mod(i_rec-1,isize).eq.irank) then
& nbands,eigg,zzMat)
do i = 1,nbands
if((eigg(i).ge.e1s.and.nslibd.lt.numbands
& .and.wann%l_bynumber)
&.or.(eigg(i).ge.e1s.and.eigg(i).le.e2s.and.wann%l_byenergy)
&.or.(i.ge.wann%band_min(jspin)
& .and.
& (i.le.wann%band_max(jspin))
& .and.
& wann%l_byindex))then
nslibd = nslibd + 1
eig(nslibd) = eigg(i)
we(nslibd) = we(i)
if(l_noco)then
! funbas = nv(1) + nlotot
! funbas = funbas+nv(2) + nlotot
else
! funbas = nv(jspin) + nlotot
endif
IF (zzMat%l_real) THEN
! do j = 1,funbas
zMat%data_r(:,nslibd) = zzMat%data_r(:,i)
! enddo
ELSE
! do j = 1,funbas
zMat%data_c(:,nslibd) = zzMat%data_c(:,i)
! enddo
END IF
endif
enddo
c$$$ nslibd=0
! do i = 1,nbands
! if((eigg(i).ge.e1s.and.nslibd.lt.numbands
! & .and.wann%l_bynumber)
! &.or.(eigg(i).ge.e1s.and.eigg(i).le.e2s.and.wann%l_byenergy)
! &.or.(i.ge.wann%band_min(jspin)
! & .and.
! & (i.le.wann%band_max(jspin))
! & .and.
! & wann%l_byindex))then
! nslibd = nslibd + 1
! eig(nslibd) = eigg(i)
! we(nslibd) = we(i)
! if(l_noco)then
! ! funbas = nv(1) + nlotot
! ! funbas = funbas+nv(2) + nlotot
! else
! ! funbas = nv(jspin) + nlotot
! endif
! IF (zzMat%l_real) THEN
! ! do j = 1,funbas
! zMat%data_r(:,nslibd) = zzMat%data_r(:,i)
! ! enddo
! ELSE
! ! do j = 1,funbas
! zMat%data_c(:,nslibd) = zzMat%data_c(:,i)
! ! enddo
! END IF
! endif
! enddo
......@@ -1367,8 +1368,8 @@ c endif
call wann_uHu_sph(
> cmplx(1.,0.),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),gb(:,ikpt_b2,ikpt),
< tuu(:,:,:,:,tspin2),tud(:,:,:,:,tspin2),
> tdu(:,:,:,:,tspin2),tdd(:,:,:,:,tspin2),
......@@ -1393,8 +1394,8 @@ c endif
call wann_uHu_sph(
> cmplx(1.,0.),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),gb(:,ikpt_b2,ikpt),
< tuu_soc,tud_soc,
> tdu_soc,tdd_soc,
......@@ -1445,7 +1446,7 @@ c endif
! > k1_b2(:,jspin_b),k2_b2(:,jspin_b),k3_b2(:,jspin_b),
> lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin),
> 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,
> uHu(:,:,ikpt_b2,ikpt_b,i_rec))
call cpu_time(t1)
......@@ -1465,16 +1466,16 @@ c endif
call cpu_time(t0)
call wann_uHu_vac(
> cmplx(1.,0.),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(:,jspin4),evac(:,jspin4_b),bkpt_b,bkpt_b2,
> vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,doublespin,
> nbnd,z1,nmzxyd,nmzd,n2d,nv2d,k1d,k2d,k3d,n3d,nvac,ig,
> rgphs,nmzxy,nmz,delz,ig2,nq2,kv2,area,bmat,bbmat,
> evac(:,jspin4),evac(:,jspin4_b),lapw_b%bkpt,lapw_b2%bkpt,
> vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,doublespin,
! > 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,
> lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin),
> wannierspin,nvd,nbasfcn,neigd,
> lapw_b2%k1(:,jspin),lapw_b2%k2(:,jspin),lapw_b2%k3(:,jspin),
> wannierspin,nvd,nbasfcn,neigd,
> zMat_b,zMat_b2,
> lapw_b%nv,!nv_b,
> lapw_b2%nv,! nv_b2,
......@@ -1491,14 +1492,14 @@ c endif
> DIMENSION,oneD,vacuum,stars,cell,
> cmplx(1.,0.),l_noco,l_soc,jspins,nlotot,nbnd,z1,
> nmzxyd,nmzd,nv2d,k1d,k2d,k3d,n2d,n3d,ig,nmzxy,nmz,
> delz,ig2,bbmat,evac(1,jspin4),evac(1,jspin4_b),bkpt_b,
> bkpt_b2,odi,vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,doublespin,
> delz,ig2,bbmat,evac(1,jspin4),evac(1,jspin4_b),lapw_b%bkpt,
> lapw_b2%bkpt,odi,vzxy(:,:,:,jspin3),vz,nslibd_b,nslibd_b2,
> jspin,jspin_b,doublespin,
! > k1_b,k2_b,k3_b,
> lapw_b%k1(:,:),lapw_b%k2(:,:),lapw_b%k3(:,:),
! > k1_b2,k2_b2,k3_b2,
> 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_b2%nv,!nv_b2,
> sk2,phi2,omtil,gb(:,ikpt_b,ikpt),
......
......@@ -20,7 +20,7 @@ c*******************************************c
CONTAINS
SUBROUTINE wann_uHu_dmi(
> 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,
> neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,
> omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,
......@@ -48,7 +48,7 @@ c*******************************************c
use m_wann_projmethod
use m_wann_abinv
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_wann_maxbnd
use m_wann_uHu_tlmplm2
......@@ -86,6 +86,7 @@ c*******************************************c
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_potden),INTENT(IN) :: vTot
TYPE(t_wann),INTENT(INOUT) :: wann
TYPE(t_enpara),INTENT(IN) :: enpara
c ..scalar arguments..
character(len=20),intent(in) :: param_file
......@@ -295,7 +296,7 @@ c ..initializations..
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
+ ("byenergy.and.byindex",calledby ="wannier")
......@@ -831,18 +832,18 @@ c##################################################################
do 30 l = 0,lmax(n)
c...compute the l-dependent, k-independent radial MT- basis functions
call radfun(
> l,n,jspin4,epar(l,n,jspin3),vr(1,n,jspin3),atoms,
< ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus,
< nodeu,noded,wronk)
> l,n,jspin4,enpara%el0(l,n,jspin3),vr(1,n,jspin3),atoms,
< ff(n,:,:,l,jspin4),gg(n,:,:,l,jspin4),usdus,
< nodeu,noded,wronk)
30 continue
c...and the local orbital radial functions
do ilo = 1, nlo(n)
call radflo(
> atoms,n,jspin4,ello(:,:,jspin3),vr(1,n,jspin3),
> ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi,
< usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4))
> atoms,n,jspin4,enpara%ello0(:,:,jspin3),vr(1,n,jspin3),
> ff(n,1:,1:,0:,jspin4),gg(n,1:,1:,0:,jspin4),mpi,
< usdus,uuilon,duilon,ulouilopn,flo(n,:,:,:,jspin4))
enddo
c na = na + neq(n)
......
......@@ -62,6 +62,8 @@ c uHu = uHu_in
#endif
endif
header='Elements uHu at k+b1 and k+b2'
c******************************************************
c Write mmnk matrix to file.
c******************************************************
......@@ -137,10 +139,12 @@ c******************************************************
! write (305) conjg(uHu_in)
write (305) uHu_in(:,:,ikpt_b2,ikpt_b,ikpt)
endif
close (305)
enddo
enddo
enddo
close(305)
endif
......
......@@ -3,6 +3,7 @@
subroutine wann_convert_fleur_w90(jspins_in,l_nocosoc,wann)
use m_types
use m_juDFT
use m_constants
IMPLICIT NONE
integer,intent(in) :: jspins_in
logical,intent(in) :: l_nocosoc
......@@ -29,7 +30,7 @@
integer :: dummy1,dummy2,dummy3,dummy4,dummy5,dummy6
integer :: spin1,spin2,spinmat_dims,ikpt,dir,ii,jj
real :: conversionfactor
real,parameter :: hart=27.21138505
! real,parameter :: hart=27.21138505 !take from m_constants
integer :: jj_tmp,ii_tmp,j_tmp,i_tmp,dir_tmp,ikpt_tmp,test_tmp
integer :: write_bands,firstband
integer :: map3(3)
......@@ -184,7 +185,7 @@
filestoread=1
filenameread(1)='updown.perpmag_unf'
filenamewrite='WF1.tor'
conversionfactor=hart
conversionfactor=hartree_to_ev_const
map3(1)=2
map3(2)=1
......@@ -196,7 +197,7 @@
filestoread=1
filenameread(1)='updown.perpmag'
filenamewrite='WF1.tor'
conversionfactor=hart
conversionfactor=hartree_to_ev_const
map3(1)=2
map3(2)=1
......@@ -208,7 +209,7 @@
filestoread=1
filenameread(1)='updown.perpmag'
filenamewrite='WF1.tor'
conversionfactor=hart
conversionfactor=hartree_to_ev_const
map3(1)=2
map3(2)=1
......@@ -220,7 +221,7 @@
filestoread=1
filenameread(1)='updown.perpmag_unf'
filenamewrite='WF1.tor'
conversionfactor=hart
conversionfactor=hartree_to_ev_const
map3(1)=2
map3(2)=1
......@@ -235,7 +236,7 @@
l_spinmat=.true.
l_conjg=.true.
spinmat_dims=3
conversionfactor=hart
conversionfactor=hartree_to_ev_const
! write_bands=num_bands1
if(l_nocosoc) call juDFT_error('noco_or_soc and hsomtxvec')
......@@ -250,7 +251,7 @@
filenamewrite='WF1.lmpzsoc'
l_spinmat=.true.
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
! write_bands=num_bands1
if(l_nocosoc) call juDFT_error('noco_or_soc and hsomtxvec')
......@@ -265,7 +266,7 @@
l_spinmat=.true.
spinmat_dims=3
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
! write_bands=num_bands1
if(l_nocosoc) call juDFT_error('noco_or_soc and hsomtxvec')
......@@ -280,7 +281,7 @@
l_spinmat=.true.
spinmat_dims=3
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
! write_bands=num_bands1
if(l_nocosoc) call juDFT_error('noco_or_soc and hsomtxvec')
......@@ -296,7 +297,7 @@
num_compos=1
spinmat_dims=1
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
!
elseif(wann%l_hsomtx_to_hsoc_unf)then
......@@ -311,7 +312,7 @@
num_compos=1
spinmat_dims=1
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
!
elseif(wann%l_hsomtx_to_hsoc)then
l_readunf=.false.
......@@ -325,7 +326,7 @@
num_compos=1
spinmat_dims=1
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
!
elseif(wann%l_hsomtx_unf_to_hsoc)then
l_readunf=.true.
......@@ -339,7 +340,7 @@
l_spinmat=.true.
spinmat_dims=1
l_conjg=.true.
conversionfactor=hart
conversionfactor=hartree_to_ev_const
!
......
......@@ -14,7 +14,7 @@ CONTAINS
! Frank Freimuth
!**************************************************
USE m_types
USE m_wann_read_inp
! USE m_wann_read_inp !Call wann_read_inp now in fleur-init
USE m_wann_projgen
USE m_wann_kpointgen
USE m_wann_w90kpointgen
......@@ -42,7 +42,7 @@ CONTAINS
l_nocosoc=noco%l_noco.OR.noco%l_soc
!-----read the input file to determine what to do
CALL wann_read_inp(input,.TRUE.,wann)
! CALL wann_read_inp(input,.TRUE.,wann) !call wann_read_inp now in fleur_init
!-----generate projection-definition-file
IF(wann%l_projgen) THEN
......