Commit 3cd92b32 authored by Gregor Michalicek's avatar Gregor Michalicek

Corrected output of LO energy parameters in out.xml

parent e678568b
......@@ -121,6 +121,7 @@
ALLOCATE(atoms%lda_u(atoms%ntype))
ALLOCATE(atoms%bmu(atoms%ntype))
ALLOCATE(atoms%relax(3,atoms%ntype))
ALLOCATE(atoms%ulo_der(atoms%nlod,atoms%ntype))
ALLOCATE(noco%soc_opt(atoms%ntype+2))
atoms%nz(:) = NINT(atoms%zatom(:))
......@@ -129,6 +130,7 @@
ENDDO
atoms%rmt(:) = 999.9
atoms%pos(:,:) = matmul( cell%amat , atoms%taual(:,:) )
atoms%ulo_der = 0
ch_rw = 'w'
sym%namgrp= 'any '
banddos%dos = .false. ; input%secvar = .false.
......@@ -422,7 +424,7 @@
& 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))
& enpara)
IF(juDFT_was_argument("-explicit")) THEN
sumWeight = 0.0
......@@ -442,6 +444,7 @@
DEALLOCATE (enpara%el0,enpara%evac0,enpara%lchange,enpara%lchg_v)
DEALLOCATE (enpara%skiplo,enpara%ello0,enpara%llochg,enpara%enmix)
DEALLOCATE (atoms%ulo_der)
CALL rw_inp(&
& ch_rw,atoms,obsolete,vacuum,input,stars,sliceplot,banddos,&
......
......@@ -16,7 +16,7 @@ SUBROUTINE w_inpXML(&
& noel,namex,relcor,a1,a2,a3,scale,dtild_opt,name_opt,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,l_outFile,numSpecies,&
& el0,ello0,evac0)
& enpara)
USE m_types
USE m_juDFT_init
......@@ -42,13 +42,13 @@ SUBROUTINE w_inpXML(&
TYPE(t_sliceplot),INTENT(IN):: sliceplot
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_enpara),INTENT(IN) :: enpara
INTEGER, INTENT (IN) :: numSpecies
INTEGER, INTENT (IN) :: div(3)
INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype)
INTEGER, INTENT (IN) :: speciesRepAtomType(numSpecies)
LOGICAL, INTENT (IN) :: l_gamma, l_outFile
REAL, INTENT (IN) :: a1(3),a2(3),a3(3),scale
REAL, INTENT (IN) :: el0(0:3,atoms%ntype),ello0(atoms%nlod,atoms%ntype),evac0(2)
REAL, INTENT (IN) :: xmlCoreOccs(2,29,atoms%ntype)
INTEGER, INTENT (IN) :: xmlElectronStates(29,atoms%ntype)
LOGICAL, INTENT (IN) :: xmlPrintCoreStates(29,atoms%ntype)
......@@ -415,10 +415,11 @@ SUBROUTINE w_inpXML(&
320 FORMAT(' <atomicCutoffs lmax="',i0,'" lnonsphr="',i0,'"/>')
WRITE (fileNum,320) atoms%lmax(iAtomType),atoms%lnonsph(iAtomType)
IF (ALL((el0(0:3,iAtomType)-INT(el0(0:3,iAtomType))).LE.0.00000001)) THEN
IF (ALL((enpara%el0(0:3,iAtomType,1)-INT(enpara%el0(0:3,iAtomType,1))).LE.0.00000001)) THEN
! <energyParameters s="3" p="3" d="3" f="4"/>
321 FORMAT(' <energyParameters s="',i0,'" p="',i0,'" d="',i0,'" f="',i0,'"/>')
WRITE (fileNum,321) INT(el0(0,iAtomType)),INT(el0(1,iAtomType)),INT(el0(2,iAtomType)),INT(el0(3,iAtomType))
WRITE (fileNum,321) INT(enpara%el0(0,iAtomType,1)),INT(enpara%el0(1,iAtomType,1)),&
INT(enpara%el0(2,iAtomType,1)),INT(enpara%el0(3,iAtomType,1))
END IF
IF(ANY(xmlElectronStates(:,iAtomType).NE.noState_const)) THEN
......@@ -489,15 +490,14 @@ SUBROUTINE w_inpXML(&
DO ilo = 1, atoms%nlo(iAtomType)
! <lo type="HELO" l="0" n="4"/>
l = atoms%llo(ilo,iAtomType)
n = INT(ello0(ilo,iAtomType))
loType = 'HELO'
IF(l.LE.3) THEN
IF(n.LE.el0(l,iAtomType)) THEN
loType = 'SCLO'
END IF
n = INT(enpara%ello0(ilo,iAtomType,1))
loType = 'SCLO'
IF(n.LT.0) THEN
loType = 'HELO'
END IF
324 FORMAT(' <lo type="',a,'" l="',i0,'" n="',i0,'" eDeriv="0"/>')
WRITE (fileNum,324) TRIM(ADJUSTL(loType)), l, n
n = ABS(n)
324 FORMAT(' <lo type="',a,'" l="',i0,'" n="',i0,'" eDeriv="',i0,'"/>')
WRITE (fileNum,324) TRIM(ADJUSTL(loType)), l, n, atoms%ulo_der(ilo,iAtomType)
END DO
WRITE (fileNum,'(a)') ' </species>'
......
......@@ -131,7 +131,7 @@
& 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))
& enpara)
DEALLOCATE(noel,atomTypeSpecies,speciesRepAtomType)
DEALLOCATE(xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs)
END IF
......
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