6 subroutine getwfpw(vpl,vhpl,wfpw)
11 real(8),
intent(in) :: vpl(3)
12 real(8),
intent(in) :: vhpl(3,nhkmax,nspnfv)
13 complex(8),
intent(out) :: wfpw(nhkmax,nspinor,nstsv)
15 integer isym,lspl,ilspl,lspn
16 integer ik,ist,ihk,ihp,jhp,ig
17 integer ispn0,ispn1,jspn,i
18 integer recl,nhkmax_,nspinor_,nstsv_
19 real(8) vkl_(3),si(3,3)
20 real(8) v(3),det,th,t1
21 complex(8) su2(2,2),z1,z2
25 complex(8),
allocatable :: wfpw_(:,:,:)
31 inquire(iolength=recl) vkl_,nhkmax_,nspinor_,nstsv_,wfpw
33 open(270,file=
'WFPW.OUT',form=
'UNFORMATTED',access=
'DIRECT',recl=recl)
34 read(270,rec=ik) vkl_,nhkmax_,nspinor_,nstsv_,wfpw
37 t1=abs(
vkl(1,ik)-vkl_(1))+abs(
vkl(2,ik)-vkl_(2))+abs(
vkl(3,ik)-vkl_(3))
40 write(*,
'("Error(getwfpw): differing vectors for k-point ",I8)') ik
41 write(*,
'(" current : ",3G18.10)')
vkl(:,ik)
42 write(*,
'(" WFPW.OUT : ",3G18.10)') vkl_
46 if (nhkmax /= nhkmax_)
then 48 write(*,
'("Error(getwfpw): differing nhkmax for k-point ",I8)') ik
49 write(*,
'(" current : ",I8)') nhkmax
50 write(*,
'(" WFPW.OUT : ",I8)') nhkmax_
54 if (nspinor /= nspinor_)
then 56 write(*,
'("Error(getwfpw): differing nspinor for k-point ",I8)') ik
57 write(*,
'(" current : ",I8)') nspinor
58 write(*,
'(" WFPW.OUT : ",I8)') nspinor_
62 if (nstsv /= nstsv_)
then 64 write(*,
'("Error(getwfpw): differing nstsv for k-point ",I8)') ik
65 write(*,
'(" current : ",I8)') nstsv
66 write(*,
'(" WFPW.OUT : ",I8)') nstsv_
71 t1=abs(vpl(1)-
vkl(1,ik))+abs(vpl(2)-
vkl(2,ik))+abs(vpl(3)-
vkl(3,ik))
77 allocate(wfpw_(nhkmax,nspinor,nstsv))
80 si(:,:)=dble(
symlat(:,:,ilspl))
84 ispn0=jspn; ispn1=jspn
86 ispn0=1; ispn1=nspinor
92 wfpw_(ihk,ispn0:ispn1,:)=wfpw(ihk,ispn0:ispn1,:)
99 t1=
vgc(1,ig)*v(1)+
vgc(2,ig)*v(2)+
vgc(3,ig)*v(3)
100 z1=cmplx(cos(t1),-sin(t1),8)
101 wfpw_(ihk,ispn0:ispn1,:)=z1*wfpw(ihk,ispn0:ispn1,:)
105 done(1:
nhk(jspn,ik))=.false.
107 do ihk=1,
nhk(jspn,ik)
109 do ihp=i,
nhk(jspn,ik)
111 t1=abs(v(1)-vhpl(1,ihp,jspn)) &
112 +abs(v(2)-vhpl(2,ihp,jspn)) &
113 +abs(v(3)-vhpl(3,ihp,jspn))
115 wfpw(ihp,ispn0:ispn1,:)=wfpw_(ihk,ispn0:ispn1,:)
120 do ihp=i,
nhk(jspn,ik)
121 if (.not.done(ihp))
then 133 if (lspn == 1)
return 143 v(:)=vhpl(:,ihp,1)-
vqlss(:)
145 t1=abs(v(1)-vhpl(1,jhp,2)) &
146 +abs(v(2)-vhpl(2,jhp,2)) &
147 +abs(v(3)-vhpl(3,jhp,2))
152 wfpw(ihp,1,ist)=su2(1,1)*z1+su2(1,2)*z2
153 wfpw(jhp,2,ist)=su2(2,1)*z1+su2(2,2)*z2
168 wfpw(ihp,1,ist)=su2(1,1)*z1+su2(1,2)*z2
169 wfpw(ihp,2,ist)=su2(2,1)*z1+su2(2,2)*z2
pure subroutine r3mtv(a, x, y)
integer, dimension(maxsymcrys) lspnsymc
subroutine rotaxang(eps, rot, det, v, th)
integer, dimension(48) isymlat
integer, dimension(3, 3, 48) symlat
integer, dimension(:,:,:), allocatable ihkig
real(8), dimension(3) vqlss
logical, dimension(maxsymcrys) tv0symc
real(8), dimension(:,:), allocatable vgc
integer, dimension(:,:), allocatable nhk
integer, dimension(maxsymcrys) lsplsymc
real(8), dimension(3, 3, 48) symlatc
pure subroutine axangsu2(v, th, su2)
real(8), dimension(:,:), allocatable vkl
subroutine getwfpw(vpl, vhpl, wfpw)
real(8), dimension(:,:,:,:), allocatable vhkl
subroutine findkpt(vpl, isym, ik)
real(8), dimension(3, maxsymcrys) vtcsymc