17real(8),
allocatable :: xj(:,:)
18complex(8),
allocatable :: dmat(:,:,:,:,:)
42 open(50,file=
'LSJ.OUT',form=
'FORMATTED',action=
'WRITE')
44 write(50,
'("Expectation values are computed only over the muffin-tin")')
48 write(50,
'("Species : ",I4," (",A,")")') is,trim(
spsymb(is))
52 call dmatls(dmat(:,:,:,:,ias),xl,xs)
55 write(50,
'(" atom : ",I4)') ia
56 write(50,
'(" L : ",3G18.10)') xl(:)
57 write(50,
'(" S : ",3G18.10)') xs(:)
58 write(50,
'(" J : ",3G18.10)') xj(:,ias)
64 write(*,
'("Info(writelsj):")')
65 write(*,
'(" muffin-tin L, S and J expectation values written to LSJ.OUT")')
68 call writetest(15,
'total muffin-tin angular momentum',nv=3*
natmtot,tol=1.d-3,&
73 open(50,file=
'LSJ_KST.OUT',form=
'FORMATTED',action=
'WRITE')
75 write(50,
'("Expectation values are computed only over the muffin-tin")')
80 if ((ik < 1).or.(ik >
nkpt))
then
82 write(*,
'("Error(writelsj): k-point out of range : ",I8)') ik
86 if ((ist < 1).or.(ist >
nstsv))
then
88 write(*,
'("Error(writelsj): state out of range : ",I8)') ist
106 call dmatls(dmat(:,:,:,:,ias),xl,xs)
108 xj(:,ias)=xl(:)+xs(:)
110 write(50,
'("k-point : ",I6,3G18.10)') ik,
vkl(:,ik)
111 write(50,
'("state : ",I6)') ist
112 write(50,
'("species : ",I4," (",A,"), atom : ",I4)') is, &
114 write(50,
'(" L : ",3G18.10)') xl(:)
115 write(50,
'(" S : ",3G18.10)') xs(:)
116 write(50,
'(" J : ",3G18.10)') xj(:,ias)
124 write(*,
'("Info(writelsj):")')
125 write(*,
'(" muffin-tin L, S and J expectation values for each k-point and &
127 write(*,
'(" in kstlist written to LSJ_KST.OUT")')
130 call writetest(16,
'muffin-tin angular momentum for one state',nv=3*
natmtot, &
subroutine dmatls(dmat, xl, xs)
subroutine gendmat(tspndg, tlmdg, lmin, lmax, ld, dmat)
subroutine getoccsv(fext, ikp, vpl, occsvp)
real(8), dimension(:), allocatable wkpt
integer, dimension(maxspecies) natoms
integer, dimension(maxatoms, maxspecies) idxas
character(64), dimension(maxspecies) spsymb
real(8), dimension(:,:), allocatable vkl
logical, dimension(:,:,:), allocatable eqatoms
real(8), dimension(:,:), allocatable occsv
integer, dimension(2, maxkst) kstlist
subroutine writetest(id, descr, nv, iv, iva, tol, rv, rva, zv, zva)