The Elk Code
Loading...
Searching...
No Matches
gwtails.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2018 A. Davydov, 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
!BOP
7
! !ROUTINE: gwtails
8
! !INTERFACE:
9
pure
complex(8)
function
gwtails
(ge)
10
! !USES:
11
use
modmain
12
use
modgw
13
! !INPUT/OUTPUT PARAMETERS:
14
! ge : Green's function at the Matsubara end points (in,complex(4))
15
! !DESCRIPTION:
16
! Sums the tails of the Green's function over the Matsubara frequencies as
17
! part of the evaluation of the density matrix. Thus if the Green's function
18
! $G(ij{\bf k},\omega_n)$ has been determined numerically over all Fermionic
19
! Matsubara frequencies up to $\pm \omega_{N_{\rm F}}$, then the density
20
! matrix is approximated by
21
! $$ \gamma_{ij{\bf k}}=\frac{1}{\beta}\sum_{n\;{\rm odd}}^{\pm N_{\rm F}}
22
! \left[G(ij{\bf k},\omega_n)+\frac{a_2}{\omega_n^2}
23
! -\frac{a_4}{\omega_n^4}\right]+\frac{1}{\beta}\left[\frac{\beta}{2}a_1
24
! -\frac{\beta^2}{4}a_2+\frac{\beta^4}{48}a_4\right], $$
25
! where $a_1$, $a_2$ and $a_4$ are chosen so that the Green's function is
26
! equal to
27
! $$ g(z)=\frac{a_1}{z}+\frac{a_2}{z^2}+\frac{a_3}{z^3}+\frac{a_4}{z^4} $$
28
! at the points $n\in \{-n_{\rm F}, -n_{\rm F}+2, n_{\rm F}-2, n_{\rm F}\}$.
29
!
30
! !REVISION HISTORY:
31
! Created April 2018 (A. Davydov)
32
! Increased Laurent series order to 4, December 2023 (JKD)
33
!EOP
34
!BOC
35
implicit none
36
! arguments
37
complex(8)
,
intent(in)
:: ge(4)
38
! local variables
39
integer
iw
40
real
(8) sm2,sm4,t1,t2,t3
41
real
(8) c2,c3,c4,d2,d3,d4
42
complex(8)
a1,a2,a4,z1,z2
43
! π / β
44
t1=
pi
*
kboltz
*
tempk
45
t2=1.d0/(8.d0*dble(
nwfm
-1))
46
t3=dble(
nwfm
)
47
c2=t3**2
48
c3=c2*t3
49
c4=c3*t3
50
t3=dble(
nwfm
-2)
51
d2=t3**2
52
d3=d2*t3
53
d4=d3*t3
54
! determine the coefficients a1, a2 and a4
55
a1=(d3*(ge(2)-ge(3))+c3*(ge(4)-ge(1)))*t1*t2
56
a1=
zi
*a1
57
z1=ge(2)+ge(3)
58
z2=ge(1)+ge(4)
59
t3=t1**2
60
a2=(d4*z1-c4*z2)*t3*t2
61
t3=t3**2
62
a4=(d2*z1-c2*z2)*c2*d2*t3*t2
63
! evaluate the sums analytically over all Matsubara frequencies
64
t1=1.d0/(2.d0*
kboltz
*
tempk
)
65
t2=t1**2
66
gwtails
=a1*t1-a2*t2+a4*(t2**2)/3.d0
67
! remove the contributions over the finite set of frequencies
68
sm2=0.d0
69
sm4=0.d0
70
do
iw=0,
nwfm
71
t1=aimag(
wfm
(iw))**2
72
sm2=sm2+1.d0/t1
73
sm4=sm4+1.d0/t1**2
74
end do
75
gwtails
=
gwtails
+sm2*a2-sm4*a4
76
end function
77
!EOC
78
gwtails
pure complex(8) function gwtails(ge)
Definition
gwtails.f90:10
modgw
Definition
modgw.f90:6
modgw::wfm
complex(8), dimension(:), allocatable wfm
Definition
modgw.f90:25
modgw::nwfm
integer nwfm
Definition
modgw.f90:19
modmain
Definition
modmain.f90:6
modmain::pi
real(8), parameter pi
Definition
modmain.f90:1229
modmain::zi
complex(8), parameter zi
Definition
modmain.f90:1239
modmain::kboltz
real(8), parameter kboltz
Definition
modmain.f90:1262
modmain::tempk
real(8) tempk
Definition
modmain.f90:684
gwtails.f90
Generated by
1.9.8