Commit b5c85aae authored by Gregor Michalicek's avatar Gregor Michalicek

Fixed a few bugs related to film calculations with inp.xml

Also in this commit: Enabled reading in enpara in w_inpXML
iff it exists.

Note: With this fix the Cu film calculation can be started with
the inp.xml file. However, the results are not yet verified.
parent aca28d06
......@@ -41,6 +41,7 @@ SUBROUTINE r_inpXML(&
USE m_writegw
USE m_apwsdim
USE m_setlomap
USE m_enpara, ONLY : r_enpara
IMPLICIT NONE
......@@ -123,7 +124,7 @@ SUBROUTINE r_inpXML(&
REAL :: tauTemp(3,48)
REAL :: a1(3),a2(3),a3(3), bk(3)
LOGICAL :: flipSpin, l_eV, invSym, l_qfix, relaxX, relaxY, relaxZ, l_gga, l_kpts
LOGICAL :: l_vca, coreConfigPresent
LOGICAL :: l_vca, coreConfigPresent, l_enpara
REAL :: magMom, radius, logIncrement, qsc(3), latticeScale, dr
REAL :: aTemp, scale, zp, rmtmax, sumWeight, ldau_u, ldau_j, tempReal
REAL :: weightScale
......@@ -426,9 +427,6 @@ SUBROUTINE r_inpXML(&
valueString = TRIM(ADJUSTL(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA)))))
READ(valueString,*) kpts%bk(1,i), kpts%bk(2,i), kpts%bk(3,i)
kpts%weight(i) = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@weight'))
! kpts%bk(1,i) = kpts%bk(1,i) / kpts%posScale
! kpts%bk(2,i) = kpts%bk(2,i) / kpts%posScale
! kpts%bk(3,i) = kpts%bk(3,i) / kpts%posScale
kpts%weight(i) = kpts%weight(i) / weightScale
END DO
END IF
......@@ -685,7 +683,7 @@ SUBROUTINE r_inpXML(&
IF(input%film) THEN
cell%z1 = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@dVac'))
dtild = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@dTilda'))
vacuum%dvac = dtild
vacuum%dvac = cell%z1
a3(3) = dtild
WRITE(*,*) 'Ignoring vacuum energy parameters in inp.xml for the moment!'
END IF
......@@ -1813,6 +1811,18 @@ SUBROUTINE r_inpXML(&
cell%volint = cell%volint - atoms%volmts(iType)*atoms%neq(iType)
END DO
! Read in enpara file iff available
l_enpara = .FALSE.
INQUIRE (file ='enpara',exist= l_enpara)
IF (l_enpara) THEN
OPEN (40,file ='enpara',form='formatted',status='old')
DO jsp = 1,input%jspins
CALL r_enpara(atoms,input,jsp,enpara)
END DO !dimension%jspd
CLOSE (40)
END IF
! Dimensioning of lattice harmonics
WRITE(*,*) 'Post processing of input: dimensioning of lattice harmonics'
......
......@@ -512,7 +512,7 @@ SUBROUTINE w_inpXML(&
ENDDO
IF (.not.input%film) tempTaual(3,na) = tempTaual(3,na)*scpos
IF (input%film) THEN
tempTaual(3,na) = a3(3)*tempTaual(3,na)/scale
tempTaual(3,na) = dtild*tempTaual(3,na)/scale
END IF
!+odim in 1D case all the coordinates are given in cartesian YM
IF (oneD%odd%d1) THEN
......
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