LCOV - code coverage report
Current view: top level - io - w_inpXML.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 230 296 77.7 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             : MODULE m_winpXML
       8             : 
       9             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      10             : !!!
      11             : !!!   XML input file generator
      12             : !!!
      13             : !!!   This subroutine is supposed to write out a file inp.xml
      14             : !!!   containing all required input data.
      15             : !!!                                         GM'16
      16             : !!!
      17             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      18             : CONTAINS
      19          27 : SUBROUTINE w_inpXML(&
      20             : &                   atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
      21             : &                   cell,sym,xcpot,noco,oneD,hybrid,kpts,div,l_gamma,&
      22          27 : &                   noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt,&
      23          27 : &                   xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
      24          54 : &                   atomTypeSpecies,speciesRepAtomType,l_outFile,filename,&
      25             : &                   l_explicitIn,numSpecies,enpara)
      26             : 
      27             :    USE m_types
      28             :    USE m_juDFT
      29             :    USE m_constants
      30             :    USE m_xmlOutput
      31             : 
      32             :    IMPLICIT NONE
      33             : 
      34             : ! arguments
      35             : 
      36             :    TYPE(t_input),INTENT(IN)   :: input
      37             :    TYPE(t_sym),INTENT(IN)     :: sym
      38             :    TYPE(t_stars),INTENT(IN)   :: stars 
      39             :    TYPE(t_atoms),INTENT(IN)   :: atoms
      40             :    TYPE(t_vacuum),INTENT(IN)   :: vacuum
      41             :    TYPE(t_obsolete),INTENT(IN) :: obsolete
      42             :    TYPE(t_kpts),INTENT(IN)     :: kpts
      43             :    TYPE(t_oneD),INTENT(IN)     :: oneD
      44             :    TYPE(t_hybrid),INTENT(IN)   :: hybrid
      45             :    TYPE(t_cell),INTENT(IN)     :: cell
      46             :    TYPE(t_banddos),INTENT(IN)  :: banddos
      47             :    TYPE(t_sliceplot),INTENT(IN):: sliceplot
      48             :    CLASS(t_xcpot),INTENT(IN)   :: xcpot
      49             :    TYPE(t_noco),INTENT(IN)     :: noco
      50             :    TYPE(t_enpara),INTENT(IN)   :: enpara
      51             :    CLASS(t_forcetheo),INTENT(IN):: forcetheo !nothing is done here so far....
      52             :    INTEGER, INTENT (IN)        :: numSpecies
      53             :    INTEGER, INTENT (IN)        :: div(3)
      54             :    INTEGER, INTENT (IN)        :: atomTypeSpecies(atoms%ntype)
      55             :    INTEGER, INTENT (IN)        :: speciesRepAtomType(numSpecies)
      56             :    LOGICAL, INTENT (IN)        :: l_gamma, l_outFile, l_explicitIn
      57             :    REAL,    INTENT (IN)        :: a1(3),a2(3),a3(3)
      58             :    REAL, INTENT (IN)     :: xmlCoreOccs(2,29,atoms%ntype)
      59             :    INTEGER, INTENT (IN)  :: xmlElectronStates(29,atoms%ntype)
      60             :    LOGICAL, INTENT (IN)  :: xmlPrintCoreStates(29,atoms%ntype)
      61             :    CHARACTER(len=3),INTENT(IN) :: noel(atoms%ntype)
      62             :    CHARACTER(len=4),INTENT(IN) :: namex
      63             :    CHARACTER(len=12),INTENT(IN):: relcor
      64             :    CHARACTER(LEN=*),INTENT(IN) :: filename
      65             :    REAL,INTENT(IN),OPTIONAL    :: dtild_opt
      66             :    CHARACTER(len=8),INTENT(IN),OPTIONAL:: name_opt(10)
      67             : 
      68             : 
      69             :    INTEGER :: iSpecies, fileNum
      70             :    CHARACTER(len=8) :: name(10)
      71             : 
      72             : !+lda+u
      73             :    REAL    u,j
      74             :    INTEGER l, i_u
      75          54 :    INTEGER uIndices(2,atoms%ntype)
      76             :    LOGICAL l_amf
      77             :    CHARACTER(len=3) ch_test
      78             :    NAMELIST /ldaU/ l,u,j,l_amf
      79             : !-lda+u
      80             : !+odim
      81             :    INTEGER MM,vM,m_cyl
      82             :    LOGICAL invs1,zrfs1
      83             :    INTEGER chi,rot
      84             :    LOGICAL d1,band
      85             :    NAMELIST /odim/ d1,MM,vM,m_cyl,chi,rot,invs1,zrfs1
      86             : !-odim
      87             : ! ..
      88             : ! ..  Local Variables
      89             :    REAL     ::dtild, zc, sumWeight
      90             :    INTEGER  ::nw,idsprs, n1, n2
      91             :    INTEGER ieq,i,k,na,n,ilo
      92             :    REAL s3,ah,a,hs2,rest
      93             :    LOGICAL l_hyb,l_sym,ldum
      94             :    INTEGER :: ierr
      95             : ! ..
      96             : !...  Local Arrays
      97             :    CHARACTER :: helpchar(atoms%ntype)
      98             :    CHARACTER(len=  4) :: chntype
      99             :    CHARACTER(len= 41) :: chform
     100             :    CHARACTER(len=100) :: line
     101             : 
     102             : !     added for HF and hybrid functionals
     103             :    REAL                  ::  aMix,omega
     104             :    INTEGER               :: idum
     105             :    CHARACTER (len=1)     ::  check
     106             : 
     107             :    CHARACTER(len=20) :: speciesName
     108             :    CHARACTER(len=150) :: format
     109             :    CHARACTER(len=20) :: mixingScheme
     110             :    CHARACTER(len=10) :: loType
     111             :    CHARACTER(len=10) :: bzIntMode
     112             :    CHARACTER(len=200) :: symFilename
     113             :    LOGICAL :: kptGamma, l_relcor, l_explicit, l_nocoOpt
     114             :    INTEGER :: iAtomType, startCoreStates, endCoreStates
     115             :    CHARACTER(len=100) :: posString(3)
     116             :    CHARACTER(len=200) :: coreStatesString, valenceStatesString
     117          54 :    REAL :: tempTaual(3,atoms%nat), scpos(3)
     118             :    REAL :: a1Temp(3),a2Temp(3),a3Temp(3)
     119             :    REAL :: amatTemp(3,3), bmatTemp(3,3)
     120             : 
     121          27 :    IF (PRESENT(dtild_opt)) dtild=dtild_opt
     122          27 :    IF (PRESENT(name_opt)) name=name_opt
     123             : 
     124          27 :    l_explicit = l_explicitIn.OR.l_outFile
     125          27 :    l_nocoOpt = noco%l_noco.OR.juDFT_was_argument("-noco")
     126             : 
     127          27 :    symFilename = 'sym.out'
     128          27 :    kptGamma = l_gamma
     129          27 :    band = .false.
     130          27 :    nw=1
     131             :    IF (TRIM(ADJUSTL(namex)).EQ.'hf'.OR.TRIM(ADJUSTL(namex)).EQ.'exx'.OR.&
     132          27 :        TRIM(ADJUSTL(namex)).EQ.'hse'.OR.TRIM(ADJUSTL(namex)).EQ.'vhse') l_hyb = .true.
     133          27 :    l_relcor=.true.
     134          27 :    IF(relcor.EQ.'relativi') THEN
     135             :       l_relcor=.true.
     136             :    ELSE 
     137          27 :       l_relcor=.false.
     138             :    END IF
     139             : 
     140         108 :    DO i = 1, 3
     141          81 :       a1Temp(i) = a1(i)
     142          81 :       a2Temp(i) = a2(i)
     143         108 :       a3Temp(i) = a3(i)
     144             :    END DO
     145             : 
     146          27 :    fileNum = -1
     147          27 :    IF(l_outFile) THEN
     148          24 :       fileNum = getXMLOutputUnitNumber()
     149          24 :       CALL openXMLElementNoAttributes('inputData')
     150             :    ELSE
     151           3 :       fileNum = 5
     152           3 :       OPEN (fileNum,file=TRIM(ADJUSTL(filename)),form='formatted',status='unknown')
     153           3 :       REWIND (fileNum)
     154             : 
     155           3 :       WRITE (fileNum,'(a)') '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
     156           3 :       WRITE (fileNum,'(a)') '<fleurInput fleurInputVersion="0.30">'
     157             :    END IF
     158             : 
     159          27 :    IF(PRESENT(name_opt)) THEN
     160          27 :       WRITE (fileNum,'(a)') '   <comment>'
     161          27 :       WRITE (fileNum,'(a6,10a8)') '      ',name
     162          27 :       WRITE (fileNum,'(a)') '   </comment>'
     163             :    END IF
     164             : 
     165          27 :    WRITE (fileNum,'(a)') '   <calculationSetup>'
     166             : 
     167             : !      <cutoffs Kmax="3.60000" Gmax="11.000000" GmaxXC="9.200000" numbands="0"/>
     168             :    110 FORMAT('      <cutoffs Kmax="',f0.8,'" Gmax="',f0.8,'" GmaxXC="',f0.8,'" numbands="',i0,'"/>')
     169          27 :    WRITE (fileNum,110) input%rkmax,stars%gmaxInit,xcpot%gmaxxc,input%gw_neigd
     170             : 
     171             : !      <scfLoop itmax="9" maxIterBroyd="99" imix="Anderson" alpha="0.05" precondParam="0.0" spinf="2.00"/>
     172             :    120 FORMAT('      <scfLoop itmax="',i0,'" minDistance="',f0.8,'" maxIterBroyd="',i0,'" imix="',a,'" alpha="',f0.8,'" precondParam="',f3.1,'" spinf="',f0.8,'"/>')
     173          27 :    SELECT CASE (input%imix)
     174             :       CASE (1)
     175           0 :          mixingScheme='straight'
     176             :       CASE (3)
     177           0 :          mixingScheme='Broyden1'
     178             :       CASE (5)
     179           0 :          mixingScheme='Broyden2'
     180             :       CASE (7)
     181          27 :          mixingScheme='Anderson'
     182             :       CASE DEFAULT
     183          27 :          mixingScheme='errorUnknownMixing'
     184             :    END SELECT
     185          27 :    WRITE (fileNum,120) input%itmax,input%minDistance,input%maxiter,TRIM(mixingScheme),input%alpha,input%preconditioning_param,input%spinf
     186             : 
     187             : !      <coreElectrons ctail="T" frcor="F" kcrel="0"/>
     188             :    130 FORMAT('      <coreElectrons ctail="',l1,'" frcor="',l1,'" kcrel="',i0,'" coretail_lmax="',i0,'"/>')
     189          27 :    WRITE (fileNum,130) input%ctail,input%frcor,input%kcrel,input%coretail_lmax
     190             : 
     191             : !      <magnetism jspins="1" l_noco="F" l_J="F" swsp="F" lflip="F"/>
     192             :    140 FORMAT('      <magnetism jspins="',i0,'" l_noco="',l1,'" swsp="',l1,'" lflip="',l1,'"/>')
     193          27 :    WRITE (fileNum,140) input%jspins,noco%l_noco,input%swsp,input%lflip
     194             : 
     195             :    !      <soc theta="0.00000" phi="0.00000" l_soc="F" spav="F" off="F" soc66="F"/>
     196             :    150 FORMAT('      <soc theta="',f0.8,'" phi="',f0.8,'" l_soc="',l1,'" spav="',l1,'"/>')
     197          27 :    WRITE (fileNum,150) noco%theta,noco%phi,noco%l_soc,noco%l_spav
     198             : 
     199          27 :    IF (l_explicit.OR.hybrid%l_hybrid) THEN
     200             :       155 FORMAT('      <prodBasis gcutm="',f0.8,'" tolerance="',f0.8,'" ewaldlambda="',i0,'" lexp="',i0,'" bands="',i0,'"/>')
     201          26 :       WRITE (fileNum,155) hybrid%gcutm1,hybrid%tolerance1,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
     202             :    END IF
     203             : 
     204          27 :    IF (l_nocoOpt.OR.l_explicit) THEN
     205             : 160   FORMAT('      <nocoParams l_ss="',l1,'" l_mperp="',l1,'" l_constr="',l1,&
     206             :            '" mix_b="',f0.8,'">')
     207          26 :       WRITE (fileNum,160) noco%l_ss, noco%l_mperp, noco%l_constr, noco%mix_b
     208             :       162 FORMAT('         <qss>',f0.10,' ',f0.10,' ',f0.10,'</qss>')
     209          26 :       WRITE(fileNum,162) noco%qss(1), noco%qss(2), noco%qss(3)
     210          26 :       WRITE (fileNum,'(a)') '      </nocoParams>'
     211             :    END IF
     212             : 
     213          27 :    IF (oneD%odd%d1) THEN
     214             :       170 FORMAT('      <oneDParams d1="',l1,'" MM="',i0,'" vM="',i0,'" m_cyl="',i0,'" chi="',i0,'" rot="',i0,'" invs1="',l1,'" zrfs1="',l1,'"/>')
     215           0 :       WRITE (fileNum,170) oneD%odd%d1,oneD%odd%M,oneD%odd%mb,oneD%odd%m_cyl,oneD%odd%chi,oneD%odd%rot,oneD%odd%invs,oneD%odd%zrfs
     216             :    END IF
     217             : 
     218             : !      <expertModes gw="0"  eig66="F" lpr="0" secvar="F" />
     219             :    180 FORMAT('      <expertModes gw="',i0,'" secvar="',l1,'"/>')
     220          27 :    WRITE (fileNum,180) input%gw,input%secvar
     221             : 
     222             : !      <geometryOptimization l_f="F" xa="2.00000" thetad="330.00000" epsdisp="0.00001" epsforce="0.00001"/>
     223             :    190 FORMAT('      <geometryOptimization l_f="',l1,'" forcealpha="',f0.8,'" forcemix="',a,'" epsdisp="',f0.8,'" epsforce="',f0.8,'"/>')
     224          27 :    SELECT CASE (input%forcemix)
     225             :       CASE (0)
     226           0 :          mixingScheme='straight'
     227             :       CASE (1)
     228           0 :          mixingScheme='CG'
     229             :       CASE (2)
     230          27 :          mixingScheme='BFGS'
     231             :       CASE DEFAULT
     232          27 :          mixingScheme='errorUnknownMixing'
     233             :    END SELECT
     234          27 :    WRITE (fileNum,190) input%l_f,input%forcealpha,TRIM(mixingScheme),input%epsdisp,input%epsforce
     235             : 
     236          27 :    IF(input%gauss.AND.input%tria) THEN
     237           0 :       STOP 'Error: bz integration modes gauss AND tria selected!'
     238             :    END IF
     239             : 
     240          27 :    bzIntMode = 'hist'
     241          27 :    IF(input%gauss) THEN
     242           0 :       bzIntMode = 'gauss'
     243          27 :    ELSE IF(input%tria) THEN
     244           1 :       bzIntMode = 'tria'
     245             :    END IF
     246             : 
     247             : !      <ldaU l_linMix="F" mixParam="0.05" spinf="1.0" />
     248             :    195 FORMAT('      <ldaU l_linMix="',l1,'" mixParam="',f0.6,'" spinf="',f0.6,'"/>')
     249          27 :    WRITE (fileNum,195) input%ldauLinMix,input%ldauMixParam,input%ldauSpinf
     250             : 
     251             : !      <bzIntegration valenceElectrons="8.00000" mode="hist" fermiSmearingEnergy="0.00100">
     252             :    200 FORMAT('      <bzIntegration valenceElectrons="',f0.8,'" mode="',a,'" fermiSmearingEnergy="',f0.8,'">')
     253          27 :    WRITE (fileNum,200) input%zelec,TRIM(ADJUSTL(bzIntMode)),input%tkb
     254             : 
     255          27 :    IF(kpts%specificationType.EQ.3) THEN
     256           3 :       sumWeight = 0.0
     257         229 :       DO i = 1, kpts%nkpt
     258         229 :          sumWeight = sumWeight + kpts%wtkpt(i)
     259             :       END DO
     260             :       205 FORMAT('         <kPointList posScale="',f0.8,'" weightScale="',f0.8,'" count="',i0,'">')
     261           3 :       WRITE (fileNum,205) kpts%posScale, sumWeight, kpts%nkpt
     262         229 :       DO i = 1, kpts%nkpt
     263             :          206 FORMAT('            <kPoint weight="',f12.6,'">',f12.6,' ',f12.6,' ',f12.6,'</kPoint>')
     264         229 :          WRITE (fileNum,206) kpts%wtkpt(i), kpts%bk(1,i), kpts%bk(2,i), kpts%bk(3,i)
     265             :       END DO
     266           3 :       WRITE (fileNum,'(a)')('         </kPointList>')
     267          24 :    ELSE IF(kpts%specificationType.EQ.1) THEN
     268             : 
     269          18 :       IF (kpts%numSpecialPoints.GE.2) THEN
     270             :          207 FORMAT('         <kPointCount count="',i0,'" gamma="',l1,'">')
     271           1 :          WRITE (fileNum,207) kpts%nkpt,kptGamma
     272             :          209 FORMAT('            <specialPoint name="',a,'">', f10.6,' ',f10.6,' ',f10.6,'</specialPoint>')
     273           3 :          DO i = 1, kpts%numSpecialPoints
     274           2 :             WRITE(fileNum,209) TRIM(ADJUSTL(kpts%specialPointNames(i))),&
     275           5 :                                kpts%specialPoints(1,i),kpts%specialPoints(2,i),kpts%specialPoints(3,i)
     276             :          END DO
     277           1 :          WRITE (fileNum,'(a)') '         </kPointCount>'
     278             :       ELSE
     279             : !            <kPointCount count="100" gamma="F"/>
     280             :          208 FORMAT('         <kPointCount count="',i0,'" gamma="',l1,'"/>')
     281          17 :          WRITE (fileNum,208) kpts%nkpt,kptGamma
     282             :       END IF
     283             : 
     284           6 :    ELSE IF (kpts%specificationType.EQ.2) THEN
     285             : !            <kPointMesh nx="10" ny="10" nz="10" gamma="F"/>
     286             :       210 FORMAT('         <kPointMesh nx="',i0,'" ny="',i0,'" nz="',i0,'" gamma="',l1,'"/>')
     287           6 :       WRITE (fileNum,210) div(1),div(2),div(3),kptGamma
     288             :    ELSE !(kpts%specificationType.EQ.4)
     289             :       212 FORMAT('         <kPointDensity denX="',f0.6,'" denY="',f0.6,'" denZ="',f0.6,'" gamma="',l1,'"/>')
     290           0 :       WRITE (fileNum,212) kpts%kPointDensity(1),kpts%kPointDensity(2),kpts%kPointDensity(3),kptGamma
     291             :    END IF
     292             : 
     293          27 :    IF(input%numBandsKPoints.GT.0) THEN
     294           3 :       WRITE(fileNum,'(a)') '         <altKPointSet purpose="bands">'
     295           3 :       WRITE(fileNum,217) input%numBandsKPoints
     296           3 :       WRITE(fileNum,'(a)') '         </altKPointSet>'
     297             :       217 FORMAT('            <kPointCount count="',i6,'" gamma="F"/>')
     298             :    END IF
     299             : 
     300          27 :    IF(juDFT_was_argument("-gw")) THEN
     301           0 :       WRITE(fileNum,'(a)') '         <altKPointSet purpose="GW">'
     302           0 :       WRITE(fileNum,'(a)') '            <kPointListFile filename="kpts_gw"/>'
     303           0 :       WRITE(fileNum,'(a)') '         </altKPointSet>'
     304             :    END IF
     305             : 
     306          27 :    WRITE (fileNum,'(a)') '      </bzIntegration>'
     307             : 
     308             : !      <energyParameterLimits ellow="-2.00000" elup="2.00000"/>
     309             :    220 FORMAT('      <energyParameterLimits ellow="',f0.8,'" elup="',f0.8,'"/>')
     310          27 :    WRITE (fileNum,220) input%ellow,input%elup
     311             : 
     312          27 :    WRITE (fileNum,'(a)') '   </calculationSetup>'
     313          27 :    WRITE (fileNum,'(a)') '   <cell>'
     314             : 
     315          27 :    IF(sym%symSpecType.EQ.3) THEN
     316           2 :       WRITE(fileNum,'(a)') '      <symmetryOperations>'
     317          98 :       DO i = 1, sym%nop
     318          96 :       WRITE(fileNum,'(a)') '         <symOp>'
     319             :       224 FORMAT('            <row-1>',i0,' ',i0,' ',i0,' ',f0.10,'</row-1>')
     320          96 :       WRITE(fileNum,224) sym%mrot(1,1,i), sym%mrot(1,2,i), sym%mrot(1,3,i), sym%tau(1,i)
     321             :       225 FORMAT('            <row-2>',i0,' ',i0,' ',i0,' ',f0.10,'</row-2>')
     322          96 :       WRITE(fileNum,225) sym%mrot(2,1,i), sym%mrot(2,2,i), sym%mrot(2,3,i), sym%tau(2,i)
     323             :       226 FORMAT('            <row-3>',i0,' ',i0,' ',i0,' ',f0.10,'</row-3>')
     324          96 :       WRITE(fileNum,226) sym%mrot(3,1,i), sym%mrot(3,2,i), sym%mrot(3,3,i), sym%tau(3,i)
     325          98 :       WRITE(fileNum,'(a)') '         </symOp>'
     326             :       END DO
     327           2 :       WRITE(fileNum,'(a)') '      </symmetryOperations>'
     328          25 :    ELSE IF(sym%symSpecType.EQ.1) THEN
     329             :       228 FORMAT('      <symmetryFile filename="',a,'"/>')
     330          21 :       WRITE(fileNum,228) TRIM(ADJUSTL(symFilename))
     331             :    ELSE !(sym%symSpecType.EQ.2)
     332             : !      <symmetry spgrp="any" invs="T" zrfs="F"/>
     333             :       230 FORMAT('      <symmetry spgrp="',a,'" invs="',l1,'" zrfs="',l1,'"/>')
     334           4 :       WRITE (fileNum,230) TRIM(ADJUSTL(sym%namgrp)),sym%invs,sym%zrfs
     335             : 
     336             :    END IF
     337             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     338             : !!! Note: Different options for the cell definition!
     339             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     340             : 
     341          27 :    IF (cell%latnam.EQ.'c-b') THEN
     342           0 :       a1Temp(1) = sqrt(2.)* a1Temp(1)
     343             :    END IF
     344          27 :    IF (cell%latnam.EQ.'hex') THEN
     345           2 :       s3 = sqrt(3.)
     346           2 :       a1Temp(1) = 2*a1Temp(1)/sqrt(3.)
     347             :    END IF
     348          27 :    IF (cell%latnam.EQ.'hx3') THEN
     349           4 :       a1Temp(1) = 2*a1Temp(1)
     350             :    END IF
     351             : 
     352          27 :    IF (input%film) THEN
     353             : !      <xsd:attribute name="dVac" type="xsd:double" use="required"/>
     354             : !      <xsd:attribute name="dTilda" type="xsd:double" use="required"/>
     355             : !      <filmLattice ...>
     356             :       241 FORMAT('      <filmLattice scale="',f0.8,'" latnam="',a,'" dVac="',f0.8,'" dTilda="',f0.8,'">')
     357           6 :       WRITE(fileNum,241) input%scaleCell, TRIM(ADJUSTL(cell%latnam)), vacuum%dvac, dtild
     358           6 :       IF (cell%latnam.EQ.'any') THEN
     359           0 :          WRITE (fileNum,'(a)') '         <bravaisMatrix>'
     360             :          255 FORMAT('            <row-1>',f0.15,' ',f0.15,' ',f0.15,'</row-1>')
     361           0 :          WRITE (fileNum,255) a1Temp(1),a1Temp(2),a1Temp(3)
     362             :          265 FORMAT('            <row-2>',f0.15,' ',f0.15,' ',f0.15,'</row-2>')
     363           0 :          WRITE (fileNum,265) a2Temp(1),a2Temp(2),a2Temp(3)
     364             :          275 FORMAT('            <row-3>',f0.15,' ',f0.15,' ',f0.15,'</row-3>')
     365           0 :          WRITE (fileNum,275) a3Temp(1),a3Temp(2),a3Temp(3)
     366           0 :          WRITE (fileNum,'(a)') '         </bravaisMatrix>'
     367             :       ELSE
     368             :          IF ((cell%latnam.EQ.'squ').OR.(cell%latnam.EQ.'hex').OR.&
     369             :      &       (cell%latnam.EQ.'c-b').OR.(cell%latnam.EQ.'hx3').OR.&
     370           6 :      &       (cell%latnam.EQ.'c-r').OR.(cell%latnam.EQ.'p-r')) THEN
     371             :             256 FORMAT('         <a1 scale="',f0.10,'">',f0.10,'</a1>')
     372           6 :             WRITE (fileNum,256) input%scaleA1, a1Temp(1) / input%scaleA1
     373             :          END IF
     374           6 :          IF ((cell%latnam.EQ.'c-r').OR.(cell%latnam.EQ.'p-r')) THEN
     375             :             266 FORMAT('         <a2 scale="',f0.10,'">',f0.10,'</a2>')
     376           0 :             WRITE (fileNum,266) input%scaleA2, a2Temp(2) / input%scaleA2
     377             :          END IF
     378             : 
     379           6 :          IF (cell%latnam.EQ.'obl') THEN
     380             :             257 FORMAT('         <row-1>',f0.10,' ',f0.10,'</row-1>')
     381           0 :             WRITE (fileNum,257) a1Temp(1), a1Temp(2)
     382             :             267 FORMAT('         <row-2>',f0.10,' ',f0.10,'</row-2>')
     383           0 :             WRITE (fileNum,267) a2Temp(1), a2Temp(2)
     384             :          END IF
     385             :       END IF
     386             : 
     387             :       268 FORMAT('         <vacuumEnergyParameters vacuum="',i0,'" spinUp="',f0.8,'" spinDown="',f0.8,'"/>')
     388          12 :       DO i = 1, vacuum%nvac
     389          12 :          WRITE(fileNum,268) i, enpara%evac0(i,1), enpara%evac0(i,input%jspins)
     390             :       END DO
     391             : 
     392           6 :       WRITE (fileNum,'(a)') '      </filmLattice>'
     393             :    ELSE
     394             : 
     395             :       242 FORMAT('      <bulkLattice scale="',f0.10,'" latnam="',a,'">')
     396          21 :       WRITE (fileNum,242) input%scaleCell, TRIM(ADJUSTL(cell%latnam))
     397             : 
     398          21 :       IF (cell%latnam.EQ.'any') THEN
     399             : 
     400             : !         <bravaisMatrix>
     401           8 :          WRITE (fileNum,'(a)') '         <bravaisMatrix>'
     402             : 
     403             : !            <row-1>0.00000 5.13000 5.13000</row-1>
     404             :          250 FORMAT('            <row-1>',f0.15,' ',f0.15,' ',f0.15,'</row-1>')
     405           8 :          WRITE (fileNum,250) a1Temp(1),a1Temp(2),a1Temp(3)
     406             : !            <row-2>5.13000 0.00000 5.13000</row-2>
     407             :          260 FORMAT('            <row-2>',f0.15,' ',f0.15,' ',f0.15,'</row-2>')
     408           8 :          WRITE (fileNum,260) a2Temp(1),a2Temp(2),a2Temp(3)
     409             : !            <row-3>5.13000 5.13000 0.00000</row-3>
     410             :          270 FORMAT('            <row-3>',f0.15,' ',f0.15,' ',f0.15,'</row-3>')
     411           8 :          WRITE (fileNum,270) a3Temp(1),a3Temp(2),a3Temp(3)
     412             : 
     413           8 :          WRITE (fileNum,'(a)') '         </bravaisMatrix>'
     414             :       END IF
     415             : 
     416             :       IF ((cell%latnam.EQ.'squ').OR.(cell%latnam.EQ.'hex').OR.&
     417             :      &    (cell%latnam.EQ.'c-b').OR.(cell%latnam.EQ.'hx3').OR.&
     418          21 :      &    (cell%latnam.EQ.'c-r').OR.(cell%latnam.EQ.'p-r')) THEN
     419             :          252 FORMAT('         <a1 scale="',f0.10,'">',f0.10,'</a1>')
     420          13 :          WRITE (fileNum,252) input%scaleA1, a1Temp(1) / input%scaleA1
     421             : 
     422          13 :          IF ((cell%latnam.EQ.'c-r').OR.(cell%latnam.EQ.'p-r')) THEN
     423             :             262 FORMAT('         <a2 scale="',f0.10,'">',f0.10,'</a2>')
     424           0 :             WRITE (fileNum,262) input%scaleA2, a2Temp(2) / input%scaleA2
     425             :          END IF
     426             : 
     427             :          272 FORMAT('         <c scale="',f0.10,'">',f0.10,'</c>')
     428          13 :          WRITE (fileNum,272) input%scaleC, a3Temp(3) / input%scaleC
     429             :       END IF
     430             : 
     431          21 :       IF (cell%latnam.EQ.'obl') THEN
     432             :          254 FORMAT('         <row-1>',f0.10,' ',f0.10,'</row-1>')
     433           0 :          WRITE (fileNum,254) a1Temp(1), a1Temp(2)
     434             : 
     435             :          264 FORMAT('         <row-2>',f0.10,' ',f0.10,'</row-2>')
     436           0 :          WRITE (fileNum,264) a2Temp(1), a2Temp(2)
     437             : 
     438             :          274 FORMAT('         <c scale="',f0.10,'">',f0.10,'</c>')
     439           0 :          WRITE (fileNum,274) input%scaleC, a3Temp(3) / input%scaleC
     440             :       END IF
     441             : 
     442          21 :       WRITE (fileNum,'(a)') '      </bulkLattice>'
     443             :    END IF
     444          27 :    WRITE (fileNum,'(a)') '   </cell>'
     445             : 
     446             : !   <xcFunctional name="pbe" relativisticCorrections="F">
     447             :    280 FORMAT('   <xcFunctional name="',a,'" relativisticCorrections="',l1,'"/>')
     448          27 :    WRITE (fileNum,280) TRIM(namex), l_relcor
     449             : 
     450             : 
     451          85 :    uIndices = -1
     452          39 :    DO i_u = 1, atoms%n_u
     453          12 :       IF(uIndices(1,atoms%lda_u(i_u)%atomType).EQ.-1) uIndices(1,atoms%lda_u(i_u)%atomType) = i_u
     454          39 :       uIndices(2,atoms%lda_u(i_u)%atomType) = i_u
     455             :    END DO
     456             : 
     457          27 :    WRITE (fileNum,'(a)') '   <atomSpecies>'
     458          63 :    DO iSpecies=1, numSpecies
     459          36 :       iAtomType = speciesRepAtomType(iSpecies)
     460          36 :       IF(iAtomType.EQ.-1) THEN
     461             :          EXIT
     462             :       END IF
     463             : !      <species name="Si-1" element="Si" atomicNumber="14" coreStates="4" magMom="0.0" flipSpin="F">
     464             :       300 FORMAT('      <species name="',a,'" element="',a,'" atomicNumber="',i0,'" coreStates="',i0,'" magMom="',f0.8,'" flipSpin="',l1,'">')
     465          36 :       speciesName = TRIM(ADJUSTL(atoms%speciesName(iSpecies)))
     466          36 :       WRITE (fileNum,300) TRIM(ADJUSTL(speciesName)),TRIM(ADJUSTL(noel(iAtomType))),atoms%nz(iAtomType),atoms%ncst(iAtomType),atoms%bmu(iAtomType),atoms%nflip(iAtomType)
     467             : 
     468             : !         <mtSphere radius="2.160000" gridPoints="521" logIncrement="0.022000"/>
     469             :       310 FORMAT('         <mtSphere radius="',f0.8,'" gridPoints="',i0,'" logIncrement="',f0.8,'"/>')
     470          36 :       WRITE (fileNum,310) atoms%rmt(iAtomType),atoms%jri(iAtomType),atoms%dx(iAtomType)
     471             : 
     472             : !         <atomicCutoffs lmax="8" lnonsphr="6"/>
     473             :       320 FORMAT('         <atomicCutoffs lmax="',i0,'" lnonsphr="',i0,'"/>')
     474          36 :       WRITE (fileNum,320) atoms%lmax(iAtomType),atoms%lnonsph(iAtomType)
     475             : 
     476          36 :       IF (ALL(enpara%qn_el(0:3,iAtomType,1).ne.0)) THEN
     477             : !         <energyParameters s="3" p="3" d="3" f="4"/>
     478             :          321 FORMAT('         <energyParameters s="',i0,'" p="',i0,'" d="',i0,'" f="',i0,'"/>')
     479          26 :          WRITE (fileNum,321) enpara%qn_el(0:3,iAtomType,1)
     480             :       END IF
     481             : 
     482          36 :       IF(l_explicit.OR.hybrid%l_hybrid) THEN
     483             :          315 FORMAT('         <prodBasis lcutm="',i0,'" lcutwf="',i0,'" select="',a,'"/>')
     484          35 :          line = ''
     485          35 :          WRITE(line,'(i0,1x,i0,1x,i0,1x,i0)') hybrid%select1(1:4,iAtomType)
     486          35 :          WRITE (fileNum,315) hybrid%lcutm1(iAtomType), hybrid%lcutwf(iAtomType), TRIM(ADJUSTL(line))
     487             :       END IF
     488             : 
     489          36 :       IF(ANY(xmlElectronStates(:,iAtomType).NE.noState_const)) THEN
     490           0 :          endCoreStates = 1
     491           0 :          startCoreStates = 1
     492           0 :          coreStatesString = ''
     493           0 :          valenceStatesString = ''
     494           0 :          DO i = 1, 29
     495           0 :             IF (xmlElectronStates(i,iAtomType).EQ.coreState_const) endCoreStates = i
     496             :          END DO
     497             :          IF ((endCoreStates.GE.24).AND.&
     498           0 : &            (ALL(xmlPrintCoreStates(1:24,iAtomType).EQV..FALSE.)).AND.&
     499             : &            (ALL(xmlElectronStates(1:24,iAtomType).EQ.coreState_const)) ) THEN
     500           0 :             coreStatesString = nobleGasConfigList_const(6)
     501           0 :             startCoreStates = 25
     502             :          ELSE IF ((endCoreStates.GE.17).AND.&
     503           0 : &                 (ALL(xmlPrintCoreStates(1:17,iAtomType).EQV..FALSE.)).AND.&
     504             : &                 (ALL(xmlElectronStates(1:17,iAtomType).EQ.coreState_const))) THEN
     505           0 :             coreStatesString = nobleGasConfigList_const(5)
     506           0 :             startCoreStates = 18
     507             :          ELSE IF ((endCoreStates.GE.12).AND.&
     508           0 : &                 (ALL(xmlPrintCoreStates(1:12,iAtomType).EQV..FALSE.)).AND.&
     509             : &                 (ALL(xmlElectronStates(1:12,iAtomType).EQ.coreState_const))) THEN
     510           0 :             coreStatesString = nobleGasConfigList_const(4)
     511           0 :             startCoreStates = 13
     512             :          ELSE IF ((endCoreStates.GE.7).AND.&
     513           0 : &                 (ALL(xmlPrintCoreStates(1:7,iAtomType).EQV..FALSE.)).AND.&
     514             : &                 (ALL(xmlElectronStates(1:7,iAtomType).EQ.coreState_const))) THEN
     515           0 :             coreStatesString = nobleGasConfigList_const(3)
     516           0 :             startCoreStates = 8
     517             :          ELSE IF ((endCoreStates.GE.4).AND.&
     518           0 : &                 (ALL(xmlPrintCoreStates(1:4,iAtomType).EQV..FALSE.)).AND.&
     519             : &                 (ALL(xmlElectronStates(1:4,iAtomType).EQ.coreState_const))) THEN
     520           0 :             coreStatesString = nobleGasConfigList_const(2)
     521           0 :             startCoreStates = 5
     522             :          ELSE IF ((endCoreStates.GE.1).AND.&
     523           0 : &                 (ALL(xmlPrintCoreStates(1:1,iAtomType).EQV..FALSE.)).AND.&
     524             : &                 (ALL(xmlElectronStates(1:1,iAtomType).EQ.coreState_const))) THEN
     525           0 :             coreStatesString = nobleGasConfigList_const(1)
     526           0 :             startCoreStates = 2
     527             :          END IF
     528           0 :          DO i = startCoreStates, endCoreStates
     529           0 :             IF(xmlElectronStates(i,iAtomType).EQ.coreState_const) THEN
     530           0 :                coreStatesString = TRIM(ADJUSTL(coreStatesString)) // ' ' // coreStateList_const(i)
     531             :             END IF
     532             :          END DO
     533           0 :          DO i = 1, 29
     534           0 :             IF(xmlElectronStates(i,iAtomType).EQ.valenceState_const) THEN
     535           0 :                valenceStatesString = TRIM(ADJUSTL(valenceStatesString)) // ' ' // coreStateList_const(i)
     536             :             END IF
     537             :          END DO
     538           0 :          WRITE (fileNum,'(a)') '         <electronConfig>'
     539             : !         <coreConfig>[He] (2s1/2) (2p1/2) (2p3/2)</coreConfig>
     540             :          322 FORMAT('            <coreConfig>',a,'</coreConfig>')
     541           0 :          WRITE(fileNum,322) TRIM(ADJUSTL(coreStatesString))
     542             :          323 FORMAT('            <valenceConfig>',a,'</valenceConfig>')
     543           0 :          WRITE(fileNum,323) TRIM(ADJUSTL(valenceStatesString))
     544           0 :          DO i = startCoreStates, 29
     545           0 :             IF ((xmlElectronStates(i,iAtomType).NE.noState_const).AND.(xmlPrintCoreStates(i,iAtomType))) THEN
     546             : !         <coreStateOccupation state="(2s1/2)" spinUp="1.0" spinDown="1.0"/>
     547             :                325 FORMAT('            <stateOccupation state="',a,'" spinUp="',f0.8,'" spinDown="',f0.8,'"/>')
     548           0 :                WRITE(fileNum,325) coreStateList_const(i), xmlCoreOccs(1,i,iAtomType), xmlCoreOccs(2,i,iAtomType)
     549             :             END IF
     550             :          END DO
     551           0 :          WRITE (fileNum,'(a)') '         </electronConfig>'
     552             :       END IF
     553             : 
     554          36 :       IF (uIndices(1,iAtomType).NE.-1) THEN
     555             : !         <ldaU l="2" U="5.5" J="0.9" l_amf="F"/>
     556          18 :          DO i_u = uIndices(1,iAtomType), uIndices(2,iAtomType)
     557             :             326 FORMAT('         <ldaU l="',i0,'" U="',f0.5,'" J="',f0.5,'" l_amf="',l1,'"/>')
     558          18 :             WRITE (fileNum,326) atoms%lda_u(i_u)%l, atoms%lda_u(i_u)%u, atoms%lda_u(i_u)%j, atoms%lda_u(i_u)%l_amf
     559             :          END DO
     560             :       END IF
     561             : 
     562          45 :       DO ilo = 1, atoms%nlo(iAtomType)
     563             : !         <lo type="HELO" l="0" n="4"/>
     564           9 :          l = atoms%llo(ilo,iAtomType)
     565           9 :          n = enpara%qn_ello(ilo,iAtomType,1)
     566           9 :          loType = 'SCLO'
     567           9 :          IF(n.LT.0) THEN
     568           0 :             loType = 'HELO'
     569             :          END IF
     570           9 :          n = ABS(n)
     571             :          324 FORMAT('         <lo type="',a,'" l="',i0,'" n="',i0,'" eDeriv="',i0,'"/>')
     572          45 :          WRITE (fileNum,324) TRIM(ADJUSTL(loType)), l, n, atoms%ulo_der(ilo,iAtomType)
     573             :       END DO
     574             : 
     575          63 :       WRITE (fileNum,'(a)') '      </species>'
     576             :    END DO
     577          27 :    WRITE (fileNum,'(a)') '   </atomSpecies>'
     578          27 :    WRITE (fileNum,'(a)') '   <atomGroups>'
     579          27 :    na = 0
     580          85 :    DO iAtomType=1, atoms%ntype
     581          58 :       iSpecies = atomTypeSpecies(iAtomType)
     582             : !      <atomGroup species="Si-1">
     583             :       330 FORMAT('      <atomGroup species="',a,'">')
     584          58 :       speciesName = TRIM(ADJUSTL(atoms%speciesName(iSpecies)))
     585          58 :       WRITE (fileNum,330) TRIM(ADJUSTL(speciesName))
     586             : 
     587         138 :       DO ieq=1,atoms%neq(iAtomType)
     588          80 :          na = na + 1
     589          80 :          tempTaual(1,na) = atoms%taual(1,na)
     590          80 :          tempTaual(2,na) = atoms%taual(2,na)
     591          80 :          tempTaual(3,na) = atoms%taual(3,na)
     592         320 :          scpos = 1.0
     593        3200 :          DO i = 2,40
     594        3120 :             rest = ABS(i*tempTaual(1,na) - NINT(i*tempTaual(1,na)))
     595        3120 :             IF ((scpos(1).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(1) = real(i)
     596        3120 :             rest = ABS(i*tempTaual(2,na) - NINT(i*tempTaual(2,na)))
     597        3120 :             IF ((scpos(2).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(2) = real(i)
     598        3200 :             IF (.not.input%film) THEN
     599        2106 :                rest = ABS(i*tempTaual(3,na) - NINT(i*tempTaual(3,na)) )
     600        2106 :                IF ((scpos(3).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(3) = real(i)
     601             :             END IF
     602             :          END DO
     603         240 :          DO i = 1,2
     604         240 :             tempTaual(i,na) = tempTaual(i,na)*scpos(i)
     605             :          END DO
     606          80 :          IF (.not.input%film) tempTaual(3,na) = tempTaual(3,na)*scpos(3)
     607          80 :          IF (input%film) THEN
     608          26 :             tempTaual(3,na) = dtild*tempTaual(3,na)/input%scaleCell
     609             :          END IF
     610             : !+odim in 1D case all the coordinates are given in cartesian YM
     611          80 :          IF (oneD%odd%d1) THEN
     612           0 :             tempTaual(1,na) = tempTaual(1,na)*a1(1)
     613           0 :             tempTaual(2,na) = tempTaual(2,na)*a2(2)
     614             :          END IF
     615             : !-odim
     616         138 :          IF (oneD%odd%d1) THEN
     617           0 :             STOP '1D position output not implemented!'
     618          80 :          ELSE IF (input%film) THEN
     619             : !         <filmPos> x/myConstant  y/myConstant  1/myConstant</filmPos>
     620             :             340 FORMAT('         <filmPos label="',a20,'">',a,' ',a,' ',a,'</filmPos>')
     621         104 :             posString(:) = ''
     622          78 :             DO i = 1, 2
     623          78 :                IF((scpos(i).NE.1.0).AND.(tempTaual(i,na).NE.0.0)) THEN
     624          32 :                   WRITE(posString(i),'(f0.3,a1,f0.3)') tempTaual(i,na), '/', scpos(i)
     625             :                ELSE
     626          20 :                   WRITE(posString(i),'(f0.10)') tempTaual(i,na)
     627             :                END IF
     628             :             END DO
     629          26 :             WRITE(posString(3),'(f0.10)') tempTaual(3,na)
     630          26 :             WRITE (fileNum,340) TRIM(ADJUSTL(atoms%label(na))), &
     631          52 :                                 TRIM(ADJUSTL(posString(1))),TRIM(ADJUSTL(posString(2))),TRIM(ADJUSTL(posString(3)))
     632             :          ELSE
     633             : !         <relPos> x/myConstant  y/myConstant  z/myConstant</relPos>
     634             :             350 FORMAT('         <relPos label="',a20,'">',a,' ',a,' ',a,'</relPos>')
     635         216 :             posString(:) = ''
     636         216 :             DO i = 1, 3
     637         216 :                IF((scpos(i).NE.1.0).AND.(tempTaual(i,na).NE.0.0)) THEN
     638          90 :                   WRITE(posString(i),'(f0.3,a1,f0.3)') tempTaual(i,na), '/', scpos(i)
     639             :                ELSE
     640          72 :                   WRITE(posString(i),'(f0.10)') tempTaual(i,na)
     641             :                END IF
     642             :             END DO
     643          54 :             WRITE (fileNum,350) TRIM(ADJUSTL(atoms%label(na))), &
     644         108 :                                 TRIM(ADJUSTL(posString(1))),TRIM(ADJUSTL(posString(2))),TRIM(ADJUSTL(posString(3)))
     645             :          END IF
     646             :       END DO
     647             : !         <force calculate="F" relaxX="T" relaxY="T" relaxZ="T"/>
     648             :       360 FORMAT('         <force calculate="',l1,'" relaxXYZ="',3l1,'"/>')
     649          58 :       WRITE (fileNum,360) atoms%l_geo(iAtomType),atoms%relax(1,iAtomType),atoms%relax(2,iAtomType),atoms%relax(3,iAtomType)
     650             : 
     651          58 :       IF(l_nocoOpt.OR.l_explicit) THEN
     652             :          362 FORMAT('         <nocoParams l_relax="',l1,'" alpha="',f0.8,'" beta="',&
     653             :                     f0.8,'" b_cons_x="',f0.8,'" b_cons_y="',f0.8,'"/>')
     654          57 :          WRITE(fileNum,362) noco%l_relax(iAtomType), noco%alphInit(iAtomType),&
     655         114 :                             noco%beta(iAtomType),noco%b_con(1,iAtomType),noco%b_con(2,iAtomType)
     656             :       END IF
     657             : 
     658             : 
     659          85 :       WRITE (fileNum,'(a)') '      </atomGroup>'
     660             :    END DO
     661          27 :    WRITE (fileNum,'(a)') '   </atomGroups>'
     662             : 
     663             :    368 FORMAT('   <output dos="',l1,'" band="',l1,'" vacdos="',l1,'" slice="',l1,'" mcd="',l1,'">')
     664          27 :    WRITE (fileNum,368) banddos%dos,band,banddos%vacdos,sliceplot%slice,banddos%l_mcd
     665             : 
     666             : !      <checks vchk="F" cdinf="F" disp="F"/>
     667             :    370 FORMAT('      <checks vchk="',l1,'" cdinf="',l1,'"/>')
     668          27 :    WRITE (fileNum,370) input%vchk,input%cdinf
     669             : 
     670             : !      <densityOfStates ndir="0" minEnergy="-0.50000" maxEnergy="0.50000" sigma="0.01500"/>  
     671             :    380 FORMAT('      <densityOfStates ndir="',i0,'" minEnergy="',f0.8,'" maxEnergy="',f0.8,'" sigma="',f0.8,'"/>')
     672          27 :    WRITE (fileNum,380) banddos%ndir,banddos%e2_dos,banddos%e1_dos,banddos%sig_dos
     673             : 
     674             : !      <vacuumDOS layers="0" integ="F" star="F" nstars="0" locx1="0.00" locy1="0.00" locx2="0.00" locy2="0.00" nstm="0" tworkf="0.000000"/>
     675             :    390 FORMAT('      <vacuumDOS layers="',i0,'" integ="',l1,'" star="',l1,'" nstars="',i0,'" locx1="',f0.5,'" locy1="',f0.5,'" locx2="',f0.5,'" locy2="',f0.5,'" nstm="',i0,'" tworkf="',f0.5,'"/>')
     676          27 :    WRITE (fileNum,390) vacuum%layers,input%integ,vacuum%starcoeff,vacuum%nstars,vacuum%locx(1),vacuum%locy(1),vacuum%locx(2),vacuum%locy(2),vacuum%nstm,vacuum%tworkf
     677             : 
     678             : !      <unfoldingBand unfoldBand="F" supercellX="1" supercellY="1" supercellZ="1"/>
     679             :    395 FORMAT('      <unfoldingBand unfoldBand="',l1,'" supercellX="',i0,'" supercellY="',i0,'" supercellZ="',i0,'"/>')
     680          27 :    WRITE (fileNum,395) banddos%unfoldband, banddos%s_cell_x, banddos%s_cell_y, banddos%s_cell_z
     681             : 
     682             : !      <plotting iplot="F" score="F" plplot="F"/>
     683             :    400 FORMAT('      <plotting iplot="',l1,'" score="',l1,'" plplot="',l1,'"/>')
     684          27 :    WRITE (fileNum,400) sliceplot%iplot,input%score,sliceplot%plpot
     685             : 
     686             : !      <chargeDensitySlicing numkpt="0" minEigenval="0.000000" maxEigenval="0.000000" nnne="0" pallst="F"/>
     687             :    410 FORMAT('      <chargeDensitySlicing numkpt="',i0,'" minEigenval="',f0.8,'" maxEigenval="',f0.8,'" nnne="',i0,'" pallst="',l1,'"/>')
     688          27 :    WRITE (fileNum,410) sliceplot%kk,sliceplot%e1s,sliceplot%e2s,sliceplot%nnne,input%pallst
     689             : 
     690             : !      <specialOutput form66="F" eonly="F" bmt="F"/>
     691             :    420 FORMAT('      <specialOutput eonly="',l1,'" bmt="',l1,'"/>')
     692          27 :    WRITE (fileNum,420) input%eonly,input%l_bmt
     693             : 
     694             : !      <magneticCircularDichroism energyLo="-10.0" energyUp="0.0"/>
     695             :    430 FORMAT('      <magneticCircularDichroism energyLo="',f0.8,'" energyUp="',f0.8,'"/>')
     696          27 :    WRITE (fileNum,430) banddos%e_mcd_lo,banddos%e_mcd_up
     697             : 
     698          27 :    WRITE (fileNum,'(a)') '   </output>'
     699          27 :    IF(l_outFile) THEN
     700          24 :       CALL closeXMLElement('inputData')
     701             :    ELSE
     702           3 :       WRITE (fileNum,'(a)')' <!-- We include the file relax.inp here to enable relaxations (see documentation) -->'
     703           3 :       WRITE (fileNum,'(a)')'  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="relax.xml"> <xi:fallback/> </xi:include>'
     704           3 :       WRITE (fileNum,'(a)') '</fleurInput>'
     705           3 :       CLOSE (fileNum)
     706             :    END IF
     707             : 
     708          54 : END SUBROUTINE w_inpXML
     709             : END MODULE m_winpXML

Generated by: LCOV version 1.13