Commit 4d59d82a authored by Gregor Michalicek's avatar Gregor Michalicek

Write out special k points to out.xml whenever there is a band structure calculation

parent 4e11f731
......@@ -215,13 +215,13 @@
IMPLICIT NONE
TYPE(t_kpts),INTENT (IN) :: kpts
LOGICAL, INTENT (IN) :: l_film
INTEGER, INTENT (IN) :: idsyst,idtype
REAL, INTENT (IN) :: bmat(3,3)
INTEGER, INTENT (OUT) :: nosyp
REAL, POINTER :: syp(:,:) ! actually intent out
CHARACTER(len=1), POINTER :: ssy(:)
TYPE(t_kpts),INTENT (INOUT) :: kpts
LOGICAL, INTENT (IN) :: l_film
INTEGER, INTENT (IN) :: idsyst,idtype
REAL, INTENT (IN) :: bmat(3,3)
INTEGER, INTENT (OUT) :: nosyp
REAL, POINTER :: syp(:,:) ! actually intent out
CHARACTER(len=1), POINTER :: ssy(:)
LOGICAL :: band_inp_file
INTEGER :: n
......@@ -245,6 +245,23 @@
READ(99,*,err = 110,END=110) ssy(n),syp(:,n)
ENDDO
CLOSE(99)
IF(nosyp.GE.2) THEN
kpts%numSpecialPoints = nosyp
IF (ALLOCATED(kpts%specialPoints)) THEN
DEALLOCATE (kpts%specialPoints)
END IF
IF (ALLOCATED(kpts%specialPointNames)) THEN
DEALLOCATE (kpts%specialPointNames)
END IF
ALLOCATE (kpts%specialPoints(3,kpts%numSpecialPoints))
ALLOCATE (kpts%specialPointNames(kpts%numSpecialPoints))
DO n = 1, kpts%numSpecialPoints
kpts%specialPointNames(n) = TRIM(ADJUSTL(ssy(n)))
kpts%specialPoints(:,n) = syp(:,n)
END DO
END IF
RETURN
110 WRITE(*,*) "Error reading band_inp file"
CALL juDFT_error("Bandstr1",calledby="bandstr1")
......@@ -438,6 +455,22 @@
ENDIF
END IF
IF(nosyp.GE.2) THEN
kpts%numSpecialPoints = nosyp
IF (ALLOCATED(kpts%specialPoints)) THEN
DEALLOCATE (kpts%specialPoints)
END IF
IF (ALLOCATED(kpts%specialPointNames)) THEN
DEALLOCATE (kpts%specialPointNames)
END IF
ALLOCATE (kpts%specialPoints(3,kpts%numSpecialPoints))
ALLOCATE (kpts%specialPointNames(kpts%numSpecialPoints))
DO n = 1, kpts%numSpecialPoints
kpts%specialPointNames(n) = TRIM(ADJUSTL(ssy(n)))
kpts%specialPoints(:,n) = syp(:,n)
END DO
END IF
IF (nosyp == -1) THEN
WRITE(*,*) 'l_film = ', l_film
WRITE(*,*) 'idsyst = ', idsyst
......
......@@ -249,9 +249,20 @@ SUBROUTINE w_inpXML(&
END DO
WRITE (fileNum,'(a)')(' </kPointList>')
ELSE IF(kpts%specificationType.EQ.1) THEN
IF (kpts%numSpecialPoints.GE.2) THEN
207 FORMAT(' <kPointCount count="',i0,'" gamma="',l1,'">')
WRITE (fileNum,207) kpts%nkpt,kptGamma
209 FORMAT(' <specialPoint name="',a,'">', f10.6,' ',f10.6,' ',f10.6,'</specialPoint>')
DO i = 1, kpts%numSpecialPoints
WRITE(fileNum,209) TRIM(ADJUSTL(kpts%specialPointNames(i))),&
kpts%specialPoints(1,i),kpts%specialPoints(2,i),kpts%specialPoints(3,i)
END DO
WRITE (fileNum,'(a)') ' </kPointCount>'
ELSE
! <kPointCount count="100" gamma="F"/>
208 FORMAT(' <kPointCount count="',i0,'" gamma="',l1,'"/>')
WRITE (fileNum,208) kpts%nkpt,kptGamma
208 FORMAT(' <kPointCount count="',i0,'" gamma="',l1,'"/>')
WRITE (fileNum,208) kpts%nkpt,kptGamma
END IF
ELSE !(kpts%specificationType.EQ.2)
! <kPointMesh nx="10" ny="10" nz="10" gamma="F"/>
210 FORMAT(' <kPointMesh nx="',i0,'" ny="',i0,'" nz="',i0,'" gamma="',l1,'"/>')
......
......@@ -166,7 +166,14 @@
ALLOCATE (results%force(3,atoms%ntype,DIMENSION%jspd))
ALLOCATE (results%force_old(3,atoms%ntype))
results%force(:,:,:) = 0.0
END IF
CALL postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
oneD,hybrid,jij,cell,banddos,sliceplot,xcpot,&
noco,dimension,enpara,sphhar,l_opti,noel,l_kpts,&
l_gga)
IF (mpi%irank.EQ.0) THEN
filename = ''
numSpecies = SIZE(speciesRepAtomType)
CALL w_inpXML(&
......@@ -181,11 +188,6 @@
DEALLOCATE(xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs)
END IF
CALL postprocessInput(mpi,input,sym,stars,atoms,vacuum,obsolete,kpts,&
oneD,hybrid,jij,cell,banddos,sliceplot,xcpot,&
noco,dimension,enpara,sphhar,l_opti,noel,l_kpts,&
l_gga)
DEALLOCATE(noel)
#ifdef CPP_MPI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment