Commit 64bf34d1 authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce oUnit to files in dos directory

parent b8770c70
......@@ -6,12 +6,8 @@
MODULE m_cdninf
CONTAINS
SUBROUTINE cdninf(&
& input,sym,noco,jspin,atoms,vacuum,&
& sliceplot,banddos,ikpt,bkpt,wk,&
& cell,kpts,&
& nbands,eig,qal,qis,qvac,qvlay,&
& qstars,jsym,ksym)
SUBROUTINE cdninf(input,sym,noco,jspin,atoms,vacuum,sliceplot,banddos,ikpt,bkpt,wk,&
cell,kpts,nbands,eig,qal,qis,qvac,qvlay,qstars,jsym,ksym)
!***********************************************************************
! this subroutine calculates the charge distribution of each state
! and writes this information to the out file. If dos or vacdos
......@@ -31,6 +27,7 @@ CONTAINS
!
!***********************************************************************
USE m_types
USE m_constants
IMPLICIT NONE
TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_sliceplot),INTENT(IN) :: sliceplot
......@@ -75,7 +72,7 @@ CONTAINS
IF (input%film) THEN
WRITE (6,FMT=8000) (bkpt(i),i=1,3)
WRITE (oUnit,FMT=8000) (bkpt(i),i=1,3)
8000 FORMAT (/,3x,'q(atom,l): k=',3f10.5,/,/,t8,'e',t13,'max',t18,&
& 'int',t22,'vac',t28,'spheres(s,p,d,f)')
IF (banddos%dos) THEN
......@@ -87,7 +84,7 @@ CONTAINS
END IF
END IF
ELSE
WRITE (6,FMT=8010) (bkpt(i),i=1,3)
WRITE (oUnit,FMT=8010) (bkpt(i),i=1,3)
8010 FORMAT (/,3x,'q(atom,l): k=',3f10.5,/,/,t8,'e',t13,'max',t18,&
& 'int',t24,'spheres(s,p,d,f)')
IF (banddos%dos) THEN
......@@ -99,7 +96,7 @@ CONTAINS
DO iband = 1,nbands
IF (sliceplot%slice) THEN
WRITE (6,FMT=8030) iband,eig(iband)
WRITE (oUnit,FMT=8030) iband,eig(iband)
8030 FORMAT (' cdnval: slice for i=',i4,' and energy',1e12.4)
END IF
......@@ -131,7 +128,7 @@ CONTAINS
IF (noco%l_noco) qishlp = qis(iband,ikpt,jspin)
iqispc = NINT(qishlp*100.0)
IF (input%film) THEN
WRITE (6,FMT=8040) eig(iband),chstat(lqmax),itypqmax,&
WRITE (oUnit,FMT=8040) eig(iband),chstat(lqmax),itypqmax,&
& iqispc,iqvacpc, ((iqalpc(l,ityp),l=0,3),ityp=1,atoms%ntype)
8040 FORMAT (f10.4,2x,a1,i2,2x,2i3, (t26,6 (4i3,1x)))
IF (banddos%dos) THEN
......@@ -163,7 +160,7 @@ CONTAINS
END IF
! **************************************
ELSE
WRITE (6,FMT=8080) eig(iband),chstat(lqmax),itypqmax,&
WRITE (oUnit,FMT=8080) eig(iband),chstat(lqmax),itypqmax,&
& iqispc, ((iqalpc(l,ityp),l=0,3),ityp=1,atoms%ntype)
8080 FORMAT (f10.4,2x,a1,i2,2x,i3, (t26,6 (4i3,1x)))
IF (banddos%dos) THEN
......
......@@ -14,6 +14,7 @@ CONTAINS
SUBROUTINE doswrite(eig_id,kpts,atoms,vacuum,input,banddos,&
sliceplot,noco,sym,cell,dos,mcd,results,slab,orbcomp,jDOS,oneD)
USE m_types
USE m_constants
USE m_evaldos
USE m_cdninf
IMPLICIT NONE
......@@ -51,11 +52,11 @@ CONTAINS
IF (.NOT.(banddos%dos.OR.input%cdinf.OR.banddos%vacdos.OR.(vacuum%nstm.EQ.3))) RETURN
! check if settings in inp-file make any sense
IF (banddos%vacdos.AND..NOT.banddos%dos) THEN
WRITE(6,*) "STOP DOS: only set banddos%vacdos = .true. if banddos%dos=.true."
WRITE(oUnit,*) "STOP DOS: only set banddos%vacdos = .true. if banddos%dos=.true."
CALL juDFT_error("DOS",calledby ="doswrite")
ENDIF
IF (banddos%vacdos.AND.(.NOT.vacuum%starcoeff.AND.(vacuum%nstars.NE.1)))THEN
WRITE(6,*) "STOP DOS: if stars = f set vacuum%nstars=1"
WRITE(oUnit,*) "STOP DOS: if stars = f set vacuum%nstars=1"
CALL juDFT_error("DOS",calledby ="doswrite")
ENDIF
......
......@@ -19,6 +19,8 @@
! ntb=max(nevk)
!
!----------------------------------------------------------------------
USE m_types
USE m_constants
USE m_triang
USE m_maketetra
USE m_tetrados
......@@ -26,8 +28,6 @@
USE m_dosbin
USE m_ptdos
USE m_smooth
USE m_types
USE m_constants
USE m_cdn_io
IMPLICIT NONE
INTEGER,INTENT(IN) :: eig_id
......@@ -108,19 +108,19 @@
emax =max(banddos%e1_dos*hartree_to_ev_const,banddos%e2_dos*hartree_to_ev_const)
efermi = efermiarg*hartree_to_ev_const
WRITE (6,'(a)') 'DOS-Output is generated!'
WRITE (oUnit,'(a)') 'DOS-Output is generated!'
IF ( NINT((emax - emin)/sigma) > ned ) THEN
WRITE(6,*) 'sig_dos too small for DOS smoothing:'
WRITE(6,*) 'Reduce energy window or enlarge banddos%sig_dos!'
WRITE(6,*) 'For now: setting sigma to zero !'
WRITE(oUnit,*) 'sig_dos too small for DOS smoothing:'
WRITE(oUnit,*) 'Reduce energy window or enlarge banddos%sig_dos!'
WRITE(oUnit,*) 'For now: setting sigma to zero !'
sigma = 0.0
ENDIF
WRITE (6,*) 'sigma= ' , sigma
WRITE (6,*) 'emax= ' , emax
WRITE (6,*) 'emin= ' , emin
WRITE (6,*) 'ef_inp= ' , efermi
WRITE (oUnit,*) 'sigma= ' , sigma
WRITE (oUnit,*) 'emax= ' , emax
WRITE (oUnit,*) 'emin= ' , emin
WRITE (oUnit,*) 'ef_inp= ' , efermi
!
! create energy grid
emax = emax - efermi
......@@ -292,8 +292,8 @@
CALL make_tetra(kpts%nkpt,kpts%bk,ntria,itria,atr,&
ntetra,itetra,voltet)
ELSE
WRITE (6,*) 'no tetrahedron method with these k-points!'
WRITE (6,*) sym%nop2,as
WRITE (oUnit,*) 'no tetrahedron method with these k-points!'
WRITE (oUnit,*) sym%nop2,as
ENDIF
67 CONTINUE ! tetrahedron-information read or created
ENDIF
......
......@@ -15,7 +15,7 @@ MODULE m_grp_k
CONTAINS
SUBROUTINE grp_k(sym,mrot_k,cell,bk,nclass,nirr,char_table,&
& grpname,irrname,su,sp_alph,sp_beta)
grpname,irrname,su,sp_alph,sp_beta)
!************************************************************
!
......@@ -37,7 +37,7 @@ CONTAINS
! USE m_mrot2su
USE m_inv3
USE m_constants, ONLY : pi_const
USE m_constants
USE m_socsym, ONLY : soc_sym, cross
USE m_types
IMPLICIT NONE
......@@ -81,20 +81,15 @@ CONTAINS
error=.FALSE.
! Reduce the symmetry due to spin-orbit
IF (soc.AND.PRESENT(sp_alph)) THEN
CALL soc_sym(&
& sym%nop,sym%mrot,sp_beta,sp_alph,cell%amat,&
& error)!keep
CALL soc_sym(sym%nop,sym%mrot,sp_beta,sp_alph,cell%amat,error)!keep
ENDIF
! determine the group of k
nopk=0
ksymloop: DO n=1,sym%nop
ktest(1)=bk(1)-sym%mrot(1,1,n)*bk(1)-sym%mrot(2,1,n)*bk(2)&
& -sym%mrot(3,1,n)*bk(3)
ktest(2)=bk(2)-sym%mrot(1,2,n)*bk(1)-sym%mrot(2,2,n)*bk(2)&
& -sym%mrot(3,2,n)*bk(3)
ktest(3)=bk(3)-sym%mrot(1,3,n)*bk(1)-sym%mrot(2,3,n)*bk(2)&
& -sym%mrot(3,3,n)*bk(3)
ktest(1)=bk(1)-sym%mrot(1,1,n)*bk(1)-sym%mrot(2,1,n)*bk(2)-sym%mrot(3,1,n)*bk(3)
ktest(2)=bk(2)-sym%mrot(1,2,n)*bk(1)-sym%mrot(2,2,n)*bk(2)-sym%mrot(3,2,n)*bk(3)
ktest(3)=bk(3)-sym%mrot(1,3,n)*bk(1)-sym%mrot(2,3,n)*bk(2)-sym%mrot(3,3,n)*bk(3)
IF (( ABS( ktest(1) - NINT(ktest(1)) ) < eps ) .AND.&
& ( ABS( ktest(2) - NINT(ktest(2)) ) < eps ) .AND.&
& ( ABS( ktest(3) - NINT(ktest(3)) ) < eps ) .AND.&
......@@ -207,10 +202,10 @@ CONTAINS
mtest=MATMUL(det(c)*mrot_k(:,:,c),mtest)
ENDDO rotloop
IF (ANY((mtest-munit).NE.0)) THEN
WRITE(6,*) 'grp_k: Cannot find the order of rotation'
WRITE(oUnit,*) 'grp_k: Cannot find the order of rotation'
ENDIF
IF ((rot(5).GT.0).OR.(rot(11).GT.0)) THEN
WRITE(6,*) 'grp_k: 5 fold rotation found!'
WRITE(oUnit,*) 'grp_k: 5 fold rotation found!'
ENDIF
CALL euler(c,sym,cell,alpha,beta,gamma)
CALL rotaxis(alpha,beta,gamma,rax(1:4,c),theta(c))
......
......@@ -20,6 +20,7 @@ MODULE m_sympsi
CONTAINS
SUBROUTINE sympsi(lapw,jspin,sym,ne,cell,eig,noco, ksym,jsym,zMat)
USE m_constants
USE m_grp_k
USE m_inv3
USE m_types
......@@ -118,7 +119,7 @@ CONTAINS
CYCLE kloop
ENDIF
ENDDO
WRITE(6,*) 'Problem in symcheck, cannot find rotated kv for', k,lapw%k1(k,jspin),lapw%k2(k,jspin),lapw%k3(k,jspin)
WRITE(oUnit,*) 'Problem in symcheck, cannot find rotated kv for', k,lapw%k1(k,jspin),lapw%k2(k,jspin),lapw%k3(k,jspin)
CALL timestart("sympsi")
RETURN
ENDDO kloop
......
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