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
ikpt,jsp_start,jsp_end,ispin
INTEGER skip_t,skip_tt
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 ..
INTEGER n_bands(0:dimension%neigd),ncore(atoms%ntype)
REAL e_mcd(atoms%ntype,input%jspins,dimension%nstd)
......@@ -219,11 +219,9 @@ CONTAINS
CALL orb%init(atoms,noco,jsp_start,jsp_end)
INQUIRE (file='mcd_inp',exist=l_mcd)
IF (l_mcd) THEN
OPEN (23,file='mcd_inp',STATUS='old',FORM='formatted')
READ (23,*) emcd_lo,emcd_up
CLOSE (23)
IF (banddos%l_mcd) THEN
emcd_lo = banddos%e_mcd_lo
emcd_up = banddos%e_mcd_up
ALLOCATE ( m_mcd(dimension%nstd,(3+1)**2,3*atoms%ntype,2) )
ALLOCATE ( mcd(3*atoms%ntype,dimension%nstd,dimension%neigd) )
IF (.not.banddos%dos) WRITE (*,*) 'For mcd-spectra set banddos%dos=T!'
......@@ -277,7 +275,7 @@ CONTAINS
CALL int_21(f,g,atoms,n,l,denCoeffsOffdiag)
END IF
END DO
IF (l_mcd) THEN
IF (banddos%l_mcd) THEN
CALL mcd_init(atoms,input,dimension,&
vTot%mt(:,0,:,:),g,f,emcd_up,emcd_lo,n,jspin,&
ncore,e_mcd,m_mcd)
......@@ -332,7 +330,7 @@ CONTAINS
!--> loop over k-points: each can be a separate task
IF (kpts%nkpt < mpi%isize) THEN
l_evp = .true.
IF (l_mcd) THEN
IF (banddos%l_mcd) THEN
mcd(:,:,:) = 0.0
ENDIF
ener(:,:,:) = 0.0
......@@ -577,7 +575,7 @@ CONTAINS
IF (.not.sliceplot%slice) THEN
CALL eparas(ispin,atoms,noccbd,mpi,ikpt,noccbd,we,eig,&
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),&
qal(0:,:,:,ispin),mcd)
......@@ -700,7 +698,7 @@ CONTAINS
CALL timestart("cdnval: dos")
IF (mpi%irank==0) THEN
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)
IF (banddos%dos.AND.(banddos%ndir.EQ.-3)) THEN
CALL Ek_write_sl(eig_id,dimension,kpts,atoms,vacuum,input,jspin,sym,cell,slab)
......
......@@ -1731,6 +1731,7 @@ SUBROUTINE r_inpXML(&
sliceplot%slice = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@slice'))
input%l_coreSpec = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@coreSpec'))
input%l_wann = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@wannier'))
banddos%l_mcd = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@mcd'))
! Read in optional switches for checks
......@@ -1930,6 +1931,21 @@ SUBROUTINE r_inpXML(&
END DO
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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
......@@ -2154,7 +2170,7 @@ FUNCTION countStringTokens(line) RESULT(tokenCount)
INTEGER:: n,i
CHARACTER(len=256):: xpatha,valueString
n=evaluateFirstIntOnly(xmlGetAttributeValue(TRIM(ADJUSTL(path))//'/@count'))
n=xmlGetNumberOfNodes(TRIM(ADJUSTL(path))//'/q')
ALLOCATE(q(3,n))
DO i = 1, n
PRINT *, path,'/q[',i,']'
......
This diff is collapsed.
......@@ -159,8 +159,11 @@
sliceplot%e2s = 0.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))
IF (mpi%irank.EQ.0) THEN
WRITE (6,*) 'XML code path used: Calculation parameters are stored in out.xml'
......@@ -274,9 +277,11 @@
CLOSE (111)
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
#ifdef CPP_MPI
CALL mpi_bc_all(&
......@@ -284,8 +289,6 @@
& sym,kpts,DIMENSION,input,&
& banddos,sliceplot,vacuum,cell,enpara,&
& noco,oneD,xcpot,hybrid)
! initialize record length of the eig file
#endif
! Set up pointer for backtransformation from g-vector in positive
......
......@@ -39,7 +39,7 @@ CONTAINS
REAL rdum
! .. Local Arrays ..
INTEGER i(39),ierr(3)
REAL r(32)
REAL r(34)
LOGICAL l(45)
! ..
! .. External Subroutines..
......@@ -65,6 +65,7 @@ CONTAINS
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(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(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
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)
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)
input%efield%l_dirichlet_coeff = l(43) ; input%l_useapw=l(2)
......
......@@ -444,6 +444,7 @@ MODULE m_types_setup
REAL :: e1s
REAL :: e2s
END TYPE t_sliceplot
TYPE t_banddos
LOGICAL :: dos
LOGICAL :: band
......@@ -455,6 +456,8 @@ MODULE m_types_setup
REAL :: e1_dos
REAL :: e2_dos
REAL :: sig_dos
REAL :: e_mcd_lo
REAL :: e_mcd_up
END TYPE t_banddos
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