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