The Elk Code
findqpt.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2010 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine findqpt(vpl,isym,iq)
7 use modmain
8 implicit none
9 ! arguments
10 real(8), intent(in) :: vpl(3)
11 integer, intent(out) :: isym,iq
12 ! local variables
13 integer i1,i2,i3,lspl
14 real(8) v1(3),v2(3),t1
15 i1=modulo(nint(vpl(1)*ngridq(1)),ngridq(1))
16 i2=modulo(nint(vpl(2)*ngridq(2)),ngridq(2))
17 i3=modulo(nint(vpl(3)*ngridq(3)),ngridq(3))
18 iq=ivqiq(i1,i2,i3)
19 v1(1:3)=vql(1:3,iq)
20 call r3frac(epslat,v1)
21 ! find the symmetry which rotates vql to vpl
22 do isym=1,nsymcrys
23  lspl=lsplsymc(isym)
24 ! multiply vpl by the transpose of the symmetry matrix (i.e. the inverse)
25  v2(1:3)=symlat(1,1:3,lspl)*vpl(1) &
26  +symlat(2,1:3,lspl)*vpl(2) &
27  +symlat(3,1:3,lspl)*vpl(3)
28  call r3frac(epslat,v2)
29  t1=abs(v1(1)-v2(1))+abs(v1(2)-v2(2))+abs(v1(3)-v2(3))
30  if (t1 < epslat) return
31 end do
32 write(*,*)
33 write(*,'("Error(findqpt): equivalent q-point not in set")')
34 write(*,'(" Requested q-point : ",3G18.10)') vpl
35 write(*,*)
36 stop
37 end subroutine
38 
integer nsymcrys
Definition: modmain.f90:358
integer, dimension(3, 3, 48) symlat
Definition: modmain.f90:344
integer, dimension(maxsymcrys) lsplsymc
Definition: modmain.f90:364
subroutine findqpt(vpl, isym, iq)
Definition: findqpt.f90:7
real(8), dimension(:,:), allocatable vql
Definition: modmain.f90:545
pure subroutine r3frac(eps, v)
Definition: r3frac.f90:10
integer, dimension(:,:,:), allocatable ivqiq
Definition: modmain.f90:531
integer, dimension(3) ngridq
Definition: modmain.f90:515
real(8) epslat
Definition: modmain.f90:24