Commit 71a6204a authored by Gregor Michalicek's avatar Gregor Michalicek

Correct Input Schema and w_inpXML.f90

...not tested at the moment.
parent 6f011eff
...@@ -14,11 +14,11 @@ MODULE m_winpXML ...@@ -14,11 +14,11 @@ MODULE m_winpXML
!!! containing all required input data. !!! containing all required input data.
!!! GM'16 !!! GM'16
!!! !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS CONTAINS
SUBROUTINE w_inpXML(& SUBROUTINE w_inpXML(&
& atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,& & atoms,obsolete,vacuum,input,stars,sliceplot,forcetheo,banddos,&
& cell,sym,xcpot,noco,oneD,hybrid,kpts,div,l_gamma,& & cell,sym,xcpot,noco,oneD,hybrid,kpts,div,l_gamma,&
& noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt,& & noel,namex,relcor,a1,a2,a3,dtild_opt,name_opt,&
& xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,& & xmlElectronStates,xmlPrintCoreStates,xmlCoreOccs,&
& atomTypeSpecies,speciesRepAtomType,l_outFile,filename,& & atomTypeSpecies,speciesRepAtomType,l_outFile,filename,&
...@@ -30,78 +30,78 @@ SUBROUTINE w_inpXML(& ...@@ -30,78 +30,78 @@ SUBROUTINE w_inpXML(&
USE m_xmlOutput USE m_xmlOutput
IMPLICIT NONE IMPLICIT NONE
! arguments ! arguments
TYPE(t_input),INTENT(IN) :: input TYPE(t_input),INTENT(IN) :: input
TYPE(t_sym),INTENT(IN) :: sym TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_vacuum),INTENT(IN) :: vacuum TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_obsolete),INTENT(IN) :: obsolete TYPE(t_obsolete),INTENT(IN) :: obsolete
TYPE(t_kpts),INTENT(IN) :: kpts TYPE(t_kpts),INTENT(IN) :: kpts
TYPE(t_oneD),INTENT(IN) :: oneD TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_hybrid),INTENT(IN) :: hybrid TYPE(t_hybrid),INTENT(IN) :: hybrid
TYPE(t_cell),INTENT(IN) :: cell TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_banddos),INTENT(IN) :: banddos TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_sliceplot),INTENT(IN):: sliceplot TYPE(t_sliceplot),INTENT(IN):: sliceplot
CLASS(t_xcpot),INTENT(IN) :: xcpot CLASS(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_noco),INTENT(IN) :: noco TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_enpara),INTENT(IN) :: enpara TYPE(t_enpara),INTENT(IN) :: enpara
CLASS(t_forcetheo),INTENT(IN):: forcetheo !nothing is done here so far.... CLASS(t_forcetheo),INTENT(IN):: forcetheo !nothing is done here so far....
INTEGER, INTENT (IN) :: numSpecies INTEGER, INTENT (IN) :: numSpecies
INTEGER, INTENT (IN) :: div(3) INTEGER, INTENT (IN) :: div(3)
INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype) INTEGER, INTENT (IN) :: atomTypeSpecies(atoms%ntype)
INTEGER, INTENT (IN) :: speciesRepAtomType(numSpecies) INTEGER, INTENT (IN) :: speciesRepAtomType(numSpecies)
LOGICAL, INTENT (IN) :: l_gamma, l_outFile, l_explicitIn LOGICAL, INTENT (IN) :: l_gamma, l_outFile, l_explicitIn
REAL, INTENT (IN) :: a1(3),a2(3),a3(3) REAL, INTENT (IN) :: a1(3),a2(3),a3(3)
REAL, INTENT (IN) :: xmlCoreOccs(2,29,atoms%ntype) REAL, INTENT (IN) :: xmlCoreOccs(2,29,atoms%ntype)
INTEGER, INTENT (IN) :: xmlElectronStates(29,atoms%ntype) INTEGER, INTENT (IN) :: xmlElectronStates(29,atoms%ntype)
LOGICAL, INTENT (IN) :: xmlPrintCoreStates(29,atoms%ntype) LOGICAL, INTENT (IN) :: xmlPrintCoreStates(29,atoms%ntype)
CHARACTER(len=3),INTENT(IN) :: noel(atoms%ntype) CHARACTER(len=3),INTENT(IN) :: noel(atoms%ntype)
CHARACTER(len=4),INTENT(IN) :: namex CHARACTER(len=4),INTENT(IN) :: namex
CHARACTER(len=12),INTENT(IN):: relcor CHARACTER(len=12),INTENT(IN):: relcor
CHARACTER(LEN=*),INTENT(IN) :: filename CHARACTER(LEN=*),INTENT(IN) :: filename
REAL,INTENT(IN),OPTIONAL :: dtild_opt REAL,INTENT(IN),OPTIONAL :: dtild_opt
CHARACTER(len=8),INTENT(IN),OPTIONAL:: name_opt(10) CHARACTER(len=8),INTENT(IN),OPTIONAL:: name_opt(10)
INTEGER :: iSpecies, fileNum INTEGER :: iSpecies, fileNum
CHARACTER(len=8) :: name(10) CHARACTER(len=8) :: name(10)
!+lda+u !+lda+u
REAL u,j REAL u,j
INTEGER l, i_u INTEGER l, i_u
INTEGER uIndices(2,atoms%ntype) INTEGER uIndices(2,atoms%ntype)
LOGICAL l_amf LOGICAL l_amf
CHARACTER(len=3) ch_test CHARACTER(len=3) ch_test
NAMELIST /ldaU/ l,u,j,l_amf NAMELIST /ldaU/ l,u,j,l_amf
!-lda+u !-lda+u
!+odim !+odim
INTEGER MM,vM,m_cyl INTEGER MM,vM,m_cyl
LOGICAL invs1,zrfs1 LOGICAL invs1,zrfs1
INTEGER chi,rot INTEGER chi,rot
LOGICAL d1,band LOGICAL d1,band
NAMELIST /odim/ d1,MM,vM,m_cyl,chi,rot,invs1,zrfs1 NAMELIST /odim/ d1,MM,vM,m_cyl,chi,rot,invs1,zrfs1
!-odim !-odim
! .. ! ..
! .. Local Variables ! .. Local Variables
REAL ::dtild, zc, sumWeight REAL ::dtild, zc, sumWeight
INTEGER ::nw,idsprs, n1, n2 INTEGER ::nw,idsprs, n1, n2
INTEGER ieq,i,k,na,n,ilo INTEGER ieq,i,k,na,n,ilo
REAL s3,ah,a,hs2,rest REAL s3,ah,a,hs2,rest
LOGICAL l_hyb,l_sym,ldum LOGICAL l_hyb,l_sym,ldum
INTEGER :: ierr INTEGER :: ierr
! .. ! ..
!... Local Arrays !... Local Arrays
CHARACTER :: helpchar(atoms%ntype) CHARACTER :: helpchar(atoms%ntype)
CHARACTER(len= 4) :: chntype CHARACTER(len= 4) :: chntype
CHARACTER(len= 41) :: chform CHARACTER(len= 41) :: chform
CHARACTER(len=100) :: line CHARACTER(len=100) :: line
! added for HF and hybrid functionals ! added for HF and hybrid functionals
REAL :: aMix,omega REAL :: aMix,omega
INTEGER :: idum INTEGER :: idum
CHARACTER (len=1) :: check CHARACTER (len=1) :: check
CHARACTER(len=20) :: speciesName CHARACTER(len=20) :: speciesName
...@@ -189,8 +189,8 @@ SUBROUTINE w_inpXML(& ...@@ -189,8 +189,8 @@ SUBROUTINE w_inpXML(&
WRITE (fileNum,130) input%ctail,input%frcor,input%kcrel,input%coretail_lmax WRITE (fileNum,130) input%ctail,input%frcor,input%kcrel,input%coretail_lmax
! <magnetism jspins="1" l_noco="F" l_J="F" swsp="F" lflip="F"/> ! <magnetism jspins="1" l_noco="F" l_J="F" swsp="F" lflip="F"/>
140 FORMAT(' <magnetism jspins="',i0,'" l_noco="',l1,'" l_J="',l1,'" swsp="',l1,'" lflip="',l1,'"/>') 140 FORMAT(' <magnetism jspins="',i0,'" l_noco="',l1,'" swsp="',l1,'" lflip="',l1,'"/>')
WRITE (fileNum,140) input%jspins,noco%l_noco,.false.,input%swsp,input%lflip WRITE (fileNum,140) input%jspins,noco%l_noco,input%swsp,input%lflip
! <soc theta="0.00000" phi="0.00000" l_soc="F" spav="F" off="F" soc66="F"/> ! <soc theta="0.00000" phi="0.00000" l_soc="F" spav="F" off="F" soc66="F"/>
150 FORMAT(' <soc theta="',f0.8,'" phi="',f0.8,'" l_soc="',l1,'" spav="',l1,'"/>') 150 FORMAT(' <soc theta="',f0.8,'" phi="',f0.8,'" l_soc="',l1,'" spav="',l1,'"/>')
...@@ -198,9 +198,9 @@ SUBROUTINE w_inpXML(& ...@@ -198,9 +198,9 @@ SUBROUTINE w_inpXML(&
IF (l_nocoOpt.OR.l_explicit) THEN IF (l_nocoOpt.OR.l_explicit) THEN
160 FORMAT(' <nocoParams l_ss="',l1,'" l_mperp="',l1,'" l_constr="',l1,'" l_disp="',l1,& 160 FORMAT(' <nocoParams l_ss="',l1,'" l_mperp="',l1,'" l_constr="',l1,&
'" mix_b="',f0.8,'" thetaJ="',f0.8,'" nsh="',i0,'">') '" mix_b="',f0.8,'">')
WRITE (fileNum,160) noco%l_ss, noco%l_mperp, noco%l_constr, .false., noco%mix_b WRITE (fileNum,160) noco%l_ss, noco%l_mperp, noco%l_constr, noco%mix_b
162 FORMAT(' <qss>',f0.10,' ',f0.10,' ',f0.10,'</qss>') 162 FORMAT(' <qss>',f0.10,' ',f0.10,' ',f0.10,'</qss>')
WRITE(fileNum,162) noco%qss(1), noco%qss(2), noco%qss(3) WRITE(fileNum,162) noco%qss(1), noco%qss(2), noco%qss(3)
WRITE (fileNum,'(a)') ' </nocoParams>' WRITE (fileNum,'(a)') ' </nocoParams>'
...@@ -555,28 +555,28 @@ SUBROUTINE w_inpXML(& ...@@ -555,28 +555,28 @@ SUBROUTINE w_inpXML(&
tempTaual(2,na) = atoms%taual(2,na) tempTaual(2,na) = atoms%taual(2,na)
tempTaual(3,na) = atoms%taual(3,na) tempTaual(3,na) = atoms%taual(3,na)
scpos = 1.0 scpos = 1.0
DO i = 2,40 DO i = 2,40
rest = ABS(i*tempTaual(1,na) - NINT(i*tempTaual(1,na))) rest = ABS(i*tempTaual(1,na) - NINT(i*tempTaual(1,na)))
IF ((scpos(1).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(1) = real(i) IF ((scpos(1).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(1) = real(i)
rest = ABS(i*tempTaual(2,na) - NINT(i*tempTaual(2,na))) rest = ABS(i*tempTaual(2,na) - NINT(i*tempTaual(2,na)))
IF ((scpos(2).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(2) = real(i) IF ((scpos(2).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(2) = real(i)
IF (.not.input%film) THEN IF (.not.input%film) THEN
rest = ABS(i*tempTaual(3,na) - NINT(i*tempTaual(3,na)) ) rest = ABS(i*tempTaual(3,na) - NINT(i*tempTaual(3,na)) )
IF ((scpos(3).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(3) = real(i) IF ((scpos(3).EQ.1.0).AND.(rest.LT.(i*0.000001))) scpos(3) = real(i)
END IF END IF
END DO END DO
DO i = 1,2 DO i = 1,2
tempTaual(i,na) = tempTaual(i,na)*scpos(i) tempTaual(i,na) = tempTaual(i,na)*scpos(i)
END DO END DO
IF (.not.input%film) tempTaual(3,na) = tempTaual(3,na)*scpos(3) IF (.not.input%film) tempTaual(3,na) = tempTaual(3,na)*scpos(3)
IF (input%film) THEN IF (input%film) THEN
tempTaual(3,na) = dtild*tempTaual(3,na)/input%scaleCell tempTaual(3,na) = dtild*tempTaual(3,na)/input%scaleCell
END IF END IF
!+odim in 1D case all the coordinates are given in cartesian YM !+odim in 1D case all the coordinates are given in cartesian YM
IF (oneD%odd%d1) THEN IF (oneD%odd%d1) THEN
tempTaual(1,na) = tempTaual(1,na)*a1(1) tempTaual(1,na) = tempTaual(1,na)*a1(1)
tempTaual(2,na) = tempTaual(2,na)*a2(2) tempTaual(2,na) = tempTaual(2,na)*a2(2)
END IF END IF
!-odim !-odim
IF (oneD%odd%d1) THEN IF (oneD%odd%d1) THEN
STOP '1D position output not implemented!' STOP '1D position output not implemented!'
...@@ -660,5 +660,5 @@ SUBROUTINE w_inpXML(& ...@@ -660,5 +660,5 @@ SUBROUTINE w_inpXML(&
CLOSE (fileNum) CLOSE (fileNum)
END IF END IF
END SUBROUTINE w_inpXML END SUBROUTINE w_inpXML
END MODULE m_winpXML END MODULE m_winpXML
This diff is collapsed.
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