Commit e678568b authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of fleur-git:fleur into develop

parents 60a85d2e ae93c46d
The MIT License (MIT)
Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
......@@ -256,6 +256,7 @@
write(*,*) as,sym%nop2,l_tria
! l_tria=.true.
ELSE
IF (input%l_inpXML) GOTO 66
OPEN (41,file='kpts',FORM='formatted',STATUS='old')
DO i = 1, kpts%nkpt+1
READ (41,*,END=66,ERR=66)
......
......@@ -587,6 +587,7 @@
REAL :: elup
REAL :: rkmax
REAL :: zelec
CHARACTER(LEN=8) :: comment(10)
TYPE(t_efield)::efield
END TYPE
......@@ -612,8 +613,6 @@
END TYPE
TYPE t_obsolete
INTEGER:: nwdd
INTEGER:: nwd
INTEGER:: lpr
INTEGER:: lepr
LOGICAL:: form66
......
......@@ -88,13 +88,12 @@
!
INQUIRE (file='inp',exist=l_inpexist)
IF (.not.l_inpexist) THEN
CALL juDFT_error("no inp- or input-file found!",calledby&
& ="dimen7")
CALL juDFT_error("no inp- or input-file found!",calledby ="dimen7")
ENDIF
!
!---> determine ntype,nop,natd,nwdd,nlod and layerd
!
CALL first_glance(atoms%ntype,sym%nop,atoms%natd,obsolete%nwdd,atoms%nlod,vacuum%layerd,&
CALL first_glance(atoms%ntype,sym%nop,atoms%natd,atoms%nlod,vacuum%layerd,&
input%itmax,l_kpts,l_qpts,l_gamma,kpts%nkpt,kpts%nmop,jij%nqpt,nmopq)
atoms%ntypd=atoms%ntype
atoms%nlod = max(atoms%nlod,1)
......
......@@ -98,11 +98,10 @@
1006 FORMAT(6x,'parameter (vacuum%nmzd=',i3,',vacuum%nmzxyd=',i3,')')
READ (1,*,ERR=200,END=200)
READ (1,909,ERR=200,END=200) dimension%nvd,dimension%nv2d,obsolete%nwdd,kpts%nkptd
IF (mpi%irank.EQ.0) WRITE (6,1009) dimension%nvd,dimension%nv2d,obsolete%nwdd,kpts%nkptd
READ (1,909,ERR=200,END=200) dimension%nvd,dimension%nv2d,kpts%nkptd
IF (mpi%irank.EQ.0) WRITE (6,1009) dimension%nvd,dimension%nv2d,1,kpts%nkptd
909 FORMAT (21x,i5,6x,i4,6x,i1,7x,i5,6x,i4)
1009 FORMAT(6x,'parameter (dimension%nvd=',i5,',dimension%nv2d=',i4,',obsolete%nwdd=',&
& i1,',kpts%nkptd=',i5,')')
1009 FORMAT(6x,'parameter (nvd=',i5,',nv2d=',i4,',nwdd=1',',nkptd=',i5,')')
READ (1,*,ERR=200,END=200)
READ (1,911,ERR=200,END=200) dimension%neigd,dimension%neigd
......@@ -162,23 +161,16 @@
WRITE (6,*)
CALL first_glance(&
& n1,n2,n3,n4,n5,n6,input%itmax,&
& n1,n2,n3,n5,n6,input%itmax,&
& l_kpts,l_qpts,ldum,n7,n8,n9,n10)
!
IF (n1>atoms%ntypd) CALL juDFT_error("atoms%ntypd too small in fl7para"&
& ,calledby ="dimens")
IF (n1>atoms%ntypd) CALL juDFT_error("atoms%ntypd too small in fl7para" ,calledby ="dimens")
IF (n2.LT.24) THEN
IF (n2>sym%nop ) CALL juDFT_error("sym%nop too small in fl7para"&
& ,calledby ="dimens")
IF (n2>sym%nop ) CALL juDFT_error("sym%nop too small in fl7para" ,calledby ="dimens")
ENDIF
IF (n3>atoms%natd ) CALL juDFT_error("atoms%natd too small in fl7para"&
& ,calledby ="dimens")
IF (n4>obsolete%nwdd ) CALL juDFT_error("obsolete%nwdd too small in fl7para"&
& ,calledby ="dimens")
IF (n5>atoms%nlod ) CALL juDFT_error("atoms%nlod too small in fl7para"&
& ,calledby ="dimens")
IF (n6>vacuum%layerd) CALL juDFT_error("vacuum%layerd too small in fl7para"&
& ,calledby ="dimens")
IF (n3>atoms%natd ) CALL juDFT_error("atoms%natd too small in fl7para" ,calledby ="dimens")
IF (n5>atoms%nlod ) CALL juDFT_error("atoms%nlod too small in fl7para" ,calledby ="dimens")
IF (n6>vacuum%layerd) CALL juDFT_error("vacuum%layerd too small in fl7para" ,calledby ="dimens")
IF ((.not.l_kpts).OR.(.not.l_qpts)) GOTO 201
ENDIF
......@@ -198,7 +190,7 @@
WRITE (6,*) ' invoking dimen7... '
!call first_glance to generate k-points
CALL first_glance(&
& n1,n2,n3,n4,n5,n6,input%itmax,&
& n1,n2,n3,n5,n6,input%itmax,&
& l_kpts,l_qpts,ldum,n7,n8,n9,n10)
CALL dimen7(&
& input,sym,stars,atoms,sphhar,&
......@@ -210,14 +202,14 @@
#ifdef CPP_MPI
i_vec = (/sym%nop,stars%k1d,stars%k2d,stars%k3d,stars%n3d,stars%n2d,stars%kq1d,stars%kq2d,stars%kq3d,stars%kxc1d,stars%kxc2d,stars%kxc3d&
& ,atoms%ntypd,atoms%natd,atoms%jmtd,sphhar%ntypsd,sphhar%nlhd,sphhar%memd,atoms%lmaxd,dimension%jspd,vacuum%nvacd,dimension%nvd,dimension%nv2d&
& ,obsolete%nwdd,kpts%nkptd,dimension%nstd,dimension%neigd,dimension%msh,dimension%ncvd,vacuum%layerd,atoms%nlod,atoms%llod,input%itmax/)
& ,1,kpts%nkptd,dimension%nstd,dimension%neigd,dimension%msh,dimension%ncvd,vacuum%layerd,atoms%nlod,atoms%llod,input%itmax/)
CALL MPI_BCAST(i_vec,33,MPI_INTEGER,0,mpi%Mpi_comm,ierr)
sym%nop=i_vec(1);stars%k1d=i_vec(2);stars%k2d=i_vec(3);stars%k3d=i_vec(4);stars%n3d=i_vec(5)
stars%n2d = i_vec(6);stars%kq1d=i_vec(7);stars%kq2d=i_vec(8);stars%kq3d=i_vec(9)
stars%kxc1d = i_vec(10);stars%kxc2d = i_vec(11);stars%kxc3d = i_vec(12)
atoms%ntypd = i_vec(13);atoms%natd =i_vec(14);atoms%jmtd=i_vec(15);sphhar%ntypsd=i_vec(16)
sphhar%nlhd = i_vec(17);sphhar%memd=i_vec(18);atoms%lmaxd=i_vec(19);dimension%jspd=i_vec(20)
vacuum%nvacd=i_vec(21);dimension%nvd=i_vec(22);dimension%nv2d=i_vec(23);obsolete%nwdd=i_vec(24)
vacuum%nvacd=i_vec(21);dimension%nvd=i_vec(22);dimension%nv2d=i_vec(23)
kpts%nkptd = i_vec(25); dimension%nstd=i_vec(26);dimension%neigd=i_vec(27);dimension%msh=i_vec(28)
dimension%ncvd=i_vec(29);vacuum%layerd=i_vec(30);atoms%nlod=i_vec(31);atoms%llod=i_vec(32)
input%itmax=i_vec(33)
......
......@@ -5,14 +5,14 @@ c reads the part of the input file that is necessary to call rw_inp
c
CONTAINS
SUBROUTINE first_glance(
< ntype,nop,nat,nwdd,nlod,layerd,itmax,
< ntype,nop,nat,nlod,layerd,itmax,
< l_kpts,l_qpts,l_gamma,nkpt,nmop,nqpt,
< nmopq)
USE m_symdata , ONLY : nammap,ord2,l_c2
IMPLICIT NONE
INTEGER,INTENT (OUT) :: ntype,nop,nat,nwdd,nlod,layerd,itmax
INTEGER,INTENT (OUT) :: ntype,nop,nat,nlod,layerd,itmax
INTEGER,INTENT (OUT) :: nkpt,nmop(3),nqpt,nmopq(3)
LOGICAL,INTENT (OUT) :: l_kpts,l_qpts,l_gamma
......@@ -98,9 +98,9 @@ c
line = line + 1
READ (5,*)
line = line + 1
READ (5,'(i3)',END=99,ERR=99) nwdd
READ (5,*)
line = line + 1
DO n = 1,nwdd
DO n = 1,1!nwdd
READ (5,*)
line = line + 1
READ (5,*)
......
......@@ -70,7 +70,7 @@ SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
CALL MPI_BCAST(oneD%odd%n2d,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%odd%nop,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(oneD%odd%nn2d,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(obsolete%nwdd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
!CALL MPI_BCAST(obsolete%nwdd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(jij%nqptd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
IF (mpi%irank.NE.0) THEN
......
......@@ -60,7 +60,7 @@
! .. Local Scalars ..
REAL dr,dtild,r,kmax1,dvac1,zp,scale
INTEGER i,iz,j,n,n1,na,nw ,ntst,nn,ios
INTEGER i,iz,j,n,n1,na,ntst,nn,ios
LOGICAL l_gga,l_test,l_vca
CHARACTER(len=2) :: str_up,str_do
CHARACTER(len=4) :: namex
......@@ -439,11 +439,10 @@
!---> nwd = number of energy windows; lepr = 0 (1) for energy
!---> parameters given on absolute (floating) scale
WRITE (16,FMT=*) 'nwd=',obsolete%nwd,'lepr=',obsolete%lepr
IF (obsolete%nwd>1) CALL juDFT_error("Multiple windows no longer supported",calledby ="inped")
WRITE (16,FMT=*) 'nwd=',1,'lepr=',obsolete%lepr
if (all(obsolete%lepr .ne. (/0,1/))) call judft_error("Wrong choice of lepr",calledby="inped")
WRITE (6,FMT=8320) pmod(obsolete%lpr),obsolete%form66,input%l_f,input%eonly,obsolete%nwd,llr(obsolete%lepr)
WRITE (16,FMT=8320) pmod(obsolete%lpr),obsolete%form66,input%l_f,input%eonly,obsolete%nwd,llr(obsolete%lepr)
WRITE (6,FMT=8320) pmod(obsolete%lpr),obsolete%form66,input%l_f,input%eonly,1,llr(obsolete%lepr)
WRITE (16,FMT=8320) pmod(obsolete%lpr),obsolete%form66,input%l_f,input%eonly,1,llr(obsolete%lepr)
WRITE (6,FMT=8330) atoms%ntype, (atoms%lnonsph(n),n=1,atoms%ntype)
WRITE (16,FMT=8330) atoms%ntype, (atoms%lnonsph(n),n=1,atoms%ntype)
8320 FORMAT (1x,/,/,/,' input of parameters for eigenvalues:',/,t5,&
......
......@@ -5,9 +5,7 @@
! m. weinert jan. 1987
!*********************************************************************
CONTAINS
SUBROUTINE inpeig_dim(&
& input,obsolete,cell,noco,&
& oneD,jij,kpts,dimension,stars)
SUBROUTINE inpeig_dim(input,obsolete,cell,noco, oneD,jij,kpts,dimension,stars)
USE m_constants, ONLY : pi_const,tpi_const
USE m_types
......@@ -24,13 +22,12 @@
TYPE(t_Jij),INTENT(INOUT) :: Jij
!-odim
!-odim
INTEGER nw ,nk,nq,i,nv,nv2,j,kq1,kq2,kq3
INTEGER nk,nq,i,nv,nv2,j,kq1,kq2,kq3
REAL s1,s2,scale,bk(3)
LOGICAL xyu
! ..
kpts%nkptd = 0 ; dimension%nvd = 0 ; dimension%nv2d = 0
stars%kq1d = 0 ; stars%kq2d = 0 ; stars%kq3d = 0
obsolete%nwd = obsolete%nwdd
!cell%aamat=matmul(transpose(cell%amat),cell%amat)
cell%bbmat=matmul(cell%bmat,transpose(cell%bmat))
!
......@@ -40,7 +37,6 @@
READ (113,*) jij%nqpt
ENDIF
OPEN (41,file='kpts',form='formatted',status='old')
DO nw = 1,obsolete%nwd
!---> k-mesh: given in units of the reciprocal lattice basis vectors
!---> scale is a factor to make input easier (default=1.0). k-pt
......@@ -112,12 +108,9 @@
dimension%nv2d = max(dimension%nv2d,nv2)
ENDDO ! k=pts
IF (nw == obsolete%nwd) THEN
REWIND(41)
READ (41,*)
ENDIF
ENDDO ! q-pts
ENDDO ! windows
REWIND(41)
READ (41,*)
ENDDO ! q-pts
IF (jij%l_J) THEN
CLOSE(113)
......
......@@ -65,10 +65,9 @@
!+gu
WRITE (6,'(6x,''3 & 2D planewaves, windows, k-points'')')
WRITE (6,8180) dimension%nvd,dimension%nv2d,obsolete%nwdd,kpts%nkptd
WRITE (6,8180) dimension%nvd,dimension%nv2d,kpts%nkptd
8180 FORMAT (6x,'parameter (nvd=',i5,',nv2d=',i4,',nwdd=',&
& i1,',nkptd=',i5,')')
8180 FORMAT (6x,'parameter (nvd=',i5,',nv2d=',i4,',nwdd=1', ',nkptd=',i5,')')
WRITE (6,'(6x,''Number of (occupied) bands'')')
WRITE (6,8190) dimension%neigd,dimension%neigd
......
......@@ -186,7 +186,7 @@
& input)
IF (input%gw.GE.1) CALL write_gw(&
& atoms%ntype,sym%nop,obsolete%nwd,input%jspins,atoms%natd,&
& atoms%ntype,sym%nop,1,input%jspins,atoms%natd,&
& atoms%ncst,atoms%neq,atoms%lmax,sym%mrot,cell%amat,cell%bmat,input%rkmax,&
& atoms%taual,atoms%zatom,cell%vol,1.0,DIMENSION%neigd,atoms%lmaxd,&
& atoms%nlod,atoms%llod,atoms%nlo,atoms%llo,noco%l_soc)
......
......@@ -53,7 +53,6 @@
INTEGER jri0(atoms%ntype),lmax0(atoms%ntype),nlo0(atoms%ntype),llo0(atoms%nlod,atoms%ntype)
CHARACTER(len=1) :: ch_rw
CHARACTER(len=4) :: namex
CHARACTER(len=8) :: name(10)
CHARACTER(len=3) :: noel(atoms%ntype)
CHARACTER(len=12) :: relcor
CHARACTER(len=3) :: latnamTemp
......@@ -146,7 +145,7 @@
noco%l_noco = noco%l_ss ; jij%l_J = .false. ; noco%soc_opt(:) = .false. ; input%jspins = 1
obsolete%lpr = 0 ; input%itmax = 9 ; input%maxiter = 99 ; input%imix = 7 ; input%alpha = 0.05
input%spinf = 2.0 ; obsolete%lepr = 0
sliceplot%kk = 0 ; sliceplot%nnne = 0 ; obsolete%nwd = 1 ; vacuum%nstars = 0 ; vacuum%nstm = 0
sliceplot%kk = 0 ; sliceplot%nnne = 0 ; vacuum%nstars = 0 ; vacuum%nstm = 0
input%isec1 = 99 ; nu = 5 ; vacuum%layerd = 1 ; iofile = 6
ALLOCATE(vacuum%izlay(vacuum%layerd,2))
banddos%ndir = 0 ; vacuum%layers = 0 ; atoms%nflip(:) = 1 ; vacuum%izlay(:,:) = 0
......@@ -187,7 +186,7 @@
input%delgau = input%tkb ; atoms%ntypd = atoms%ntype ; atoms%natd = atoms%nat
DO i = 1, 10
j = (i-1) * 8 + 1
name(i) = title(j:j+7)
input%comment(i) = title(j:j+7)
ENDDO
IF (noco%l_noco) input%jspins = 2
......@@ -420,7 +419,7 @@
CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,name,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,.FALSE.,numSpecies,&
& enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1))
......@@ -447,7 +446,7 @@
CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,name)
& noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment)
iofile = 6
OPEN (iofile,file='inp',form='formatted',status='old',position='append')
......@@ -481,7 +480,7 @@
CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,name)
& noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment)
IF ( ALL(div /= 0) ) nkpt3 = div
WRITE (iofile,FMT=9999) product(nkpt3),nkpt3,l_gamma
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_rinpXML
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!
!!! The routine r_inpXML reads in the inp.xml file
!!!
!!! GM'16
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS
SUBROUTINE r_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,dimension,&
......@@ -89,7 +102,6 @@ SUBROUTINE r_inpXML(&
! ..
! .. Local Variables
REAL :: scpos ,zc
INTEGER ::nw
INTEGER ieq,i,k,na,n,ii
REAL s3,ah,a,hs2,rest
LOGICAL l_hyb,l_sym,ldum
......@@ -280,7 +292,21 @@ SUBROUTINE r_inpXML(&
CALL ASSIGN_var(valueString,tempReal)
END DO
obsolete%nwdd = 1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Comment section
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
input%comment = ' '
xPathA = '/fleurInput/comment'
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA)))))
DO i = 1, LEN(TRIM(ADJUSTL(valueString)))
IF (valueString(i:i).EQ.achar(10)) valueString(i:i) = ' ' !remove line breaks
END DO
valueString = TRIM(ADJUSTL(valueString))
DO i = 1, 10
j = (i-1) * 8 + 1
input%comment(i) = valueString(j:j+7)
END DO
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of calculationSetup section
......@@ -1609,10 +1635,9 @@ SUBROUTINE r_inpXML(&
CALL juDFT_error("vacdos is true but vacDOS parameters are not set!", calledby = "r_inpXML")
END IF
vacuum%layerd = 1
IF (numberNodes.EQ.1) THEN
vacuum%layers = 1
IF ((banddos%vacdos).AND.(numberNodes.EQ.1)) THEN
vacuum%layers = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@layers'))
vacuum%layerd = vacuum%layers
input%integ = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@integ'))
vacuum%starcoeff = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@star'))
vacuum%nstars = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@nstars'))
......@@ -1623,6 +1648,7 @@ SUBROUTINE r_inpXML(&
vacuum%nstm = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@nstm'))
vacuum%tworkf = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@tworkf'))
END IF
vacuum%layerd = vacuum%layers
ALLOCATE(vacuum%izlay(vacuum%layerd,2))
! Read in optional chargeDensitySlicing parameters
......@@ -1823,10 +1849,10 @@ SUBROUTINE r_inpXML(&
sumWeight = sumWeight + kpts%weight(i)
kpts%bk(:,i) = kpts%bk(:,i) / kpts%posScale
END DO
kpts%posScale = 1.0
DO i = 1, kpts%nkpt
kpts%weight(i) = kpts%weight(i) / sumWeight
kpts%wtkpt(i) = kpts%weight(i)
WRITE(*,'(i0,4f12.6)') i, kpts%bk(1,i), kpts%bk(2,i), kpts%bk(3,i), kpts%weight(i)
END DO
! Generate missing general parameters
......@@ -1843,7 +1869,6 @@ SUBROUTINE r_inpXML(&
kpts%nkptd = kpts%nkpt
dimension%nvd = 0 ; dimension%nv2d = 0
stars%kq1d = 0 ; stars%kq2d = 0 ; stars%kq3d = 0
obsolete%nwd = obsolete%nwdd
obsolete%l_u2f = .FALSE.
obsolete%l_f2u = .FALSE.
!cell%aamat=matmul(transpose(cell%amat),cell%amat)
......@@ -2163,7 +2188,7 @@ SUBROUTINE r_inpXML(&
CALL prp_qfft(stars,cell,noco,input)
IF (input%gw.GE.1) THEN
CALL write_gw(atoms%ntype,sym%nop,obsolete%nwd,input%jspins,atoms%natd,&
CALL write_gw(atoms%ntype,sym%nop,1,input%jspins,atoms%natd,&
atoms%ncst,atoms%neq,atoms%lmax,sym%mrot,cell%amat,cell%bmat,input%rkmax,&
atoms%taual,atoms%zatom,cell%vol,1.0,DIMENSION%neigd,atoms%lmaxd,&
atoms%nlod,atoms%llod,atoms%nlo,atoms%llo,noco%l_soc)
......
......@@ -503,25 +503,22 @@
WRITE (6,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype),(hybrid%lcutwf(n),n=1,atoms%ntype)
6010 FORMAT (25i3)
!
READ (UNIT=5,FMT=6010,END=99,ERR=99) obsolete%nwd,obsolete%lepr
WRITE (6,9140) obsolete%nwd,obsolete%lepr
READ (UNIT=5,FMT=6010,END=99,ERR=99) nw,obsolete%lepr
IF (nw.ne.1) CALL juDFT_error("Multiple window calculations not supported")
WRITE (6,9140) nw,obsolete%lepr
!
zc=0.0
DO nw=1,obsolete%nwd
READ (UNIT=5,FMT=*,END=99,ERR=99)
WRITE (6,'(a8,i2)') 'Window #',nw
!
if (nw>1) call judft_error("Only single window calculations are supported")
READ (UNIT=5,FMT=6040,END=99,ERR=99)&
& input%ellow,input%elup,input%zelec
WRITE (6,9150) input%ellow,input%elup,input%zelec
6040 FORMAT (4f10.5)
zc = zc + input%zelec
!
READ (UNIT=5,FMT='(f10.5)',END=99,ERR=99) input%rkmax
WRITE (6,FMT='(f10.5,1x,A)') input%rkmax, '=kmax'
ENDDO
READ (UNIT=5,FMT=*,END=99,ERR=99)
!WRITE (6,'(a8,i2)') 'Window #',nw
!
READ (UNIT=5,FMT=6040,END=99,ERR=99) input%ellow,input%elup,input%zelec
WRITE (6,9150) input%ellow,input%elup,input%zelec
6040 FORMAT (4f10.5)
zc = zc + input%zelec
!
READ (UNIT=5,FMT='(f10.5)',END=99,ERR=99) input%rkmax
WRITE (6,FMT='(f10.5,1x,A)') input%rkmax, '=kmax'
READ (UNIT=5,FMT=8010,END=99,ERR=99) input%gauss,input%delgau,input%tria
WRITE (6,9160) input%gauss,input%delgau,input%tria
8010 FORMAT (6x,l1,f10.5,5x,l1)
......@@ -904,19 +901,16 @@
WRITE (5,FMT=chform) &
& (atoms%lnonsph(n),n=1,atoms%ntype),(hybrid%lcutwf(n),n=1,atoms%ntype)
ELSE
WRITE (chntype,'(i3)') atoms%ntype
chform = '('//chntype//'i3 )'
WRITE (5,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype)
WRITE (chntype,'(i3)') atoms%ntype
chform = '('//chntype//'i3 )'
WRITE (5,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype)
END IF
9140 FORMAT (25i3)
WRITE (5,9140) obsolete%nwd,obsolete%lepr
DO nw=1,obsolete%nwd
WRITE (5,'(a8,i2)') 'Window #',nw
if (nw>1) CALL judft_error("Only single window calculations are supported")
WRITE (5,9150) input%ellow,input%elup,input%zelec
9150 FORMAT (4f10.5)
WRITE (5,fmt='(f10.5,1x,A)') input%rkmax, '=kmax'
ENDDO
WRITE (5,9140) 1,obsolete%lepr
WRITE (5,9150) input%ellow,input%elup,input%zelec
9150 FORMAT (4f10.5)
WRITE (5,fmt='(f10.5,1x,A)') input%rkmax, '=kmax'
WRITE (5,9160) input%gauss,input%delgau,input%tria
9160 FORMAT ('gauss=',l1,f10.5,'tria=',l1)
IF (noco%soc_opt(atoms%ntype+1)) THEN
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_cdngen
use m_juDFT
CONTAINS
......@@ -6,16 +11,9 @@
enpara, cell, noco,jij, results, oneD)
!
! *****************************************************
! flapw7 charge density generator
! c.l.fu
! correction for nwd>1: semic must be set false for nw=nwd
! furthermore ch.d. arrays initialized to zero INSIDE nw
! loop; only last window stored; shift do 10
! aug 90; r.p.
! modifications for slicing by r.p. and h.e. (1/91)
! error in reading 66 for spin-polarized case:
! read(66) nkpt was read for jspin>1 also
! Corrected mai 93 r.p.
! Charge density generator
! calls cdnval to generate the valence charge and the
! core routines for the core contribution
! *****************************************************
!
USE m_constants, ONLY : pi_const,sfp_const
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_fleur
IMPLICIT NONE
CONTAINS
......@@ -614,16 +619,12 @@
CALL timestart("determination of fermi energy")
IF ( noco%l_soc .AND. (.NOT. noco%l_noco) ) THEN
DO n=1,obsolete%nwd
input%zelec = input%zelec*2
ENDDO
input%zelec = input%zelec*2
CALL fermie(eig_id,mpi,kpts,obsolete,&
input,noco,enpara%epara_min,jij,cell,results)
results%seigscv = results%seigscv/2
results%ts = results%ts/2
DO n=1,obsolete%nwd
input%zelec = input%zelec/2
ENDDO
input%zelec = input%zelec/2
ELSE
CALL fermie(eig_id,mpi,kpts,obsolete,&
input,noco,enpara%epara_min,jij,cell,results)
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_fleur_init
IMPLICIT NONE
CONTAINS
......@@ -59,7 +64,6 @@
COMPLEX :: cdum
CHARACTER(len=4) :: namex
CHARACTER(len=12) :: relcor
CHARACTER(len=8) :: comment(10)
REAL :: a1(3),a2(3),a3(3)
REAL :: scale, dtild
#ifdef CPP_MPI
......@@ -106,7 +110,6 @@
ALLOCATE(xmlCoreOccs(1,1,1))
namex = ' '
relcor = ' '
comment = ' '
a1 = 0.0
a2 = 0.0
a3 = 0.0
......@@ -125,7 +128,7 @@
CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,(/1,1,1/),kpts%l_gamma,&
& noel,namex,relcor,a1,a2,a3,scale,dtild,comment,&!comment is 'name'. Still has to be read in!
& noel,namex,relcor,a1,a2,a3,scale,dtild,input%comment,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,.TRUE.,numSpecies,&
& enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1))
......@@ -483,8 +486,6 @@
END DO
ELSE
IF ( banddos%dos .AND. banddos%ndir == -3 ) THEN
IF ( obsolete%nwd /= 1 )&
& STOP 'orbital decomposed DOS only implemented for 1 window!'
CALL gen_bz(kpts,sym)
END IF
ALLOCATE(hybrid%map(0,0),hybrid%tvec(0,0,0),hybrid%d_wgn2(0,0,0,0))
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_fleur_jobs
USE m_juDFT
IMPLICIT NONE
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_mix
USE m_juDFT
!*************************************************************************
!**** mixing of charge densities: ****
!**** IMIX= 0 : linear mixing ****
!**** IMIX = 3 : BROYDEN'S FIRST METHOD ****
!**** IMIX = 5 : BROYDEN'S SECOND METHOD ****
!**** IMIX = 7 : GENERALIZED ANDERSEN METHOD ****
!**** implementation to flapw7 ..... R.Pentcheva, D.Vogtenhuber ****
! mixing of charge densities or potentials:
! IMIX= 0 : linear mixing
! IMIX = 3 : BROYDEN'S FIRST METHOD
! IMIX = 5 : BROYDEN'S SECOND METHOD
! IMIX = 7 : GENERALIZED ANDERSEN METHOD
!************************************************************************
CONTAINS
SUBROUTINE mix(stars,atoms,sphhar,vacuum,input,sym, cell, it, noco, oneD,hybrid)
......
This diff is collapsed.
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_totale
CONTAINS
SUBROUTINE totale(atoms,sphhar,stars,vacuum, &
sym,input,noco,cell,oneD, xcpot,hybrid, it,results)
!
! ***************************************************
! subroutine calculates the total energy of the slab
! c.l.fu
! subroutine calculates the total energy
! ***************************************************
! single particle energies
! SEIGC sum of the eigenvalues of the core states
......
!--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_vgen
USE m_juDFT
CONTAINS
SUBROUTINE vgen(reap,input,xcpot,dimension, atoms,sphhar,stars,&
vacuum,sym, obsolete,cell,oneD,sliceplot,mpi, results,noco)
! ***********************************************************
! FLAPW7 film potential generator *
! composed July 1986, revised and tested May 1987 *
! spin-polarized added may 1987 *
! c.l.fu, R. Podloucky *
! FLAPW potential generator *
! ***********************************************************
! calculates the density-potential integrals needed for the
! total energy
......@@ -15,10 +17,6 @@ CONTAINS
! TE_VEFF: charge density-effective potential integral
! TE_EXC : charge density-ex-corr.energy density integral
! ***********************************************************
! VR0 average coulomb potential contributes to the Madelung term
! R.Pentcheva 09.05.96
! ***********************************************************
!
#include"cpp_double.h"
USE m_constants
USE m_vmts
......
......@@ -42,7 +42,7 @@ CONTAINS
EXTERNAL MPI_BCAST
IF (mpi%irank.EQ.0) THEN
i(1)=1 ; i(2)=obsolete%lpr ; i(3)=atoms%ntype ; i(5)=obsolete%nwd ; i(6)=input%isec1
i(1)=1 ; i(2)=obsolete%lpr ; i(3)=atoms%ntype ; i(5)=1 ; i(6)=input%isec1
i(7)=stars%ng2 ; i(8)=stars%ng3 ; i(9)=vacuum%nmz ; i(10)=vacuum%nmzxy ; i(11)=obsolete%lepr
i(12)=input%jspins ; i(13)=vacuum%nvac ; i(14)=input%itmax ; i(15)=sliceplot%kk ; i(16)=vacuum%layers
i(17)=sliceplot%nnne ; i(18)=banddos%ndir ; i(