The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine gensmatk(evecsv,smat)
7use modmain
8implicit none
9! arguments
10complex(8), intent(in) :: evecsv(nstsv,nstsv)
11complex(8), intent(out) :: smat(nstsv,nstsv,2,2)
12! local variables
13integer ist,jst,i
14! external functions
15complex(8), external :: zdotc
16i=nstfv+1
17do 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
24end do
25! set the lower triangular parts
26do 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
33end do
34end subroutine
35
subroutine gensmatk(evecsv, smat)
Definition gensmatk.f90:7
integer nstfv
Definition modmain.f90:884