The Elk Code
dhmllolo.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2013 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 dhmllolo(is,ias,ngp,ngpq,ld,dh)
7 use modmain
8 use modphonon
9 implicit none
10 ! arguments
11 integer, intent(in) :: is,ias,ngp,ngpq,ld
12 complex(8), intent(out) :: dh(ld,*)
13 ! local variables
14 integer ilo,jlo,i,j
15 integer l0,l1,l2,l3
16 integer lm1,lm3,lma,lmb
17 complex(8) z1
18 do jlo=1,nlorb(is)
19  l3=lorbl(jlo,is)
20  do lm3=l3**2+1,(l3+1)**2
21  j=ngp+idxlo(lm3,jlo,ias)
22  do ilo=1,nlorb(is)
23  l1=lorbl(ilo,is)
24  l0=merge(0,1,mod(l1+l3,2) == 0)
25  do lm1=l1**2+1,(l1+1)**2
26  i=ngpq+idxlo(lm1,ilo,ias)
27  z1=0.d0
28  do l2=l0,lmaxo,2
29  lma=l2**2+1; lmb=(l2+1)**2
30  z1=z1+sum(gntyyy(lma:lmb,lm3,lm1)*dhlolo(lma:lmb,jlo,ilo,ias))
31  end do
32  dh(i,j)=z1
33  end do
34  end do
35  end do
36 end do
37 end subroutine
38 
integer, dimension(maxspecies) nlorb
Definition: modmain.f90:784
integer, dimension(:,:,:), allocatable idxlo
Definition: modmain.f90:851
integer lmaxo
Definition: modmain.f90:201
real(8), dimension(:,:,:), allocatable gntyyy
Definition: modphonon.f90:126
pure subroutine dhmllolo(is, ias, ngp, ngpq, ld, dh)
Definition: dhmllolo.f90:7
integer, dimension(maxlorb, maxspecies) lorbl
Definition: modmain.f90:794
complex(8), dimension(:,:,:,:), allocatable dhlolo
Definition: modphonon.f90:124