-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFree_Green_k.py
199 lines (143 loc) · 5.79 KB
/
Free_Green_k.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 21 12:06:24 2021
@author: cristina
"""
import numpy as np
import cmath
# Functions
pi = np.pi
sqrt = np.sqrt
exp = np.exp
log = cmath.log
arctan = cmath.atan
#def log2(z):
# Re = np.real(log(z))
# Im = arctan(np.imag(z)/np.real(z))
# t = Re + 1j*Im
# return(t)
#################################
# def FF(x, a_interatomic):
# t = log( 1 - exp(x*a_interatomic) )
# return(t)
def FF1(k, k_F, xi, a_interatomic):
x = -xi + 1j*(k_F + k)
t = log( 1 - exp(x*a_interatomic) )
return(t)
def FF2(k, k_F, xi, a_interatomic):
x = -xi + 1j*(k_F - k)
t = log( 1 - exp(x*a_interatomic) )
return(t)
def FF3(k, k_F, xi, a_interatomic):
x = -xi - 1j*(k_F + k)
t = log( 1 - exp(x*a_interatomic) )
return(t)
def FF4(k, k_F, xi, a_interatomic):
x = -xi - 1j*(k_F - k)
t = log( 1 - exp(x*a_interatomic) )
return(t)
##############################
#def FF1(k, k_F, xi, a_interatomic):
#
# x = -xi + 1j*(k_F + k)
#
# if (k < - k_F):
# t = log( 1 - exp(x*a_interatomic) ) - 1j*np.pi
#
# else:
# t = log( 1 - exp(x*a_interatomic) )
#
# return(t)
#
#def FF2(k, k_F, xi, a_interatomic):
#
# x = -xi + 1j*(k_F - k)
#
# if (k > k_F):
# t = log( 1 - exp(x*a_interatomic) ) - 1j*np.pi
#
# else:
# t = log(1 - exp(x*a_interatomic) )
# return(t)
#
#
#def FF3(k, k_F, xi, a_interatomic):
#
# x = -xi - 1j*(k_F + k)
#
# if (k < - k_F):
# t = log( 1 - exp(x*a_interatomic) ) + 1j*np.pi
#
# else:
# t = log(1 - exp(x*a_interatomic) )
#
# return(t)
#
#def FF4(k, k_F, xi, a_interatomic):
#
# x = -xi - 1j*(k_F - k)
#
# if (k > k_F):
# t = log( 1 - exp(x*a_interatomic) ) + 1j*np.pi
#
# else:
# t = log(1 - exp(x*a_interatomic))
#
# return(t)
################################3
def Free_Green(lomega, Damping, Fermi_k, mass_eff, DOS_o, Delta, a_interatomic, k):
G_0_k = np.zeros([4,4], dtype = complex)
omega = lomega + 1j * Damping
####factors
SS = sqrt(Delta**2 - omega**2)
xi = (mass_eff * SS)/Fermi_k
factor = pi * DOS_o / (2 * Fermi_k * a_interatomic)
factor_0 = -pi*DOS_o
'''diagonal in Nambu space'''
####G11
G_0_k[0,0] = factor * ( + FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic) \
+ FF3(k, Fermi_k, xi, a_interatomic) + FF4(k, Fermi_k, xi, a_interatomic) \
+ omega/(1j*SS) * ( + FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic) \
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic))\
) + factor_0*omega/SS
####G22
G_0_k[1,1] = factor * ( + FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic) \
+ FF3(k, Fermi_k, xi, a_interatomic) + FF4(k, Fermi_k, xi, a_interatomic) \
+ omega/(1j*SS) * ( + FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic) \
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic))\
) + factor_0*omega/SS
####G33
G_0_k[2,2] = factor * ( -(+ FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
+ FF3(k, Fermi_k, xi, a_interatomic) + FF4(k, Fermi_k, xi, a_interatomic))\
+ omega/(1j*SS) * ( + FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic))
) + factor_0*omega/SS
####G44
G_0_k[3,3] = factor * ( -(+ FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
+ FF3(k, Fermi_k, xi, a_interatomic) + FF4(k, Fermi_k, xi, a_interatomic))\
+ omega/(1j*SS) * ( + FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic))
) + factor_0*omega/SS
'''counter-diagonal in Nambu space'''
###G14
G_0_k[0,3] = - factor*Delta/(1j*SS) * (
FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic) )\
- factor_0*Delta/SS
###G23
G_0_k[1,2] = + factor*Delta/(1j*SS) * (
FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic) )\
+ factor_0*Delta/SS
###G32
G_0_k[2,1] = + factor*Delta/(1j*SS) * (
FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic) )\
+ factor_0*Delta/SS
###G41
G_0_k[3,0] = - factor*Delta/(1j*SS) * (
FF1(k, Fermi_k, xi, a_interatomic) + FF2(k, Fermi_k, xi, a_interatomic)\
- FF3(k, Fermi_k, xi, a_interatomic) - FF4(k, Fermi_k, xi, a_interatomic) )\
- factor_0*Delta/SS
return(G_0_k)