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

Move coreSpectrumInput type to types.F90

parent abebe3fc
......@@ -6,6 +6,8 @@
module m_corespec
USE m_types
implicit none
! PARAMETERS
......@@ -34,21 +36,6 @@ module m_corespec
character(len=64), parameter :: csmsgsfs = fsb//",a,f8.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
logical :: l_cs
......@@ -59,7 +46,7 @@ module m_corespec
character(len=32) :: smeno
type (csitype) :: csi
type (t_coreSpecInput) :: csi
type csvtype
sequence
......
......@@ -144,7 +144,7 @@ MODULE m_corespec_eval
smeno = "corespec_rme"
if(itype.ne.csi%type) return
if(itype.ne.csi%atomType) return
write(*,'(/,a)') trim(smeno)//ssep
......@@ -393,7 +393,7 @@ MODULE m_corespec_eval
lmx = lx*(lx+2)
nen = csv%nen
nex = csv%nex
iatom = atoms%neq(csi%type)
iatom = atoms%neq(csi%atomType)
sigma = sqrt(2.d0)*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)
......@@ -424,7 +424,7 @@ MODULE m_corespec_eval
csv%dosb(2,1,lm1,lm1,iband) = dble(bcof(iband,lm1,iatom)*&
&conjg(acof(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 !!!!!
!!$ enddo
!!$ enddo
......
......@@ -36,7 +36,7 @@ MODULE m_corespec_io
! initialization of input parameters: type csi
csi%verb = 1
csi%type = 0
csi%atomType = 0
csi%edge = ""
csi%edgeidx = 0
csi%lx = -1
......@@ -72,15 +72,15 @@ MODULE m_corespec_io
! unit conversion if necessary
! if csi%verb = 1, detailed information is written to stdout
! csi%type
if(csi%type.le.0) then
write(*,csmsgs) trim(smeno),"found csi%type <= 0 !"//csmsgerr ; stop
! csi%atomType
if(csi%atomType.le.0) then
write(*,csmsgs) trim(smeno),"found csi%atomType <= 0 !"//csmsgerr ; stop
endif
if(csi%type.gt.atoms%ntype) then
write(*,csmsgs) trim(smeno),"found csi%type > atoms%ntype!"//csmsgerr ; stop
if(csi%atomType.gt.atoms%ntype) then
write(*,csmsgs) trim(smeno),"found csi%atomType > atoms%ntype!"//csmsgerr ; stop
endif
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
csv%nc = 0
......@@ -106,9 +106,9 @@ MODULE m_corespec_io
write(*,csmsgs) trim(smeno),&
&"found more than 2*csv%nc-1 of csi%edgeidx > 0 !"//csmsgerr ; stop
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),&
&"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
endif
csv%nljc = count(csi%edgeidx.gt.0)
......@@ -122,9 +122,9 @@ MODULE m_corespec_io
if(csi%lx.lt.0) then
write(*,csmsgs) trim(smeno),"found csi%lx < 0 !"//csmsgerr ; stop
endif
if(csi%lx.gt.atoms%lmax(csi%type)) then
if(csi%lx.gt.atoms%lmax(csi%atomType)) then
write(*,csmsgs) trim(smeno),&
&"found csi%lx > atoms%lmax(csi%type)!"//csmsgerr ; stop
&"found csi%lx > atoms%lmax(csi%atomType)!"//csmsgerr ; stop
endif
if(csi%verb.eq.1) write(*,csmsgsis) trim(smeno),&
&"maximum l: ","csi%lx = ",csi%lx,"will be used"
......
......@@ -757,10 +757,20 @@ MODULE m_types
COMPLEX, ALLOCATABLE :: a_c(:), b_c(:)
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 t_wann
INTEGER :: wan90version
INTEGER :: oc_num_orbs
......
&csinp
csi%verb = 1
csi%type = 1
csi%atomType = 1
csi%edge = 'L'
csi%edgeidx = 3
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