Commit 8327863b authored by Gregor Michalicek's avatar Gregor Michalicek

Move MCD input to inp.xml (only)

...also in this commit: remove count variable for q vectors in ForceTheorem type in XML Schema
parent 2d192b95
...@@ -130,7 +130,7 @@ CONTAINS ...@@ -130,7 +130,7 @@ CONTAINS
ikpt,jsp_start,jsp_end,ispin ikpt,jsp_start,jsp_end,ispin
INTEGER skip_t,skip_tt INTEGER skip_t,skip_tt
INTEGER n_size,i_rec,n_rank ,ncored,n_start,n_end,noccbd_l,nbasfcn INTEGER n_size,i_rec,n_rank ,ncored,n_start,n_end,noccbd_l,nbasfcn
LOGICAL l_fmpl,l_mcd,l_evp,l_orbcomprot,l_real LOGICAL l_fmpl,l_evp,l_orbcomprot,l_real
! ...Local Arrays .. ! ...Local Arrays ..
INTEGER n_bands(0:dimension%neigd),ncore(atoms%ntype) INTEGER n_bands(0:dimension%neigd),ncore(atoms%ntype)
REAL e_mcd(atoms%ntype,input%jspins,dimension%nstd) REAL e_mcd(atoms%ntype,input%jspins,dimension%nstd)
...@@ -219,11 +219,9 @@ CONTAINS ...@@ -219,11 +219,9 @@ CONTAINS
CALL orb%init(atoms,noco,jsp_start,jsp_end) CALL orb%init(atoms,noco,jsp_start,jsp_end)
INQUIRE (file='mcd_inp',exist=l_mcd) IF (banddos%l_mcd) THEN
IF (l_mcd) THEN emcd_lo = banddos%e_mcd_lo
OPEN (23,file='mcd_inp',STATUS='old',FORM='formatted') emcd_up = banddos%e_mcd_up
READ (23,*) emcd_lo,emcd_up
CLOSE (23)
ALLOCATE ( m_mcd(dimension%nstd,(3+1)**2,3*atoms%ntype,2) ) ALLOCATE ( m_mcd(dimension%nstd,(3+1)**2,3*atoms%ntype,2) )
ALLOCATE ( mcd(3*atoms%ntype,dimension%nstd,dimension%neigd) ) ALLOCATE ( mcd(3*atoms%ntype,dimension%nstd,dimension%neigd) )
IF (.not.banddos%dos) WRITE (*,*) 'For mcd-spectra set banddos%dos=T!' IF (.not.banddos%dos) WRITE (*,*) 'For mcd-spectra set banddos%dos=T!'
...@@ -277,7 +275,7 @@ CONTAINS ...@@ -277,7 +275,7 @@ CONTAINS
CALL int_21(f,g,atoms,n,l,denCoeffsOffdiag) CALL int_21(f,g,atoms,n,l,denCoeffsOffdiag)
END IF END IF
END DO END DO
IF (l_mcd) THEN IF (banddos%l_mcd) THEN
CALL mcd_init(atoms,input,dimension,& CALL mcd_init(atoms,input,dimension,&
vTot%mt(:,0,:,:),g,f,emcd_up,emcd_lo,n,jspin,& vTot%mt(:,0,:,:),g,f,emcd_up,emcd_lo,n,jspin,&
ncore,e_mcd,m_mcd) ncore,e_mcd,m_mcd)
...@@ -332,7 +330,7 @@ CONTAINS ...@@ -332,7 +330,7 @@ CONTAINS
!--> loop over k-points: each can be a separate task !--> loop over k-points: each can be a separate task
IF (kpts%nkpt < mpi%isize) THEN IF (kpts%nkpt < mpi%isize) THEN
l_evp = .true. l_evp = .true.
IF (l_mcd) THEN IF (banddos%l_mcd) THEN
mcd(:,:,:) = 0.0 mcd(:,:,:) = 0.0
ENDIF ENDIF
ener(:,:,:) = 0.0 ener(:,:,:) = 0.0
...@@ -577,7 +575,7 @@ CONTAINS ...@@ -577,7 +575,7 @@ CONTAINS
IF (.not.sliceplot%slice) THEN IF (.not.sliceplot%slice) THEN
CALL eparas(ispin,atoms,noccbd,mpi,ikpt,noccbd,we,eig,& CALL eparas(ispin,atoms,noccbd,mpi,ikpt,noccbd,we,eig,&
skip_t,l_evp,eigVecCoeffs,usdus,& skip_t,l_evp,eigVecCoeffs,usdus,&
ncore,l_mcd,m_mcd,enerlo(1,1,ispin),sqlo(1,1,ispin),& ncore,banddos%l_mcd,m_mcd,enerlo(1,1,ispin),sqlo(1,1,ispin),&
ener(0,1,ispin),sqal(0,1,ispin),& ener(0,1,ispin),sqal(0,1,ispin),&
qal(0:,:,:,ispin),mcd) qal(0:,:,:,ispin),mcd)
...@@ -700,7 +698,7 @@ CONTAINS ...@@ -700,7 +698,7 @@ CONTAINS
CALL timestart("cdnval: dos") CALL timestart("cdnval: dos")
IF (mpi%irank==0) THEN IF (mpi%irank==0) THEN
CALL doswrite(eig_id,dimension,kpts,atoms,vacuum,input,banddos,& CALL doswrite(eig_id,dimension,kpts,atoms,vacuum,input,banddos,&
sliceplot,noco,sym,cell,l_mcd,ncored,ncore,e_mcd,& sliceplot,noco,sym,cell,banddos%l_mcd,ncored,ncore,e_mcd,&
results%ef,results%bandgap,slab%nsld,oneD) results%ef,results%bandgap,slab%nsld,oneD)
IF (banddos%dos.AND.(banddos%ndir.EQ.-3)) THEN IF (banddos%dos.AND.(banddos%ndir.EQ.-3)) THEN
CALL Ek_write_sl(eig_id,dimension,kpts,atoms,vacuum,input,jspin,sym,cell,slab) CALL Ek_write_sl(eig_id,dimension,kpts,atoms,vacuum,input,jspin,sym,cell,slab)
......
...@@ -12,9 +12,9 @@ MODULE m_rinpXML ...@@ -12,9 +12,9 @@ MODULE m_rinpXML
!!! GM'16 !!! GM'16
!!! !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CONTAINS CONTAINS
SUBROUTINE r_inpXML(& SUBROUTINE r_inpXML(&
atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,forcetheo,& atoms,obsolete,vacuum,input,stars,sliceplot,banddos,DIMENSION,forcetheo,&
cell,sym,xcpot,noco,oneD,hybrid,kpts,enpara,coreSpecInput,wann,& cell,sym,xcpot,noco,oneD,hybrid,kpts,enpara,coreSpecInput,wann,&
noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,& noel,namex,relcor,a1,a2,a3,dtild,xmlElectronStates,&
xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,& xmlPrintCoreStates,xmlCoreOccs,atomTypeSpecies,speciesRepAtomType,&
...@@ -37,19 +37,19 @@ SUBROUTINE r_inpXML(& ...@@ -37,19 +37,19 @@ SUBROUTINE r_inpXML(&
USE m_sort USE m_sort
IMPLICIT NONE IMPLICIT NONE
TYPE(t_input),INTENT(INOUT) :: input TYPE(t_input),INTENT(INOUT) :: input
TYPE(t_sym),INTENT(INOUT) :: sym TYPE(t_sym),INTENT(INOUT) :: sym
TYPE(t_stars),INTENT(INOUT) :: stars TYPE(t_stars),INTENT(INOUT) :: stars
TYPE(t_atoms),INTENT(INOUT) :: atoms TYPE(t_atoms),INTENT(INOUT) :: atoms
TYPE(t_vacuum),INTENT(INOUT) :: vacuum TYPE(t_vacuum),INTENT(INOUT) :: vacuum
TYPE(t_obsolete),INTENT(INOUT) :: obsolete TYPE(t_obsolete),INTENT(INOUT) :: obsolete
TYPE(t_kpts),INTENT(INOUT) :: kpts TYPE(t_kpts),INTENT(INOUT) :: kpts
TYPE(t_oneD),INTENT(INOUT) :: oneD TYPE(t_oneD),INTENT(INOUT) :: oneD
TYPE(t_hybrid),INTENT(INOUT) :: hybrid TYPE(t_hybrid),INTENT(INOUT) :: hybrid
TYPE(t_cell),INTENT(INOUT) :: cell TYPE(t_cell),INTENT(INOUT) :: cell
TYPE(t_banddos),INTENT(INOUT) :: banddos TYPE(t_banddos),INTENT(INOUT) :: banddos
TYPE(t_sliceplot),INTENT(INOUT):: sliceplot TYPE(t_sliceplot),INTENT(INOUT):: sliceplot
TYPE(t_xcpot),INTENT(INOUT) :: xcpot TYPE(t_xcpot),INTENT(INOUT) :: xcpot
TYPE(t_noco),INTENT(INOUT) :: noco TYPE(t_noco),INTENT(INOUT) :: noco
TYPE(t_dimension),INTENT(OUT) :: dimension TYPE(t_dimension),INTENT(OUT) :: dimension
TYPE(t_enpara) ,INTENT(OUT) :: enpara TYPE(t_enpara) ,INTENT(OUT) :: enpara
...@@ -62,35 +62,35 @@ SUBROUTINE r_inpXML(& ...@@ -62,35 +62,35 @@ SUBROUTINE r_inpXML(&
INTEGER, ALLOCATABLE, INTENT(INOUT) :: speciesRepAtomType(:) INTEGER, ALLOCATABLE, INTENT(INOUT) :: speciesRepAtomType(:)
REAL, ALLOCATABLE, INTENT(INOUT) :: xmlCoreOccs(:,:,:) REAL, ALLOCATABLE, INTENT(INOUT) :: xmlCoreOccs(:,:,:)
LOGICAL, ALLOCATABLE, INTENT(INOUT) :: xmlPrintCoreStates(:,:) LOGICAL, ALLOCATABLE, INTENT(INOUT) :: xmlPrintCoreStates(:,:)
CHARACTER(len=3), ALLOCATABLE, INTENT(INOUT) :: noel(:) CHARACTER(len=3), ALLOCATABLE, INTENT(INOUT) :: noel(:)
CHARACTER(len=4), INTENT(OUT) :: namex CHARACTER(len=4), INTENT(OUT) :: namex
CHARACTER(len=12), INTENT(OUT) :: relcor CHARACTER(len=12), INTENT(OUT) :: relcor
REAL, INTENT(OUT) :: a1(3),a2(3),a3(3) REAL, INTENT(OUT) :: a1(3),a2(3),a3(3)
REAL, INTENT(OUT) :: dtild REAL, INTENT(OUT) :: dtild
CHARACTER(len=8) :: name(10) CHARACTER(len=8) :: name(10)
!+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 :: scpos ,zc REAL :: scpos ,zc
INTEGER ieq,i,k,na,n,ii INTEGER ieq,i,k,na,n,ii
REAL s3,ah,a,hs2,rest,thetaj REAL s3,ah,a,hs2,rest,thetaj
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
CHARACTER(len=20) :: tempNumberString CHARACTER(len=20) :: tempNumberString
CHARACTER(len=150) :: format CHARACTER(len=150) :: format
CHARACTER(len=20) :: mixingScheme CHARACTER(len=20) :: mixingScheme
...@@ -1731,6 +1731,7 @@ SUBROUTINE r_inpXML(& ...@@ -1731,6 +1731,7 @@ SUBROUTINE r_inpXML(&
sliceplot%slice = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@slice')) sliceplot%slice = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@slice'))
input%l_coreSpec = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@coreSpec')) input%l_coreSpec = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@coreSpec'))
input%l_wann = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@wannier')) input%l_wann = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@wannier'))
banddos%l_mcd = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@mcd'))
! Read in optional switches for checks ! Read in optional switches for checks
...@@ -1930,6 +1931,21 @@ SUBROUTINE r_inpXML(& ...@@ -1930,6 +1931,21 @@ SUBROUTINE r_inpXML(&
END DO END DO
END IF END IF
! Read in optional magnetic circular dichroism parameters
xPathA = '/fleurInput/output/magneticCircularDichroism'
numberNodes = xmlGetNumberOfNodes(xPathA)
IF ((banddos%l_mcd).AND.(numberNodes.EQ.0)) THEN
CALL juDFT_error("mcd is true but magneticCircularDichroism parameters are not set!", calledby = "r_inpXML")
END IF
banddos%e_mcd_lo = 0.0
banddos%e_mcd_up = 0.0
IF (numberNodes.EQ.1) THEN
banddos%e_mcd_lo = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@energyLo'))
banddos%e_mcd_up = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@energyUp'))
END IF
END IF END IF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
...@@ -2154,7 +2170,7 @@ FUNCTION countStringTokens(line) RESULT(tokenCount) ...@@ -2154,7 +2170,7 @@ FUNCTION countStringTokens(line) RESULT(tokenCount)
INTEGER:: n,i INTEGER:: n,i
CHARACTER(len=256):: xpatha,valueString CHARACTER(len=256):: xpatha,valueString
n=evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(path))//'/@count')) n=xmlGetNumberOfNodes(TRIM(ADJUSTL(path))//'/q')
ALLOCATE(q(3,n)) ALLOCATE(q(3,n))
DO i = 1, n DO i = 1, n
PRINT *, path,'/q[',i,']' PRINT *, path,'/q[',i,']'
......
This diff is collapsed.
...@@ -159,8 +159,11 @@ ...@@ -159,8 +159,11 @@
sliceplot%e2s = 0.0 sliceplot%e2s = 0.0
sliceplot%nnne = 0 sliceplot%nnne = 0
IF (input%l_inpXML) THEN banddos%l_mcd = .FALSE.
banddos%e_mcd_lo = 0.0
banddos%e_mcd_up = 0.0
IF (input%l_inpXML) THEN
ALLOCATE(noel(1)) ALLOCATE(noel(1))
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
WRITE (6,*) 'XML code path used: Calculation parameters are stored in out.xml' WRITE (6,*) 'XML code path used: Calculation parameters are stored in out.xml'
...@@ -274,18 +277,18 @@ ...@@ -274,18 +277,18 @@
CLOSE (111) CLOSE (111)
END IF END IF
END IF END IF
INQUIRE(file='mcd_inp',exist=banddos%l_mcd) INQUIRE(file='mcd_inp',exist=l_found)
IF(l_found) THEN
CALL judft_error("setup of mcd calculation is only supported in the inp.xml file",calledby="fleur_init")
END IF
END IF END IF
#ifdef CPP_MPI #ifdef CPP_MPI
CALL mpi_bc_all(& CALL mpi_bc_all(&
& mpi,stars,sphhar,atoms,obsolete,& & mpi,stars,sphhar,atoms,obsolete,&
& sym,kpts,DIMENSION,input,& & sym,kpts,DIMENSION,input,&
& banddos,sliceplot,vacuum,cell,enpara,& & banddos,sliceplot,vacuum,cell,enpara,&
& noco,oneD,xcpot,hybrid) & noco,oneD,xcpot,hybrid)
! initialize record length of the eig file
#endif #endif
! Set up pointer for backtransformation from g-vector in positive ! Set up pointer for backtransformation from g-vector in positive
......
...@@ -39,7 +39,7 @@ CONTAINS ...@@ -39,7 +39,7 @@ CONTAINS
REAL rdum REAL rdum
! .. Local Arrays .. ! .. Local Arrays ..
INTEGER i(39),ierr(3) INTEGER i(39),ierr(3)
REAL r(32) REAL r(34)
LOGICAL l(45) LOGICAL l(45)
! .. ! ..
! .. External Subroutines.. ! .. External Subroutines..
...@@ -65,6 +65,7 @@ CONTAINS ...@@ -65,6 +65,7 @@ CONTAINS
r(23)=0.0 ; r(24)=input%delgau ; r(25)=input%tkb ; r(26)=input%efield%vslope r(23)=0.0 ; r(24)=input%delgau ; r(25)=input%tkb ; r(26)=input%efield%vslope
r(27)=0.0 ; r(28)=0.0!r(27)=aMix_VHSE() ; r(28)=omega_VHSE() r(27)=0.0 ; r(28)=0.0!r(27)=aMix_VHSE() ; r(28)=omega_VHSE()
r(29)=input%minDistance ; r(30)=obsolete%chng ; r(31)=input%ldauMixParam ; r(32)=input%ldauSpinf r(29)=input%minDistance ; r(30)=obsolete%chng ; r(31)=input%ldauMixParam ; r(32)=input%ldauSpinf
r(33)=banddos%e_mcd_lo ; r(34)=banddos%e_mcd_up
l(1)=input%eonly ; l(2)=input%l_useapw ; l(3)=input%secvar ; l(4)=sym%zrfs ; l(5)=input%film l(1)=input%eonly ; l(2)=input%l_useapw ; l(3)=input%secvar ; l(4)=sym%zrfs ; l(5)=input%film
l(6)=sym%invs ; l(7)=sym%invs2 ; l(8)=input%l_bmt ; l(9)=input%l_f ; l(10)=input%cdinf l(6)=sym%invs ; l(7)=sym%invs2 ; l(8)=input%l_bmt ; l(9)=input%l_f ; l(10)=input%cdinf
...@@ -98,7 +99,7 @@ CONTAINS ...@@ -98,7 +99,7 @@ CONTAINS
vacuum%locx(1)=r(11); vacuum%locx(2)=r(12); vacuum%locy(1)=r(13); vacuum%locy(2)=r(14) vacuum%locx(1)=r(11); vacuum%locx(2)=r(12); vacuum%locy(1)=r(13); vacuum%locy(2)=r(14)
sliceplot%e1s=r(6) ; sliceplot%e2s=r(7) ; noco%theta=r(8); noco%phi=r(9); vacuum%tworkf=r(10) sliceplot%e1s=r(6) ; sliceplot%e2s=r(7) ; noco%theta=r(8); noco%phi=r(9); vacuum%tworkf=r(10)
cell%omtil=r(1) ; cell%area=r(2) ; vacuum%delz=r(3) ; cell%z1=r(4) ; input%alpha=r(5) cell%omtil=r(1) ; cell%area=r(2) ; vacuum%delz=r(3) ; cell%z1=r(4) ; input%alpha=r(5)
input%ldauMixParam=r(31) ; input%ldauSpinf=r(32) input%ldauMixParam=r(31) ; input%ldauSpinf=r(32) ; banddos%e_mcd_lo=r(33) ; banddos%e_mcd_up=r(34)
! !
CALL MPI_BCAST(l,SIZE(l),MPI_LOGICAL,0,mpi%mpi_comm,ierr) CALL MPI_BCAST(l,SIZE(l),MPI_LOGICAL,0,mpi%mpi_comm,ierr)
input%efield%l_dirichlet_coeff = l(43) ; input%l_useapw=l(2) input%efield%l_dirichlet_coeff = l(43) ; input%l_useapw=l(2)
......
...@@ -444,6 +444,7 @@ MODULE m_types_setup ...@@ -444,6 +444,7 @@ MODULE m_types_setup
REAL :: e1s REAL :: e1s
REAL :: e2s REAL :: e2s
END TYPE t_sliceplot END TYPE t_sliceplot
TYPE t_banddos TYPE t_banddos
LOGICAL :: dos LOGICAL :: dos
LOGICAL :: band LOGICAL :: band
...@@ -455,6 +456,8 @@ MODULE m_types_setup ...@@ -455,6 +456,8 @@ MODULE m_types_setup
REAL :: e1_dos REAL :: e1_dos
REAL :: e2_dos REAL :: e2_dos
REAL :: sig_dos REAL :: sig_dos
REAL :: e_mcd_lo
REAL :: e_mcd_up
END TYPE t_banddos END TYPE t_banddos
TYPE t_obsolete TYPE t_obsolete
......
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