Commit 2bb6598d authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' into inpgen

Conflicts:
	cdn/cdnval.F90
	cdn/q_mt_sl.f90
	cmake/Files_and_Targets.txt
	docs/removed_files/inpgen/set_inp.f90
	hybrid/trafo.F90
	init/efield.f90
	init/old_inp/setup.f90
	init/postprocessInput.F90
	io/r_inpXML.F90
	main/fleur.F90
	main/fleur_init.F90
	main/optional.F90
	math/CMakeLists.txt
	mpi/mpi_bc_all.F90
	tests/tests/CuBandXML/files/inp.xml
	tests/tests/CuBulkXML/files/inp.xml
	tests/tests/CuDOSXML/files/inp.xml
	tests/tests/Fe_1lXML/files/inp.xml
	tests/tests/Fe_1l_SOCXML/files/inp.xml
	tests/tests/Fe_bctXML/files/inp.xml
	tests/tests/Fe_bct_LOXML/files/inp.xml
	tests/tests/Fe_bct_SOCXML/files/inp.xml
	tests/tests/Fe_fccXML/files/inp.xml
	tests/tests/PTO-SOCXML/files/inp.xml
	tests/tests/PTOXML/files/inp.xml
	types/types_gradients.f90
	types/types_setup.F90
	vgen/mt_tofrom_grid.F90
	vgen/rotate_mt_den_tofrom_local.f90
	vgen/vis_xc.F90
	vgen/vmt_xc.F90
	xc-pot/libxc_postprocess_gga.f90
	xc-pot/metagga.F90
parents 2bfe64ec 2ed4eaf7
......@@ -101,7 +101,7 @@ CONTAINS
qtot, qistot
call tmp_potden%init(stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN)
call init_mt_grid(input%jspins, atoms, sphhar, xcpot, sym)
call init_mt_grid(input%jspins, atoms, sphhar, xcpot%needs_grad(), sym)
do n_atm =1,atoms%ntype
call mt_from_grid(atoms, sym, sphhar, n_atm, input%jspins, mt(:,:,n_atm), &
tmp_potden%mt(:,0:,n_atm,:))
......@@ -112,8 +112,8 @@ CONTAINS
enddo
call finish_mt_grid()
call init_pw_grid(xcpot, stars, sym, cell)
call pw_from_grid(xcpot, stars, .False., is, tmp_potden%pw)
call init_pw_grid(xcpot%needs_grad(), stars, sym, cell)
call pw_from_grid(xcpot%needs_grad(), stars, .False., is, tmp_potden%pw)
call finish_pw_grid()
call integrate_cdn(stars,atoms,sym,vacuum,input,cell,oneD, tmp_potden, &
......
......@@ -205,13 +205,13 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (.NOT.((jspin.EQ.2).AND.noco%l_noco)) THEN
! valence density in the interstitial region
CALL pwden(stars,kpts,banddos,oneD,input,mpi,noco,cell,atoms,sym,ikpt,&
jspin,lapw,noccbd,we,eig,den,results,force%f_b8,zMat,dos)
jspin,lapw,noccbd,ev_list,we,eig,den,results,force%f_b8,zMat,dos)
! charge of each valence state in this k-point of the SBZ in the layer interstitial region of the film
IF (l_dosNdir.AND.PRESENT(slab)) CALL q_int_sl(jspin,ikpt,stars,atoms,sym,cell,noccbd,lapw,slab,oneD,zMat)
IF (l_dosNdir.AND.PRESENT(slab)) CALL q_int_sl(jspin,ikpt,stars,atoms,sym,cell,noccbd,ev_list,lapw,slab,oneD,zMat)
! valence density in the vacuum region
IF (input%film) THEN
CALL vacden(vacuum,dimension,stars,oneD, kpts,input,sym,cell,atoms,noco,banddos,&
gVacMap,we,ikpt,jspin,vTot%vacz(:,:,jspin),noccbd,lapw,enpara%evac,eig,den,zMat,dos)
gVacMap,we,ikpt,jspin,vTot%vacz(:,:,jspin),noccbd,ev_list,lapw,enpara%evac,eig,den,zMat,dos)
END IF
END IF
IF (input%film) CALL regCharges%sumBandsVac(vacuum,dos,noccbd,ikpt,jsp_start,jsp_end,eig,we)
......@@ -227,18 +227,18 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
! perform Brillouin zone integration and summation over the
! bands in order to determine the energy parameters for each atom and angular momentum
CALL eparas(ispin,atoms,noccbd,mpi,ikpt,noccbd,we,eig,&
CALL eparas(ispin,atoms,noccbd,ev_list,mpi,ikpt,noccbd,we,eig,&
skip_t,cdnvalJob%l_evp,eigVecCoeffs,usdus,regCharges,dos,banddos%l_mcd,mcd)
IF (noco%l_mperp.AND.(ispin==jsp_end)) CALL qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
IF (noco%l_mperp.AND.(ispin==jsp_end)) CALL qal_21(dimension,atoms,input,noccbd,ev_list,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
! layer charge of each valence state in this k-point of the SBZ from the mt-sphere region of the film
IF (l_dosNdir) THEN
IF (PRESENT(slab)) CALL q_mt_sl(ispin,atoms,sym,noccbd,ikpt,noccbd,skip_t,noccbd,eigVecCoeffs,usdus,slab)
IF (PRESENT(slab)) CALL q_mt_sl(ispin,atoms,sym,noccbd,ev_list,ikpt,noccbd,skip_t,noccbd,eigVecCoeffs,usdus,slab)
IF (banddos%l_orb.AND.ANY((/banddos%alpha,banddos%beta,banddos%gamma/).NE.0.0)) THEN
CALL abcrot2(atoms,banddos,noccbd,eigVecCoeffs,ispin) ! rotate ab-coeffs
IF (PRESENT(orbcomp)) CALL orb_comp(ispin,ikpt,noccbd,atoms,noccbd,usdus,eigVecCoeffs,orbcomp)
IF (PRESENT(orbcomp)) CALL orb_comp(ispin,ikpt,noccbd,ev_list,atoms,noccbd,usdus,eigVecCoeffs,orbcomp)
END IF
ENDIF
CALL calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
......
......@@ -23,7 +23,7 @@ MODULE m_eparas
!***********************************************************************
!
CONTAINS
SUBROUTINE eparas(jsp,atoms,noccbd, mpi,ikpt,ne,we,eig,skip_t,l_evp,eigVecCoeffs,&
SUBROUTINE eparas(jsp,atoms,noccbd,ev_list,mpi,ikpt,ne,we,eig,skip_t,l_evp,eigVecCoeffs,&
usdus,regCharges,dos,l_mcd,mcd)
USE m_types
IMPLICIT NONE
......@@ -39,6 +39,7 @@ CONTAINS
INTEGER, INTENT (IN) :: noccbd,jsp
INTEGER, INTENT (IN) :: ne,ikpt ,skip_t
LOGICAL, INTENT (IN) :: l_mcd,l_evp
INTEGER, INTENT (IN) :: ev_list(noccbd)
! ..
! .. Array Arguments ..
REAL, INTENT (IN) :: eig(:)!(dimension%neigd),
......@@ -98,7 +99,7 @@ CONTAINS
DO icore = 1, mcd%ncore(n)
DO ipol = 1, 3
index = 3*(n-1) + ipol
mcd%mcd(index,icore,i,ikpt,jsp)=mcd%mcd(index,icore,i,ikpt,jsp) + fac*(&
mcd%mcd(index,icore,ev_list(i),ikpt,jsp)=mcd%mcd(index,icore,ev_list(i),ikpt,jsp) + fac*(&
suma * CONJG(mcd%m_mcd(icore,lm+1,index,1))*mcd%m_mcd(icore,lm+1,index,1) +&
sumb * CONJG(mcd%m_mcd(icore,lm+1,index,2))*mcd%m_mcd(icore,lm+1,index,2) +&
sumab* CONJG(mcd%m_mcd(icore,lm+1,index,2))*mcd%m_mcd(icore,lm+1,index,1) +&
......@@ -107,7 +108,7 @@ CONTAINS
ENDDO
ENDIF ! end MCD
ENDDO
dos%qal(l,n,i,ikpt,jsp) = (suma+sumb*usdus%ddn(l,n,jsp))/atoms%neq(n)
dos%qal(l,n,ev_list(i),ikpt,jsp) = (suma+sumb*usdus%ddn(l,n,jsp))/atoms%neq(n)
ENDDO
nt1 = nt1 + atoms%neq(n)
ENDDO
......@@ -120,8 +121,8 @@ CONTAINS
DO l = 0,3
DO n = 1,atoms%ntype
DO i = (skip_t+1),noccbd
regCharges%ener(l,n,jsp) = regCharges%ener(l,n,jsp) + dos%qal(l,n,i,ikpt,jsp)*we(i)*eig(i)
regCharges%sqal(l,n,jsp) = regCharges%sqal(l,n,jsp) + dos%qal(l,n,i,ikpt,jsp)*we(i)
regCharges%ener(l,n,jsp) = regCharges%ener(l,n,jsp) + dos%qal(l,n,ev_list(i),ikpt,jsp)*we(i)*eig(i)
regCharges%sqal(l,n,jsp) = regCharges%sqal(l,n,jsp) + dos%qal(l,n,ev_list(i),ikpt,jsp)*we(i)
ENDDO
ENDDO
ENDDO
......@@ -174,7 +175,7 @@ CONTAINS
! llo > 3 used for unoccupied states only
IF( l .GT. 3 ) CYCLE
DO i = 1,ne
dos%qal(l,ntyp,i,ikpt,jsp)= dos%qal(l,ntyp,i,ikpt,jsp) + ( 1.0/atoms%neq(ntyp) )* (&
dos%qal(l,ntyp,ev_list(i),ikpt,jsp)= dos%qal(l,ntyp,ev_list(i),ikpt,jsp) + ( 1.0/atoms%neq(ntyp) )* (&
qaclo(i,lo,ntyp)*usdus%uulon(lo,ntyp,jsp)+qbclo(i,lo,ntyp)*usdus%dulon(lo,ntyp,jsp) )
END DO
DO lop = 1,atoms%nlo(ntyp)
......@@ -182,7 +183,7 @@ CONTAINS
DO i = 1,ne
regCharges%enerlo(lo,ntyp,jsp) = regCharges%enerlo(lo,ntyp,jsp) +qlo(i,lop,lo,ntyp)*we(i)*eig(i)
regCharges%sqlo(lo,ntyp,jsp) = regCharges%sqlo(lo,ntyp,jsp) + qlo(i,lop,lo,ntyp)*we(i)
dos%qal(l,ntyp,i,ikpt,jsp)= dos%qal(l,ntyp,i,ikpt,jsp) + ( 1.0/atoms%neq(ntyp) ) *&
dos%qal(l,ntyp,ev_list(i),ikpt,jsp)= dos%qal(l,ntyp,ev_list(i),ikpt,jsp) + ( 1.0/atoms%neq(ntyp) ) *&
qlo(i,lop,lo,ntyp)*usdus%uloulopn(lop,lo,ntyp,jsp)
ENDDO
ENDIF
......
......@@ -7,7 +7,7 @@
MODULE m_pwden
CONTAINS
SUBROUTINE pwden(stars,kpts,banddos,oneD, input,mpi,noco,cell,atoms,sym, &
ikpt,jspin,lapw,ne,we,eig,den,results,f_b8,zMat,dos)
ikpt,jspin,lapw,ne,ev_list,we,eig,den,results,f_b8,zMat,dos)
!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
! In this subroutine the star function expansion coefficients of
! the plane wave charge density is determined.
......@@ -98,6 +98,7 @@ CONTAINS
REAL,INTENT(IN) :: we(:) !(nobd)
REAL,INTENT(IN) :: eig(:)!(dimension%neigd)
INTEGER, INTENT(IN) :: ev_list(ne)
!-----> BASIS FUNCTION INFORMATION
INTEGER,INTENT(IN):: ne
!-----> CHARGE DENSITY INFORMATION
......@@ -494,7 +495,7 @@ CONTAINS
ENDDO
DO istr = 1,stars%ng3_fft
CALL pwint(stars,atoms,sym, oneD,cell,istr,x)
dos%qis(nu,ikpt,1) = dos%qis(nu,ikpt,1) + REAL(cwk(istr)*x)/cell%omtil/REAL(ifftq3)
dos%qis(ev_list(nu),ikpt,1) = dos%qis(ev_list(nu),ikpt,1) + REAL(cwk(istr)*x)/cell%omtil/REAL(ifftq3)
ENDDO
cwk=0.0
......@@ -504,7 +505,7 @@ CONTAINS
ENDDO
DO istr = 1,stars%ng3_fft
CALL pwint(stars,atoms,sym, oneD,cell, istr, x)
dos%qis(nu,ikpt,input%jspins) = dos%qis(nu,ikpt,input%jspins) + REAL(cwk(istr)*x)/cell%omtil/REAL(ifftq3)
dos%qis(ev_list(nu),ikpt,input%jspins) = dos%qis(ev_list(nu),ikpt,input%jspins) + REAL(cwk(istr)*x)/cell%omtil/REAL(ifftq3)
ENDDO
ENDIF
ELSE
......
MODULE m_qintsl
USE m_juDFT
CONTAINS
SUBROUTINE q_int_sl(isp,ikpt,stars,atoms,sym,cell,ne,lapw,slab,oneD,zMat)
SUBROUTINE q_int_sl(isp,ikpt,stars,atoms,sym,cell,ne,ev_list,lapw,slab,oneD,zMat)
! *******************************************************
! calculate the charge of the En(k) state
! in the interstitial region of each leyer
......@@ -24,6 +24,9 @@ CONTAINS
!
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ne,isp,ikpt
INTEGER, INTENT (IN) :: ev_list(ne)
! ..
! .. Local Scalars ..
REAL q1,zsl1,zsl2,qi,volsli,volintsli
......@@ -105,7 +108,7 @@ CONTAINS
DO j = 1,stars%ng3
qi = qi + z_z(j)*stfunint(j,i)
ENDDO
slab%qintsl(i,n,ikpt,isp) = qi
slab%qintsl(i,ev_list(n),ikpt,isp) = qi
ENDDO ! over vacuum%layers
ENDDO ! over states
......
MODULE m_qmtsl
CONTAINS
!***********************************************************************
! Calculates the mt-spheres contribution to the layer charge for states
! {En} at the current k-point.
! Calculates the mt-spheres contribution to the layer charge for states
! {En} at the current k-point.
! Yury Koroteev 2003
! from eparas.F by Philipp Kurz 99/04
!
!***********************************************************************
!
SUBROUTINE q_mt_sl(jsp,atoms,sym,nobd,ikpt,ne,skip_t,noccbd,eigVecCoeffs,usdus,slab)
SUBROUTINE q_mt_sl(jsp,atoms,sym,nobd,ev_list,ikpt,ne,skip_t,noccbd,eigVecCoeffs,usdus,slab)
USE m_types_setup
USE m_types_usdus
USE m_types_cdnval, ONLY: t_eigVecCoeffs, t_slab
......@@ -20,8 +20,11 @@ CONTAINS
TYPE(t_slab), INTENT(INOUT) :: slab
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: nobd,jsp
INTEGER, INTENT (IN) :: nobd,jsp
INTEGER, INTENT (IN) :: ne,ikpt ,skip_t,noccbd
INTEGER, INTENT (IN) :: ev_list(nobd)
! ..
! .. Local Scalars ..
INTEGER i,l,lo ,natom,nn,ntyp,nt1,nt2,m
......@@ -68,7 +71,7 @@ CONTAINS
nt1 = nt1 + atoms%neq(n)
enddo
enddo
!
!
!---> initialize qlo
!
qlo=0.0
......@@ -124,7 +127,7 @@ CONTAINS
DO lo = 1,atoms%nlo(ntyp)
qq = qq + qlo(i,lo,ntyp)*usdus%uloulopn(lo,lo,ntyp,jsp) +&
qaclo(i,lo,ntyp)*usdus%uulon(lo,ntyp,jsp) +&
qbclo(i,lo,ntyp)*usdus%dulon(lo,ntyp,jsp)
qbclo(i,lo,ntyp)*usdus%dulon(lo,ntyp,jsp)
ENDDO
qmtlo(ntyp,i) = qq*fac
qmttot(ntyp,i) = qmt(ntyp,i) + qmtlo(ntyp,i)
......@@ -137,7 +140,7 @@ CONTAINS
DO ntyp = 1,atoms%ntype
qq = qq + qmttot(ntyp,i)*slab%nmtsl(ntyp,nl)
ENDDO
slab%qmtsl(nl,i,ikpt,jsp) = qq
slab%qmtsl(nl,ev_list(i),ikpt,jsp) = qq
ENDDO
ENDDO
! DO ntyp = 1,ntype
......
......@@ -5,7 +5,7 @@ MODULE m_qal21
!***********************************************************************
!
CONTAINS
SUBROUTINE qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
SUBROUTINE qal_21(dimension,atoms,input,noccbd,ev_list,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
USE m_types_setup
USE m_types_dos
......@@ -25,6 +25,8 @@ CONTAINS
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: noccbd,ikpt
INTEGER, INTENT (IN) :: ev_list(noccbd)
! .. Local Scalars ..
INTEGER i,l,lo,lop ,natom,nn,ntyp
INTEGER nt1,nt2,lm,n,ll1,ipol,icore,index,m
......@@ -152,10 +154,10 @@ CONTAINS
state : DO i = 1, noccbd
lls : DO l = 0,3
CALL rot_den_mat(noco%alph(n),noco%beta(n),&
dos%qal(l,n,i,ikpt,1),dos%qal(l,n,i,ikpt,2),qal21(l,n,i))
dos%qal(l,n,ev_list(i),ikpt,1),dos%qal(l,n,ev_list(i),ikpt,2),qal21(l,n,i))
IF (.FALSE.) THEN
IF (n==1) WRITE(*,'(3i3,4f10.5)') l,n,i,qal21(l,n,i),dos%qal(l,n,i,ikpt,:)
q_loc(1,1) = dos%qal(l,n,i,ikpt,1); q_loc(2,2) = dos%qal(l,n,i,ikpt,2)
IF (n==1) WRITE(*,'(3i3,4f10.5)') l,n,i,qal21(l,n,i),dos%qal(l,n,ev_list(i),ikpt,:)
q_loc(1,1) = dos%qal(l,n,ev_list(i),ikpt,1); q_loc(2,2) = dos%qal(l,n,ev_list(i),ikpt,2)
q_loc(1,2) = qal21(l,n,i); q_loc(2,1) = CONJG(q_loc(1,2))
q_hlp = MATMUL( TRANSPOSE( CONJG(chi) ) ,q_loc)
q_loc = MATMUL(q_hlp,chi)
......
......@@ -6,7 +6,7 @@ MODULE m_vacden
! *************************************************************
CONTAINS
SUBROUTINE vacden(vacuum,DIMENSION,stars,oneD,kpts,input,sym,cell,atoms,noco,banddos,&
gVacMap,we,ikpt,jspin,vz,ne,lapw,evac,eig,den,zMat,dos)
gVacMap,we,ikpt,jspin,vz,ne,ev_list,lapw,evac,eig,den,zMat,dos)
!***********************************************************************
! ****** change vacden(....,q) for vacuum density of states shz Jan.96
......@@ -70,6 +70,7 @@ CONTAINS
INTEGER,PARAMETER :: n2max=13
REAL,PARAMETER :: emax=2.0/hartree_to_ev_const
! .. Array Arguments ..
INTEGER, INTENT(IN) :: ev_list(ne)
REAL, INTENT(IN) :: evac(2,input%jspins)
REAL, INTENT(IN) :: we(DIMENSION%neigd)
REAL :: vz(vacuum%nmzd,2) ! Note this breaks the INTENT(IN) from cdnval. It may be read from a file in this subroutine.
......@@ -530,7 +531,7 @@ CONTAINS
ab = ab + we(n)*CONJG(ac(l,n,jspin))*bc(l,n,jspin)
ba = ba + we(n)*CONJG(bc(l,n,jspin))*ac(l,n,jspin)
qout = REAL(CONJG(ac(l,n,jspin))*ac(l,n,jspin)+tei(l,jspin)*CONJG(bc(l,n,jspin))*bc(l,n,jspin))
dos%qvac(n,ivac,ikpt,jspin) = dos%qvac(n,ivac,ikpt,jspin) + qout*cell%area
dos%qvac(ev_list(n),ivac,ikpt,jspin) = dos%qvac(ev_list(n),ivac,ikpt,jspin) + qout*cell%area
END DO
aae=-aa*vacuum%tworkf*2/3
bbe=-bb*vacuum%tworkf*2/3
......@@ -578,7 +579,7 @@ CONTAINS
qout = REAL(CONJG(ac_1(l,m,n,ispin))*ac_1(l,m,n,ispin) +&
tei_1(l,m,ispin)*CONJG(bc_1(l,m,n,ispin))*&
bc_1(l,m,n,ispin))
dos%qvac(n,ivac,ikpt,ispin) = dos%qvac(n,ivac,ikpt,ispin)+qout*cell%area
dos%qvac(ev_list(n),ivac,ikpt,ispin) = dos%qvac(ev_list(n),ivac,ikpt,ispin)+qout*cell%area
END DO
DO jz = 1,vacuum%nmz
ui = u_1(jz,l,m,ispin)
......@@ -599,7 +600,7 @@ CONTAINS
ab=ab + we(n)*CONJG(ac(l,n,ispin))*bc(l,n,ispin)
ba=ba + we(n)*CONJG(bc(l,n,ispin))*ac(l,n,ispin)
qout = REAL(CONJG(ac(l,n,ispin))*ac(l,n,ispin)+tei(l,ispin)*CONJG(bc(l,n,ispin))*bc(l,n,ispin))
dos%qvac(n,ivac,ikpt,ispin) = dos%qvac(n,ivac,ikpt,ispin) + qout*cell%area
dos%qvac(ev_list(n),ivac,ikpt,ispin) = dos%qvac(ev_list(n),ivac,ikpt,ispin) + qout*cell%area
END DO
DO jz = 1,vacuum%nmz
ui = u(jz,l,ispin)
......@@ -624,7 +625,7 @@ CONTAINS
ba = ba + we(n)*CONJG(bc_1(l,m,n,jspin))*ac_1(l,m,n,jspin)
qout = REAL(CONJG(ac_1(l,m,n,jspin))*ac_1(l,m,n,jspin)+&
tei_1(l,m,jspin)*CONJG(bc_1(l,m,n,jspin))*bc_1(l,m,n,jspin))
dos%qvac(n,ivac,ikpt,jspin) = dos%qvac(n,ivac,ikpt,jspin)+qout*cell%area
dos%qvac(ev_list(n),ivac,ikpt,jspin) = dos%qvac(ev_list(n),ivac,ikpt,jspin)+qout*cell%area
END DO
DO jz = 1,vacuum%nmz
ui = u_1(jz,l,m,jspin)
......@@ -645,7 +646,7 @@ CONTAINS
ab = ab + we(n)*CONJG(ac(l,n,jspin))*bc(l,n,jspin)
ba = ba + we(n)*CONJG(bc(l,n,jspin))*ac(l,n,jspin)
qout = REAL(CONJG(ac(l,n,jspin))*ac(l,n,jspin)+tei(l,jspin)*CONJG(bc(l,n,jspin))*bc(l,n,jspin))
dos%qvac(n,ivac,ikpt,jspin) = dos%qvac(n,ivac,ikpt,jspin) + qout*cell%area
dos%qvac(ev_list(n),ivac,ikpt,jspin) = dos%qvac(ev_list(n),ivac,ikpt,jspin) + qout*cell%area
END DO
DO jz = 1,vacuum%nmz
ui = u(jz,l,jspin)
......@@ -695,7 +696,7 @@ CONTAINS
ll = ll+1
END DO
CALL qsf(vacuum%delz,yy,RESULT,ll-1,0)
dos%qvlay(n,jj,ivac,ikpt,jspin) = dos%qvlay(n,jj,ivac,ikpt,jspin) + RESULT(1)
dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) = dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) + RESULT(1)
ELSE
ui = u(vacuum%izlay(jj,1),l,jspin)
uei = ue(vacuum%izlay(jj,1),l,jspin)
......@@ -706,7 +707,7 @@ CONTAINS
bb*dduei*dduei+(ab+ba)*ddui*dduei+&
2*aae*ui*ddui+2*bbe*uei*dduei+&
(abe+bae)*(ui*dduei+uei*ddui))
dos%qvlay(n,jj,ivac,ikpt,jspin) = dos%qvlay(n,jj,ivac,ikpt,jspin) +yy (1)
dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) = dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) +yy (1)
END IF
END DO
END DO
......@@ -746,11 +747,11 @@ CONTAINS
ll = ll+1
END DO
CALL qsf(vacuum%delz,yy,RESULT,ll-1,0)
dos%qvlay(n,jj,ivac,ikpt,ispin) = dos%qvlay(n,jj,ivac,ikpt,ispin) + RESULT(1)
dos%qvlay(ev_list(n),jj,ivac,ikpt,ispin) = dos%qvlay(ev_list(n),jj,ivac,ikpt,ispin) + RESULT(1)
ELSE
ui = u(vacuum%izlay(jj,1),l,ispin)
uei = ue(vacuum%izlay(jj,1),l,ispin)
dos%qvlay(n,jj,ivac,ikpt,ispin) = dos%qvlay(n,jj,ivac,ikpt,ispin) + REAL(&
dos%qvlay(ev_list(n),jj,ivac,ikpt,ispin) = dos%qvlay(ev_list(n),jj,ivac,ikpt,ispin) + REAL(&
aa*ui*ui+bb*uei*uei+(ab+ba)*ui*uei)
END IF
......@@ -806,13 +807,13 @@ CONTAINS
ll = ll+1
END DO
CALL qsf(vacuum%delz,yy,RESULT,ll-1,0)
dos%qvlay(n,jj,ivac,ikpt,jspin) = dos%qvlay(n,jj,ivac,ikpt,jspin) + RESULT(1)
dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) = dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) + RESULT(1)
ELSE
ui = u(vacuum%izlay(jj,1),l,jspin)
uei = ue(vacuum%izlay(jj,1),l,jspin)
uj = u(vacuum%izlay(jj,1),l1,jspin)
uej = ue(vacuum%izlay(jj,1),l1,jspin)
dos%qvlay(n,jj,ivac,ikpt,jspin) = REAL((aa*ui*uj + bb*uei*uej+ab*uei*uj+ba*ui**uej)*factorx*factory)
dos%qvlay(ev_list(n),jj,ivac,ikpt,jspin) = REAL((aa*ui*uj + bb*uei*uej+ab*uei*uj+ba*ui**uej)*factorx*factory)
END IF
END DO
END DO
......@@ -1205,9 +1206,9 @@ CONTAINS
uej = ue(vacuum%izlay(jj,1),l1,jspin)
t1 = aa*ui*uj + bb*uei*uej +ba*ui*uej + ab*uei*uj
IF (ind2.GE.2.AND.ind2.LE.vacuum%nstars) &
dos%qstars(ind2-1,n,jj,ivac,ikpt,jspin) = dos%qstars(ind2-1,n,jj,ivac,ikpt,jspin)+ t1*phs/stars%nstr2(ind2)
dos%qstars(ind2-1,ev_list(n),jj,ivac,ikpt,jspin) = dos%qstars(ind2-1,ev_list(n),jj,ivac,ikpt,jspin)+ t1*phs/stars%nstr2(ind2)
IF (ind2p.GE.2.AND.ind2p.LE.vacuum%nstars) &
dos%qstars(ind2p-1,n,jj,ivac,ikpt,jspin) = dos%qstars(ind2p-1,n,jj,ivac,ikpt,jspin) +CONJG(t1)*phs/stars%nstr2(ind2p)
dos%qstars(ind2p-1,ev_list(n),jj,ivac,ikpt,jspin) = dos%qstars(ind2p-1,ev_list(n),jj,ivac,ikpt,jspin) +CONJG(t1)*phs/stars%nstr2(ind2p)
END DO
END IF
ENDDO
......
......@@ -34,7 +34,7 @@ CONTAINS
REAL, INTENT (IN) :: alo1(atoms%nlod,atoms%ntype),blo1(atoms%nlod,atoms%ntype)
REAL, INTENT (IN) :: clo1(atoms%nlod,atoms%ntype)
COMPLEX, INTENT (IN) :: ylm( (atoms%lmaxd+1)**2 )
INTEGER, INTENT (IN) :: kvec(2*(2*atoms%llod+1) ,atoms%nat)
INTEGER, INTENT (IN) :: kvec(2*(2*atoms%llod+1) ,atoms%nlod)
LOGICAL, INTENT (OUT) :: enough(atoms%nat)
COMPLEX, INTENT (INOUT) :: bascof_lo(3,-atoms%llod:atoms%llod,4*atoms%llod+2,atoms%nlod,atoms%nat)
INTEGER, INTENT (INOUT) :: nkvec(atoms%nlod,atoms%nat)
......
MODULE m_orbcomp
CONTAINS
SUBROUTINE orb_comp(jspin,ikpt,nobd,atoms,ne,usdus,eigVecCoeffs,orbcomp)
SUBROUTINE orb_comp(jspin,ikpt,nobd,ev_list,atoms,ne,usdus,eigVecCoeffs,orbcomp)
!***********************************************************************
! Calculates an orbital composition of eigen states
!
......@@ -41,6 +41,8 @@ CONTAINS
! ..Scalar Argument
INTEGER, INTENT (IN) :: nobd,ne,jspin,ikpt
INTEGER, INTENT (IN) :: ev_list(nobd)
! ..Local Scalars
INTEGER n,mt,ityp,imt,lm,lo
INTEGER l,lme,nate,lmaxe,jspe,nobc,nei
......@@ -321,8 +323,8 @@ CONTAINS
sum = sum + comp(lm)
ENDDO
cf = 100.0/sum
orbcomp%qmtp(n,mt,ikpt,jspin) = sum*100.0
orbcomp%comp(n,:,mt,ikpt,jspin) = comp(:)*cf
orbcomp%qmtp(ev_list(n),mt,ikpt,jspin) = sum*100.0
orbcomp%comp(ev_list(n),:,mt,ikpt,jspin) = comp(:)*cf
!----------------------------------------------------
ENDDO ! bands (n)
ENDDO ! atoms (imt) -> mt (=atoms%nat)
......
......@@ -83,13 +83,13 @@ endif ()
include(cmake/docker.txt)
#if (${FLEUR_USE_SERIAL})
#install(TARGETS fleur inpgen
#if (${FLEUR_USE_SERIAL})
#install(TARGETS fleur inpgen
# CONFIGURATIONS Release
# DESTINATION bin)
#endif()
#if (${FLEUR_USE_MPI})
#install(TARGETS fleur_MPI
#if (${FLEUR_USE_MPI})
#install(TARGETS fleur_MPI
# CONFIGURATIONS Release
# DESTINATION bin)
#endif()
......@@ -51,7 +51,7 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "6.1.0")
message(FATAL_ERROR "Only modern versions of gfortran >6.3 will be able to compile FLEUR\nYou need to specify a different compiler.\nSee the docs at www.flapw.de.\n")
endif()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -fopenmp -fdefault-real-8 -Wno-missing-include-dirs")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none -fopenmp -fdefault-real-8 -Wno-missing-include-dirs -fno-sign-zero")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O2 -g")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fdump-core -Wall -Wextra -Wno-array-temporaries -fbacktrace -fcheck=all -finit-real=nan -O0 -g -DCPP_DEBUG")
endif()
export CRAYPE_LINK_TYPE=dynamic
export CRAYPE_LINK_TYPE=dynamic
#ELPA
if [ $ELPA_MODULES ]
then
CLI_ELPA_OPENMP=1
FLEUR_LIBDIR="$FLEUR_LIBDIR $ELPA_LIB"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $ELPA_MODULES"
fi
if module list 2>&1 | grep -q mpich
then
export FC=mpif90
export CC=mpicc
else
export FC=gfortran
export CC=gcc
fi
if module list 2>&1 | grep -q intel
then
if module list 2>&1| grep -q mpi.ibm
then
echo "Please use intelmpi, e.g. do a module switch mpi.ibm mpi.intel"
exit
fi
if module list 2>&1| grep -q mpi.intel/2017
then
echo "There are problems with mpi.intel/2017, try another version"
exit
fi
if module list 2>&1| grep -q mpi.intel
then
export FC=mpif90
export CC=mpicc
fi
fi
if module list 2>&1 | grep -q elpa
then
#ELPA
CLI_ELPA_OPENMP=1
FLEUR_LIBDIR="$FLEUR_LIBDIR $ELPA_LIB"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $ELPA_MODULES_OPENMP"
fi
......@@ -29,6 +29,31 @@ if ( FLEUR_USE_HDF5)
)
endif()
#now try to find the library by adding the -l stuff to the FLEUR_LIBRARIES
foreach(ADD_String "-lhdf5_fortran;-lhdf5"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5"
"-lhdf5_fortran;-lhdf5;-ldl"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5;-ldl"
"-lhdf5_fortran;-lhdf5;-lz"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5;-lz"
"-lhdf5_fortran;-lhdf5;-ldl;-lz"
"-lhdf5_fortran;-lhdf5_f90cstub;-lhdf5;-ldl;-lz")
if (NOT FLEUR_USE_HDF5MPI)
set(TEST_LIBRARIES "${FLEUR_LIBRARIES};${ADD_String}")
try_compile(FLEUR_USE_HDF5MPI ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_HDF5MPI.f90
LINK_LIBRARIES ${TEST_LIBRARIES}
)
if (FLEUR_USE_HDF5MPI)
set(FLEUR_HDF5_LIBRARIES ${TEST_LIBRARIES})
endif()
endif()
endforeach()
message("HDF5 Library found:${FLEUR_USE_HDF5}")
if (DEFINED CLI_FLEUR_USE_HDF5)
......
......@@ -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"]
......@@ -45,17 +45,17 @@
INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype)
INTEGER, INTENT (IN) :: speciesRepAtomType(atoms%nat)
CHARACTER(len=xl_buffer) :: buffer
LOGICAL, INTENT (IN) :: l_hyb
LOGICAL, INTENT (IN) :: l_hyb
REAL, INTENT (IN) :: idlist(:)
REAL, INTENT (INOUT) :: a1(3),a2(3),a3(3)