The Elk Code
gensmatk.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2019 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 subroutine gensmatk(evecsv,smat)
7 use modmain
8 implicit none
9 ! arguments
10 complex(8), intent(in) :: evecsv(nstsv,nstsv)
11 complex(8), intent(out) :: smat(nstsv,nstsv,2,2)
12 ! local variables
13 integer ist,jst,i
14 ! external functions
15 complex(8), external :: zdotc
16 i=nstfv+1
17 do jst=1,nstsv
18  do ist=1,jst
19  smat(ist,jst,1,1)=zdotc(nstfv,evecsv(1,ist),1,evecsv(1,jst),1)
20  smat(ist,jst,2,1)=zdotc(nstfv,evecsv(i,ist),1,evecsv(1,jst),1)
21  smat(ist,jst,1,2)=zdotc(nstfv,evecsv(1,ist),1,evecsv(i,jst),1)
22  smat(ist,jst,2,2)=zdotc(nstfv,evecsv(i,ist),1,evecsv(i,jst),1)
23  end do
24 end do
25 ! set the lower triangular parts
26 do jst=1,nstsv
27  do ist=1,jst-1
28  smat(jst,ist,1,1)=conjg(smat(ist,jst,1,1))
29  smat(jst,ist,2,1)=conjg(smat(ist,jst,1,2))
30  smat(jst,ist,1,2)=conjg(smat(ist,jst,2,1))
31  smat(jst,ist,2,2)=conjg(smat(ist,jst,2,2))
32  end do
33 end do
34 end subroutine
35 
subroutine gensmatk(evecsv, smat)
Definition: gensmatk.f90:7
integer nstfv
Definition: modmain.f90:887