2003-01-20 05:58:50 +08:00
|
|
|
!
|
|
|
|
! Copyright (C) 2001 PWSCF group
|
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!-----------------------------------------------------------------------
|
2003-02-08 00:04:36 +08:00
|
|
|
subroutine setqmod (ngm, xq, g, qmod, qpg)
|
2003-01-20 05:58:50 +08:00
|
|
|
!-----------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
! this subroutine puts in qmod the modulus of q+G for the interpolati
|
|
|
|
! table used to compute qgm
|
|
|
|
!
|
|
|
|
!
|
2004-01-23 23:08:03 +08:00
|
|
|
USE kinds, only : DP
|
2003-02-08 00:04:36 +08:00
|
|
|
implicit none
|
2003-01-20 05:58:50 +08:00
|
|
|
|
2003-02-08 00:04:36 +08:00
|
|
|
integer :: ngm
|
2003-01-20 05:58:50 +08:00
|
|
|
! input: the number of G vectors
|
|
|
|
|
|
|
|
|
2003-02-08 00:04:36 +08:00
|
|
|
real(kind=DP) :: xq (3), g (3, ngm), qmod (ngm), qpg (3, ngm)
|
2003-01-20 05:58:50 +08:00
|
|
|
! input: the q vector
|
|
|
|
! input: the G vectors
|
|
|
|
! output: the modulus of the G vectors
|
|
|
|
! output: the q+G vectors
|
|
|
|
|
2003-02-08 00:04:36 +08:00
|
|
|
integer :: ig
|
2003-01-20 05:58:50 +08:00
|
|
|
! counter on G vectors
|
2003-02-08 00:04:36 +08:00
|
|
|
do ig = 1, ngm
|
|
|
|
qpg (1, ig) = xq (1) + g (1, ig)
|
|
|
|
qpg (2, ig) = xq (2) + g (2, ig)
|
|
|
|
qpg (3, ig) = xq (3) + g (3, ig)
|
|
|
|
qmod (ig) = qpg (1, ig) **2 + qpg (2, ig) **2 + qpg (3, ig) **2
|
2003-01-20 05:58:50 +08:00
|
|
|
enddo
|
2003-02-08 00:04:36 +08:00
|
|
|
return
|
2003-01-20 05:58:50 +08:00
|
|
|
end subroutine setqmod
|