Commit 549f89f9 authored by Gregor Michalicek's avatar Gregor Michalicek

Move coreSpectrumInput type to types.F90

parent abebe3fc
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
module m_corespec module m_corespec
USE m_types
implicit none implicit none
! PARAMETERS ! PARAMETERS
...@@ -34,21 +36,6 @@ module m_corespec ...@@ -34,21 +36,6 @@ module m_corespec
character(len=64), parameter :: csmsgsfs = fsb//",a,f8.3,"//fse character(len=64), parameter :: csmsgsfs = fsb//",a,f8.3,"//fse
character(len=64), parameter :: csmsgses = fsb//",a,es12.3,"//fse character(len=64), parameter :: csmsgses = fsb//",a,es12.3,"//fse
! INPUT PARAMETERS
type csitype
sequence
integer :: verb ! output verbosity
integer :: type ! atomic type used for calculation of core spectra
character(len=1) :: edge ! edge character (K,L,M,N,O,P)
integer :: edgeidx(11) ! l-j edges
integer :: lx ! maximum lmax considered in spectra calculation
real :: ek0 ! kinetic energy of incoming electrons
real :: emn ! energy spectrum lower bound
real :: emx ! energy spectrum upper bound
real :: ein ! energy spectrum increment
end type csitype
! VARIABLES ! VARIABLES
logical :: l_cs logical :: l_cs
...@@ -59,7 +46,7 @@ module m_corespec ...@@ -59,7 +46,7 @@ module m_corespec
character(len=32) :: smeno character(len=32) :: smeno
type (csitype) :: csi type (t_coreSpecInput) :: csi
type csvtype type csvtype
sequence sequence
......
...@@ -144,7 +144,7 @@ MODULE m_corespec_eval ...@@ -144,7 +144,7 @@ MODULE m_corespec_eval
smeno = "corespec_rme" smeno = "corespec_rme"
if(itype.ne.csi%type) return if(itype.ne.csi%atomType) return
write(*,'(/,a)') trim(smeno)//ssep write(*,'(/,a)') trim(smeno)//ssep
...@@ -393,7 +393,7 @@ MODULE m_corespec_eval ...@@ -393,7 +393,7 @@ MODULE m_corespec_eval
lmx = lx*(lx+2) lmx = lx*(lx+2)
nen = csv%nen nen = csv%nen
nex = csv%nex nex = csv%nex
iatom = atoms%neq(csi%type) iatom = atoms%neq(csi%atomType)
sigma = sqrt(2.d0)*sig_dos*hartree_to_ev_const sigma = sqrt(2.d0)*sig_dos*hartree_to_ev_const
sigma = sig_dos*hartree_to_ev_const sigma = sig_dos*hartree_to_ev_const
eigos(1:noccbd) = (eig(1:noccbd)-efermi)*hartree_to_ev_const/dble(sigma) eigos(1:noccbd) = (eig(1:noccbd)-efermi)*hartree_to_ev_const/dble(sigma)
...@@ -424,7 +424,7 @@ MODULE m_corespec_eval ...@@ -424,7 +424,7 @@ MODULE m_corespec_eval
csv%dosb(2,1,lm1,lm1,iband) = dble(bcof(iband,lm1,iatom)*& csv%dosb(2,1,lm1,lm1,iband) = dble(bcof(iband,lm1,iatom)*&
&conjg(acof(iband,lm1,iatom))) &conjg(acof(iband,lm1,iatom)))
csv%dosb(2,2,lm1,lm1,iband) = dble(bcof(iband,lm1,iatom)*& csv%dosb(2,2,lm1,lm1,iband) = dble(bcof(iband,lm1,iatom)*&
&conjg(bcof(iband,lm1,iatom)))*we(1)*usdus%ddn(l1,csi%type,ispin) &conjg(bcof(iband,lm1,iatom)))*we(1)*usdus%ddn(l1,csi%atomType,ispin)
!!!!! this has to be checked: is >> ddn << factor necessary !!!!! !!!!! this has to be checked: is >> ddn << factor necessary !!!!!
!!$ enddo !!$ enddo
!!$ enddo !!$ enddo
......
...@@ -36,7 +36,7 @@ MODULE m_corespec_io ...@@ -36,7 +36,7 @@ MODULE m_corespec_io
! initialization of input parameters: type csi ! initialization of input parameters: type csi
csi%verb = 1 csi%verb = 1
csi%type = 0 csi%atomType = 0
csi%edge = "" csi%edge = ""
csi%edgeidx = 0 csi%edgeidx = 0
csi%lx = -1 csi%lx = -1
...@@ -72,15 +72,15 @@ MODULE m_corespec_io ...@@ -72,15 +72,15 @@ MODULE m_corespec_io
! unit conversion if necessary ! unit conversion if necessary
! if csi%verb = 1, detailed information is written to stdout ! if csi%verb = 1, detailed information is written to stdout
! csi%type ! csi%atomType
if(csi%type.le.0) then if(csi%atomType.le.0) then
write(*,csmsgs) trim(smeno),"found csi%type <= 0 !"//csmsgerr ; stop write(*,csmsgs) trim(smeno),"found csi%atomType <= 0 !"//csmsgerr ; stop
endif endif
if(csi%type.gt.atoms%ntype) then if(csi%atomType.gt.atoms%ntype) then
write(*,csmsgs) trim(smeno),"found csi%type > atoms%ntype!"//csmsgerr ; stop write(*,csmsgs) trim(smeno),"found csi%atomType > atoms%ntype!"//csmsgerr ; stop
endif endif
if(csi%verb.eq.1) write(*,csmsgsis) trim(smeno),& if(csi%verb.eq.1) write(*,csmsgsis) trim(smeno),&
&"atomic type: ","csi%type = ",csi%type,"will be used" &"atomic type: ","csi%atomType = ",csi%atomType,"will be used"
! csi%edge -> csv%nc ! csi%edge -> csv%nc
csv%nc = 0 csv%nc = 0
...@@ -106,9 +106,9 @@ MODULE m_corespec_io ...@@ -106,9 +106,9 @@ MODULE m_corespec_io
write(*,csmsgs) trim(smeno),& write(*,csmsgs) trim(smeno),&
&"found more than 2*csv%nc-1 of csi%edgeidx > 0 !"//csmsgerr ; stop &"found more than 2*csv%nc-1 of csi%edgeidx > 0 !"//csmsgerr ; stop
endif endif
if((csv%nc-1)**2+maxval(csi%edgeidx).gt.atoms%ncst(csi%type)) then if((csv%nc-1)**2+maxval(csi%edgeidx).gt.atoms%ncst(csi%atomType)) then
write(*,csmsgs) trim(smeno),& write(*,csmsgs) trim(smeno),&
&"found (csv%nc-1)^2+maxval(csi%edgeidx) > atoms%ncst(csi%type)!"//csmsgerr &"found (csv%nc-1)^2+maxval(csi%edgeidx) > atoms%ncst(csi%atomType)!"//csmsgerr
stop stop
endif endif
csv%nljc = count(csi%edgeidx.gt.0) csv%nljc = count(csi%edgeidx.gt.0)
...@@ -122,9 +122,9 @@ MODULE m_corespec_io ...@@ -122,9 +122,9 @@ MODULE m_corespec_io
if(csi%lx.lt.0) then if(csi%lx.lt.0) then
write(*,csmsgs) trim(smeno),"found csi%lx < 0 !"//csmsgerr ; stop write(*,csmsgs) trim(smeno),"found csi%lx < 0 !"//csmsgerr ; stop
endif endif
if(csi%lx.gt.atoms%lmax(csi%type)) then if(csi%lx.gt.atoms%lmax(csi%atomType)) then
write(*,csmsgs) trim(smeno),& write(*,csmsgs) trim(smeno),&
&"found csi%lx > atoms%lmax(csi%type)!"//csmsgerr ; stop &"found csi%lx > atoms%lmax(csi%atomType)!"//csmsgerr ; stop
endif endif
if(csi%verb.eq.1) write(*,csmsgsis) trim(smeno),& if(csi%verb.eq.1) write(*,csmsgsis) trim(smeno),&
&"maximum l: ","csi%lx = ",csi%lx,"will be used" &"maximum l: ","csi%lx = ",csi%lx,"will be used"
......
...@@ -757,10 +757,20 @@ MODULE m_types ...@@ -757,10 +757,20 @@ MODULE m_types
COMPLEX, ALLOCATABLE :: a_c(:), b_c(:) COMPLEX, ALLOCATABLE :: a_c(:), b_c(:)
END TYPE t_hamOvlp END TYPE t_hamOvlp
! type for the input to the calculation of the core spectrum (EELS)
TYPE t_coreSpecInput
integer :: verb ! output verbosity
integer :: atomType ! atomic type used for calculation of core spectra
character(LEN=1) :: edge ! edge character (K,L,M,N,O,P)
integer :: edgeidx(11) ! l-j edges
integer :: lx ! maximum lmax considered in spectra calculation
real :: ek0 ! kinetic energy of incoming electrons
real :: emn ! energy spectrum lower bound
real :: emx ! energy spectrum upper bound
real :: ein ! energy spectrum increment
END TYPE t_coreSpecInput
!
! type for wannier-functions ! type for wannier-functions
!
TYPE t_wann TYPE t_wann
INTEGER :: wan90version INTEGER :: wan90version
INTEGER :: oc_num_orbs INTEGER :: oc_num_orbs
......
&csinp &csinp
csi%verb = 1 csi%verb = 1
csi%type = 1 csi%atomType = 1
csi%edge = 'L' csi%edge = 'L'
csi%edgeidx = 3 csi%edgeidx = 3
csi%lx = 2 csi%lx = 2
......
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