The Elk Code
 
Loading...
Searching...
No Matches
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
6pure subroutine dhmllolo(is,ias,ngp,ngpq,ld,dh)
7use modmain
8use modphonon
9implicit none
10! arguments
11integer, intent(in) :: is,ias
12integer, intent(in) :: ngp,ngpq
13integer, intent(in) :: ld
14complex(8), intent(out) :: dh(ld,*)
15! local variables
16integer ilo,jlo,i,j
17integer l0,l1,l2,l3
18integer lm1,lm3,lma,lmb
19complex(8) z1
20do jlo=1,nlorb(is)
21 l3=lorbl(jlo,is)
22 do lm3=l3**2+1,(l3+1)**2
23 j=ngp+idxlo(lm3,jlo,ias)
24 do ilo=1,nlorb(is)
25 l1=lorbl(ilo,is)
26 if (mod(l1+l3,2) == 0) then; l0=0; else; l0=1; end if
27 do lm1=l1**2+1,(l1+1)**2
28 i=ngpq+idxlo(lm1,ilo,ias)
29 z1=0.d0
30 do l2=l0,lmaxo,2
31 lma=l2**2+1; lmb=(l2+1)**2
32 z1=z1+sum(gntyyy(lma:lmb,lm3,lm1)*dhlolo(lma:lmb,jlo,ilo,ias))
33 end do
34 dh(i,j)=z1
35 end do
36 end do
37 end do
38end do
39end subroutine
40
pure subroutine dhmllolo(is, ias, ngp, ngpq, ld, dh)
Definition dhmllolo.f90:7
integer, dimension(:,:,:), allocatable idxlo
Definition modmain.f90:850
integer lmaxo
Definition modmain.f90:201
integer, dimension(maxspecies) nlorb
Definition modmain.f90:786
integer, dimension(maxlorb, maxspecies) lorbl
Definition modmain.f90:796
complex(8), dimension(:,:,:,:), allocatable dhlolo
real(8), dimension(:,:,:), allocatable gntyyy