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 @@ ...@@ -256,6 +256,7 @@
write(*,*) as,sym%nop2,l_tria write(*,*) as,sym%nop2,l_tria
! l_tria=.true. ! l_tria=.true.
ELSE ELSE
IF (input%l_inpXML) GOTO 66
OPEN (41,file='kpts',FORM='formatted',STATUS='old') OPEN (41,file='kpts',FORM='formatted',STATUS='old')
DO i = 1, kpts%nkpt+1 DO i = 1, kpts%nkpt+1
READ (41,*,END=66,ERR=66) READ (41,*,END=66,ERR=66)
......
...@@ -587,6 +587,7 @@ ...@@ -587,6 +587,7 @@
REAL :: elup REAL :: elup
REAL :: rkmax REAL :: rkmax
REAL :: zelec REAL :: zelec
CHARACTER(LEN=8) :: comment(10)
TYPE(t_efield)::efield TYPE(t_efield)::efield
END TYPE END TYPE
...@@ -612,8 +613,6 @@ ...@@ -612,8 +613,6 @@
END TYPE END TYPE
TYPE t_obsolete TYPE t_obsolete
INTEGER:: nwdd
INTEGER:: nwd
INTEGER:: lpr INTEGER:: lpr
INTEGER:: lepr INTEGER:: lepr
LOGICAL:: form66 LOGICAL:: form66
......
...@@ -88,13 +88,12 @@ ...@@ -88,13 +88,12 @@
! !
INQUIRE (file='inp',exist=l_inpexist) INQUIRE (file='inp',exist=l_inpexist)
IF (.not.l_inpexist) THEN IF (.not.l_inpexist) THEN
CALL juDFT_error("no inp- or input-file found!",calledby& CALL juDFT_error("no inp- or input-file found!",calledby ="dimen7")
& ="dimen7")
ENDIF ENDIF
! !
!---> determine ntype,nop,natd,nwdd,nlod and layerd !---> 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) input%itmax,l_kpts,l_qpts,l_gamma,kpts%nkpt,kpts%nmop,jij%nqpt,nmopq)
atoms%ntypd=atoms%ntype atoms%ntypd=atoms%ntype
atoms%nlod = max(atoms%nlod,1) atoms%nlod = max(atoms%nlod,1)
......
...@@ -98,11 +98,10 @@ ...@@ -98,11 +98,10 @@
1006 FORMAT(6x,'parameter (vacuum%nmzd=',i3,',vacuum%nmzxyd=',i3,')') 1006 FORMAT(6x,'parameter (vacuum%nmzd=',i3,',vacuum%nmzxyd=',i3,')')
READ (1,*,ERR=200,END=200) READ (1,*,ERR=200,END=200)
READ (1,909,ERR=200,END=200) 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,obsolete%nwdd,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) 909 FORMAT (21x,i5,6x,i4,6x,i1,7x,i5,6x,i4)
1009 FORMAT(6x,'parameter (dimension%nvd=',i5,',dimension%nv2d=',i4,',obsolete%nwdd=',& 1009 FORMAT(6x,'parameter (nvd=',i5,',nv2d=',i4,',nwdd=1',',nkptd=',i5,')')
& i1,',kpts%nkptd=',i5,')')
READ (1,*,ERR=200,END=200) READ (1,*,ERR=200,END=200)
READ (1,911,ERR=200,END=200) dimension%neigd,dimension%neigd READ (1,911,ERR=200,END=200) dimension%neigd,dimension%neigd
...@@ -162,23 +161,16 @@ ...@@ -162,23 +161,16 @@
WRITE (6,*) WRITE (6,*)
CALL first_glance(& 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) & l_kpts,l_qpts,ldum,n7,n8,n9,n10)
! !
IF (n1>atoms%ntypd) CALL juDFT_error("atoms%ntypd too small in fl7para"& IF (n1>atoms%ntypd) CALL juDFT_error("atoms%ntypd too small in fl7para" ,calledby ="dimens")
& ,calledby ="dimens")
IF (n2.LT.24) THEN IF (n2.LT.24) THEN
IF (n2>sym%nop ) CALL juDFT_error("sym%nop too small in fl7para"& IF (n2>sym%nop ) CALL juDFT_error("sym%nop too small in fl7para" ,calledby ="dimens")
& ,calledby ="dimens")
ENDIF ENDIF
IF (n3>atoms%natd ) CALL juDFT_error("atoms%natd too small in fl7para"& IF (n3>atoms%natd ) CALL juDFT_error("atoms%natd too small in fl7para" ,calledby ="dimens")
& ,calledby ="dimens") IF (n5>atoms%nlod ) CALL juDFT_error("atoms%nlod too small in fl7para" ,calledby ="dimens")
IF (n4>obsolete%nwdd ) CALL juDFT_error("obsolete%nwdd too small in fl7para"& IF (n6>vacuum%layerd) CALL juDFT_error("vacuum%layerd too small in fl7para" ,calledby ="dimens")
& ,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 IF ((.not.l_kpts).OR.(.not.l_qpts)) GOTO 201
ENDIF ENDIF
...@@ -198,7 +190,7 @@ ...@@ -198,7 +190,7 @@
WRITE (6,*) ' invoking dimen7... ' WRITE (6,*) ' invoking dimen7... '
!call first_glance to generate k-points !call first_glance to generate k-points
CALL first_glance(& 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) & l_kpts,l_qpts,ldum,n7,n8,n9,n10)
CALL dimen7(& CALL dimen7(&
& input,sym,stars,atoms,sphhar,& & input,sym,stars,atoms,sphhar,&
...@@ -210,14 +202,14 @@ ...@@ -210,14 +202,14 @@
#ifdef CPP_MPI #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& 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& & ,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) 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) 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%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) 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) 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) 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) 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) 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) input%itmax=i_vec(33)
......
...@@ -5,14 +5,14 @@ c reads the part of the input file that is necessary to call rw_inp ...@@ -5,14 +5,14 @@ c reads the part of the input file that is necessary to call rw_inp
c c
CONTAINS CONTAINS
SUBROUTINE first_glance( 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, < l_kpts,l_qpts,l_gamma,nkpt,nmop,nqpt,
< nmopq) < nmopq)
USE m_symdata , ONLY : nammap,ord2,l_c2 USE m_symdata , ONLY : nammap,ord2,l_c2
IMPLICIT NONE 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) INTEGER,INTENT (OUT) :: nkpt,nmop(3),nqpt,nmopq(3)
LOGICAL,INTENT (OUT) :: l_kpts,l_qpts,l_gamma LOGICAL,INTENT (OUT) :: l_kpts,l_qpts,l_gamma
...@@ -98,9 +98,9 @@ c ...@@ -98,9 +98,9 @@ c
line = line + 1 line = line + 1
READ (5,*) READ (5,*)
line = line + 1 line = line + 1
READ (5,'(i3)',END=99,ERR=99) nwdd READ (5,*)
line = line + 1 line = line + 1
DO n = 1,nwdd DO n = 1,1!nwdd
READ (5,*) READ (5,*)
line = line + 1 line = line + 1
READ (5,*) READ (5,*)
......
...@@ -70,7 +70,7 @@ SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,& ...@@ -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%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%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(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) CALL MPI_BCAST(jij%nqptd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
IF (mpi%irank.NE.0) THEN IF (mpi%irank.NE.0) THEN
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
! .. Local Scalars .. ! .. Local Scalars ..
REAL dr,dtild,r,kmax1,dvac1,zp,scale 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 LOGICAL l_gga,l_test,l_vca
CHARACTER(len=2) :: str_up,str_do CHARACTER(len=2) :: str_up,str_do
CHARACTER(len=4) :: namex CHARACTER(len=4) :: namex
...@@ -439,11 +439,10 @@ ...@@ -439,11 +439,10 @@
!---> nwd = number of energy windows; lepr = 0 (1) for energy !---> nwd = number of energy windows; lepr = 0 (1) for energy
!---> parameters given on absolute (floating) scale !---> parameters given on absolute (floating) scale
WRITE (16,FMT=*) 'nwd=',obsolete%nwd,'lepr=',obsolete%lepr WRITE (16,FMT=*) 'nwd=',1,'lepr=',obsolete%lepr
IF (obsolete%nwd>1) CALL juDFT_error("Multiple windows no longer supported",calledby ="inped")
if (all(obsolete%lepr .ne. (/0,1/))) call judft_error("Wrong choice of lepr",calledby="inped") 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 (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,obsolete%nwd,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 (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) WRITE (16,FMT=8330) atoms%ntype, (atoms%lnonsph(n),n=1,atoms%ntype)
8320 FORMAT (1x,/,/,/,' input of parameters for eigenvalues:',/,t5,& 8320 FORMAT (1x,/,/,/,' input of parameters for eigenvalues:',/,t5,&
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
! m. weinert jan. 1987 ! m. weinert jan. 1987
!********************************************************************* !*********************************************************************
CONTAINS CONTAINS
SUBROUTINE inpeig_dim(& SUBROUTINE inpeig_dim(input,obsolete,cell,noco, oneD,jij,kpts,dimension,stars)
& input,obsolete,cell,noco,&
& oneD,jij,kpts,dimension,stars)
USE m_constants, ONLY : pi_const,tpi_const USE m_constants, ONLY : pi_const,tpi_const
USE m_types USE m_types
...@@ -24,13 +22,12 @@ ...@@ -24,13 +22,12 @@
TYPE(t_Jij),INTENT(INOUT) :: Jij TYPE(t_Jij),INTENT(INOUT) :: Jij
!-odim !-odim
!-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) REAL s1,s2,scale,bk(3)
LOGICAL xyu LOGICAL xyu
! .. ! ..
kpts%nkptd = 0 ; dimension%nvd = 0 ; dimension%nv2d = 0 kpts%nkptd = 0 ; dimension%nvd = 0 ; dimension%nv2d = 0
stars%kq1d = 0 ; stars%kq2d = 0 ; stars%kq3d = 0 stars%kq1d = 0 ; stars%kq2d = 0 ; stars%kq3d = 0
obsolete%nwd = obsolete%nwdd
!cell%aamat=matmul(transpose(cell%amat),cell%amat) !cell%aamat=matmul(transpose(cell%amat),cell%amat)
cell%bbmat=matmul(cell%bmat,transpose(cell%bmat)) cell%bbmat=matmul(cell%bmat,transpose(cell%bmat))
! !
...@@ -40,7 +37,6 @@ ...@@ -40,7 +37,6 @@
READ (113,*) jij%nqpt READ (113,*) jij%nqpt
ENDIF ENDIF
OPEN (41,file='kpts',form='formatted',status='old') OPEN (41,file='kpts',form='formatted',status='old')
DO nw = 1,obsolete%nwd
!---> k-mesh: given in units of the reciprocal lattice basis vectors !---> k-mesh: given in units of the reciprocal lattice basis vectors
!---> scale is a factor to make input easier (default=1.0). k-pt !---> scale is a factor to make input easier (default=1.0). k-pt
...@@ -112,12 +108,9 @@ ...@@ -112,12 +108,9 @@
dimension%nv2d = max(dimension%nv2d,nv2) dimension%nv2d = max(dimension%nv2d,nv2)
ENDDO ! k=pts ENDDO ! k=pts
IF (nw == obsolete%nwd) THEN
REWIND(41) REWIND(41)
READ (41,*) READ (41,*)
ENDIF
ENDDO ! q-pts ENDDO ! q-pts
ENDDO ! windows
IF (jij%l_J) THEN IF (jij%l_J) THEN
CLOSE(113) CLOSE(113)
......
...@@ -65,10 +65,9 @@ ...@@ -65,10 +65,9 @@
!+gu !+gu
WRITE (6,'(6x,''3 & 2D planewaves, windows, k-points'')') 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=',& 8180 FORMAT (6x,'parameter (nvd=',i5,',nv2d=',i4,',nwdd=1', ',nkptd=',i5,')')
& i1,',nkptd=',i5,')')
WRITE (6,'(6x,''Number of (occupied) bands'')') WRITE (6,'(6x,''Number of (occupied) bands'')')
WRITE (6,8190) dimension%neigd,dimension%neigd WRITE (6,8190) dimension%neigd,dimension%neigd
......
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
& input) & input)
IF (input%gw.GE.1) CALL write_gw(& 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%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%taual,atoms%zatom,cell%vol,1.0,DIMENSION%neigd,atoms%lmaxd,&
& atoms%nlod,atoms%llod,atoms%nlo,atoms%llo,noco%l_soc) & atoms%nlod,atoms%llod,atoms%nlo,atoms%llo,noco%l_soc)
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
INTEGER jri0(atoms%ntype),lmax0(atoms%ntype),nlo0(atoms%ntype),llo0(atoms%nlod,atoms%ntype) INTEGER jri0(atoms%ntype),lmax0(atoms%ntype),nlo0(atoms%ntype),llo0(atoms%nlod,atoms%ntype)
CHARACTER(len=1) :: ch_rw CHARACTER(len=1) :: ch_rw
CHARACTER(len=4) :: namex CHARACTER(len=4) :: namex
CHARACTER(len=8) :: name(10)
CHARACTER(len=3) :: noel(atoms%ntype) CHARACTER(len=3) :: noel(atoms%ntype)
CHARACTER(len=12) :: relcor CHARACTER(len=12) :: relcor
CHARACTER(len=3) :: latnamTemp CHARACTER(len=3) :: latnamTemp
...@@ -146,7 +145,7 @@ ...@@ -146,7 +145,7 @@
noco%l_noco = noco%l_ss ; jij%l_J = .false. ; noco%soc_opt(:) = .false. ; input%jspins = 1 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 obsolete%lpr = 0 ; input%itmax = 9 ; input%maxiter = 99 ; input%imix = 7 ; input%alpha = 0.05
input%spinf = 2.0 ; obsolete%lepr = 0 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 input%isec1 = 99 ; nu = 5 ; vacuum%layerd = 1 ; iofile = 6
ALLOCATE(vacuum%izlay(vacuum%layerd,2)) ALLOCATE(vacuum%izlay(vacuum%layerd,2))
banddos%ndir = 0 ; vacuum%layers = 0 ; atoms%nflip(:) = 1 ; vacuum%izlay(:,:) = 0 banddos%ndir = 0 ; vacuum%layers = 0 ; atoms%nflip(:) = 1 ; vacuum%izlay(:,:) = 0
...@@ -187,7 +186,7 @@ ...@@ -187,7 +186,7 @@
input%delgau = input%tkb ; atoms%ntypd = atoms%ntype ; atoms%natd = atoms%nat input%delgau = input%tkb ; atoms%ntypd = atoms%ntype ; atoms%natd = atoms%nat
DO i = 1, 10 DO i = 1, 10
j = (i-1) * 8 + 1 j = (i-1) * 8 + 1
name(i) = title(j:j+7) input%comment(i) = title(j:j+7)
ENDDO ENDDO
IF (noco%l_noco) input%jspins = 2 IF (noco%l_noco) input%jspins = 2
...@@ -420,7 +419,7 @@ ...@@ -420,7 +419,7 @@
CALL w_inpXML(& CALL w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,div,l_gamma,& & 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,& & xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,.FALSE.,numSpecies,& & atomTypeSpecies,speciesRepAtomType,.FALSE.,numSpecies,&
& enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1)) & enpara%el0(:,:,1),enpara%ello0(:,:,1),enpara%evac0(:,1))
...@@ -447,7 +446,7 @@ ...@@ -447,7 +446,7 @@
CALL rw_inp(& CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,& & 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 iofile = 6
OPEN (iofile,file='inp',form='formatted',status='old',position='append') OPEN (iofile,file='inp',form='formatted',status='old',position='append')
...@@ -481,7 +480,7 @@ ...@@ -481,7 +480,7 @@
CALL rw_inp(& CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,& & ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
& cell,sym,xcpot,noco,jij,oneD,hybrid,kpts,& & 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 IF ( ALL(div /= 0) ) nkpt3 = div
WRITE (iofile,FMT=9999) product(nkpt3),nkpt3,l_gamma 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 MODULE m_rinpXML
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!
!!! The routine r_inpXML reads in the inp.xml file
!!!
!!! GM'16
!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS CONTAINS
SUBROUTINE r_inpXML(& SUBROUTINE r_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,dimension,& & atoms,obsolete,vacuum,input,stars,sliceplot,banddos,dimension,&
...@@ -89,7 +102,6 @@ SUBROUTINE r_inpXML(& ...@@ -89,7 +102,6 @@ SUBROUTINE r_inpXML(&
! .. ! ..
! .. Local Variables ! .. Local Variables
REAL :: scpos ,zc REAL :: scpos ,zc
INTEGER ::nw
INTEGER ieq,i,k,na,n,ii INTEGER ieq,i,k,na,n,ii
REAL s3,ah,a,hs2,rest REAL s3,ah,a,hs2,rest
LOGICAL l_hyb,l_sym,ldum LOGICAL l_hyb,l_sym,ldum
...@@ -280,7 +292,21 @@ SUBROUTINE r_inpXML(& ...@@ -280,7 +292,21 @@ SUBROUTINE r_inpXML(&
CALL ASSIGN_var(valueString,tempReal) CALL ASSIGN_var(valueString,tempReal)
END DO 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 !!! Start of calculationSetup section
...@@ -1609,10 +1635,9 @@ SUBROUTINE r_inpXML(& ...@@ -1609,10 +1635,9 @@ SUBROUTINE r_inpXML(&
CALL juDFT_error("vacdos is true but vacDOS parameters are not set!", calledby = "r_inpXML") CALL juDFT_error("vacdos is true but vacDOS parameters are not set!", calledby = "r_inpXML")
END IF END IF
vacuum%layerd = 1 vacuum%layers = 1
IF (numberNodes.EQ.1) THEN IF ((banddos%vacdos).AND.(numberNodes.EQ.1)) THEN
vacuum%layers = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@layers')) vacuum%layers = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@layers'))
vacuum%layerd = vacuum%layers
input%integ = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@integ')) input%integ = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@integ'))
vacuum%starcoeff = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@star')) vacuum%starcoeff = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@star'))
vacuum%nstars = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@nstars')) vacuum%nstars = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@nstars'))
...@@ -1623,6 +1648,7 @@ SUBROUTINE r_inpXML(& ...@@ -1623,6 +1648,7 @@ SUBROUTINE r_inpXML(&
vacuum%nstm = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@nstm')) vacuum%nstm = evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@nstm'))
vacuum%tworkf = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@tworkf')) vacuum%tworkf = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@tworkf'))
END IF END IF
vacuum%layerd = vacuum%layers
ALLOCATE(vacuum%izlay(vacuum%layerd,2)) ALLOCATE(vacuum%izlay(vacuum%layerd,2))
! Read in optional chargeDensitySlicing parameters ! Read in optional chargeDensitySlicing parameters
...@@ -1823,10 +1849,10 @@ SUBROUTINE r_inpXML(& ...@@ -1823,10 +1849,10 @@ SUBROUTINE r_inpXML(&
sumWeight = sumWeight + kpts%weight(i) sumWeight = sumWeight + kpts%weight(i)
kpts%bk(:,i) = kpts%bk(:,i) / kpts%posScale kpts%bk(:,i) = kpts%bk(:,i) / kpts%posScale
END DO END DO
kpts%posScale = 1.0
DO i = 1, kpts%nkpt DO i = 1, kpts%nkpt
kpts%weight(i) = kpts%weight(i) / sumWeight kpts%weight(i) = kpts%weight(i) / sumWeight
kpts%wtkpt(i) = kpts%weight(i) 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 END DO
! Generate missing general parameters ! Generate missing general parameters
...@@ -1843,7 +1869,6 @@ SUBROUTINE r_inpXML(& ...@@ -1843,7 +1869,6 @@ SUBROUTINE r_inpXML(&
kpts%nkptd = kpts%nkpt kpts%nkptd = kpts%nkpt
dimension%nvd = 0 ; dimension%nv2d = 0 dimension%nvd = 0 ; dimension%nv2d = 0
stars%kq1d = 0 ; stars%kq2d = 0 ; stars%kq3d = 0 stars%kq1d = 0 ; stars%kq2d = 0 ; stars%kq3d = 0
obsolete%nwd = obsolete%nwdd
obsolete%l_u2f = .FALSE. obsolete%l_u2f = .FALSE.
obsolete%l_f2u = .FALSE. obsolete%l_f2u = .FALSE.
!cell%aamat=matmul(transpose(cell%amat),cell%amat) !cell%aamat=matmul(transpose(cell%amat),cell%amat)
...@@ -2163,7 +2188,7 @@ SUBROUTINE r_inpXML(& ...@@ -2163,7 +2188,7 @@ SUBROUTINE r_inpXML(&
CALL prp_qfft(stars,cell,noco,input) CALL prp_qfft(stars,cell,noco,input)
IF (input%gw.GE.1) THEN 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%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%taual,atoms%zatom,cell%vol,1.0,DIMENSION%neigd,atoms%lmaxd,&
atoms%nlod,atoms%llod,atoms%nlo,atoms%llo,noco%l_soc) atoms%nlod,atoms%llod,atoms%nlo,atoms%llo,noco%l_soc)
......
...@@ -503,25 +503,22 @@ ...@@ -503,25 +503,22 @@
WRITE (6,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype),(hybrid%lcutwf(n),n=1,atoms%ntype) WRITE (6,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype),(hybrid%lcutwf(n),n=1,atoms%ntype)
6010 FORMAT (25i3) 6010 FORMAT (25i3)
! !
READ (UNIT=5,FMT=6010,END=99,ERR=99) obsolete%nwd,obsolete%lepr READ (UNIT=5,FMT=6010,END=99,ERR=99) nw,obsolete%lepr
WRITE (6,9140) obsolete%nwd,obsolete%lepr IF (nw.ne.1) CALL juDFT_error("Multiple window calculations not supported")
WRITE (6,9140) nw,obsolete%lepr
! !
zc=0.0 zc=0.0
DO nw=1,obsolete%nwd
READ (UNIT=5,FMT=*,END=99,ERR=99) READ (UNIT=5,FMT=*,END=99,ERR=99)
WRITE (6,'(a8,i2)') 'Window #',nw !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
READ (UNIT=5,FMT=6040,END=99,ERR=99)&
& input%ellow,input%elup,input%zelec
WRITE (6,9150) input%ellow,input%elup,input%zelec WRITE (6,9150) input%ellow,input%elup,input%zelec
6040 FORMAT (4f10.5) 6040 FORMAT (4f10.5)
zc = zc + input%zelec zc = zc + input%zelec
! !
READ (UNIT=5,FMT='(f10.5)',END=99,ERR=99) input%rkmax READ (UNIT=5,FMT='(f10.5)',END=99,ERR=99) input%rkmax
WRITE (6,FMT='(f10.5,1x,A)') input%rkmax, '=kmax' WRITE (6,FMT='(f10.5,1x,A)') input%rkmax, '=kmax'
ENDDO
!
READ (UNIT=5,FMT=8010,END=99,ERR=99) input%gauss,input%delgau,input%tria READ (UNIT=5,FMT=8010,END=99,ERR=99) input%gauss,input%delgau,input%tria
WRITE (6,9160) input%gauss,input%delgau,input%tria WRITE (6,9160) input%gauss,input%delgau,input%tria
8010 FORMAT (6x,l1,f10.5,5x,l1) 8010 FORMAT (6x,l1,f10.5,5x,l1)
...@@ -909,14 +906,11 @@ ...@@ -909,14 +906,11 @@
WRITE (5,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype) WRITE (5,FMT=chform) (atoms%lnonsph(n),n=1,atoms%ntype)
END IF END IF
9140 FORMAT (25i3) 9140 FORMAT (25i3)
WRITE (5,9140) obsolete%nwd,obsolete%lepr WRITE (5,9140) 1,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