File: setqmod.f90

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (41 lines) | stat: -rw-r--r-- 1,130 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
!
! Copyright (C) 2001-2018 Quantum ESPRESSO 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 .
!
!
!-----------------------------------------------------------------------
SUBROUTINE setqmod (ngm, xq, g, qmod, qpg)
  !-----------------------------------------------------------------------
  !
  ! This subroutine puts in qmod the modulus of q+G for the interpolation
  ! table used to compute qgm
  !
  USE kinds, ONLY : DP
  ! 
  IMPLICIT NONE
  !
  INTEGER :: ngm
  ! input: the number of G vectors

  REAL(DP) :: xq (3), g (3, ngm), qmod (ngm), qpg (3, ngm)
  ! input: the q vector
  ! input: the G vectors
  ! output: the modulus of the G vectors
  ! output: the q+G vectors

  INTEGER :: ig
  ! counter on G vectors
  ! 
  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
  ENDDO
  !
  RETURN
  !
END SUBROUTINE setqmod