The Elk Code
dmatch.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2012 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 pure subroutine dmatch(ias,ip,ngp,vgpc,apwalm,dapwalm)
7 use modmain
8 implicit none
9 ! arguments
10 integer, intent(in) :: ias,ip,ngp
11 real(8), intent(in) :: vgpc(3,ngkmax)
12 complex(8), intent(in) :: apwalm(ngkmax,apwordmax,lmmaxapw,natmtot)
13 complex(8), intent(out) :: dapwalm(ngkmax,apwordmax,lmmaxapw)
14 ! local variables
15 integer is,l,lm,io
16 ! take derivative with respect to atomic displacement
17 is=idxis(ias)
18 do l=0,lmaxapw
19  do lm=l**2+1,(l+1)**2
20  do io=1,apword(l,is)
21  dapwalm(1:ngp,io,lm)=vgpc(ip,1:ngp)*zi*apwalm(1:ngp,io,lm,ias)
22  end do
23  end do
24 end do
25 end subroutine
26 
integer lmmaxapw
Definition: modmain.f90:199
integer ngkmax
Definition: modmain.f90:499
integer lmaxapw
Definition: modmain.f90:197
integer, dimension(0:maxlapw, maxspecies) apword
Definition: modmain.f90:758
integer apwordmax
Definition: modmain.f90:760
integer, dimension(maxatoms *maxspecies) idxis
Definition: modmain.f90:44
complex(8), parameter zi
Definition: modmain.f90:1240
integer natmtot
Definition: modmain.f90:40
pure subroutine dmatch(ias, ip, ngp, vgpc, apwalm, dapwalm)
Definition: dmatch.f90:7