File: dnonloccorr.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 (42 lines) | stat: -rw-r--r-- 1,377 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
42
!
! Copyright (C) 2001-2016 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 .
!
!--------------------------------------------------------------------
SUBROUTINE dnonloccorr( rho, drho, xq, dvaux )
  !------------------------------------------------------------------
  !
  USE kinds,            ONLY : DP
  USE noncollin_module, ONLY : nspin_mag
  USE fft_base,         ONLY : dfftp
  USE funct,            ONLY : dft_is_gradient, dft_is_nonlocc, get_inlc
  USE ph_vdW_DF,        ONLY : dv_drho_vdwdf
  USE ph_rVV10,         ONLY : dv_drho_rvv10
  !
  implicit none
  !
  real(DP),    INTENT(IN)    :: rho (dfftp%nnr, nspin_mag), xq(3)
  complex(DP), INTENT(IN)    :: drho (dfftp%nnr, nspin_mag)
  complex(DP), INTENT(INOUT) :: dvaux (dfftp%nnr, nspin_mag)
  complex(DP), ALLOCATABLE   :: dvnonloc(:,:)
  integer                    :: inlc


  allocate( dvnonloc(dfftp%nnr, nspin_mag) )
  dvnonloc(:,:) = (0.D0,0.D0)
  inlc = get_inlc()

  IF ( inlc > 0 .AND. inlc < 26 ) THEN
     CALL dv_drho_vdwdf(rho, drho, nspin_mag, xq, dvnonloc)
  ELSEIF ( inlc == 26) THEN
     CALL dv_drho_rvv10(rho, drho, nspin_mag, xq, dvnonloc)
  ENDIF

  dvaux = dvaux + dvnonloc

  DEALLOCATE( dvnonloc )
 
END SUBROUTINE dnonloccorr