-
Notifications
You must be signed in to change notification settings - Fork 15
/
get_soc.f90
327 lines (278 loc) · 12.4 KB
/
get_soc.f90
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
subroutine set_ham_soc(H, k, PPRAM, neig, NN_TABLE, FIJ, flag_phase)
use parameters, only: zi, pi, pi2, pauli_x, pauli_y, pauli_z, hopping, params
use kronecker_prod, only: kproduct
use phase_factor
use print_matrix
use get_parameter
implicit none
interface
function FIJ(kp,R)
complex*16 :: FIJ
real*8, intent(in) :: kp(3)
real*8, intent(in) :: R(3)
endfunction
end interface
type(hopping) :: NN_TABLE
type(params ) :: PPRAM
integer*4, intent(in) :: neig
integer*4 nn, i, j
integer*4 soc_index, rashba_index
real*8 lambda_soc, lambda_rashba
real*8 hop_signx, hop_signy, hop_signatom
real*8 k(3)
complex*16 H(neig*2,neig*2)
complex*16 Hx(neig,neig), Hy(neig,neig), Hz(neig,neig)
complex*16 F
character*8 ci_orb, cj_orb
character*20 ci_atom, cj_atom
complex*16 L_x, L_y, L_z
external L_x, L_y, L_z
logical flag_phase
complex*16 prod
real*8 lsign, hsign
if(PPRAM%flag_slater_koster) then
Hx = 0d0
Hy = 0d0
Hz = 0d0
H = 0d0
do nn = 1, NN_TABLE%n_neighbor
soc_index = NN_TABLE%soc_param_index(nn)
i = NN_TABLE%i_matrix(nn) ; j = NN_TABLE%j_matrix(nn)
! set SOC hamiltonian based on atomic orbitals
if( soc_index .gt. 0 .and. (NN_TABLE%p_class(nn) .eq. 'pp' .or. NN_TABLE%p_class(nn) .eq. 'dd') ) then
call get_param(PPRAM, soc_index, 1, lambda_soc)
Hx(i,j) = lambda_soc * L_x(NN_TABLE%ci_orb(nn), NN_TABLE%cj_orb(nn), NN_TABLE%p_class(nn))
Hy(i,j) = lambda_soc * L_y(NN_TABLE%ci_orb(nn), NN_TABLE%cj_orb(nn), NN_TABLE%p_class(nn))
Hz(i,j) = lambda_soc * L_z(NN_TABLE%ci_orb(nn), NN_TABLE%cj_orb(nn), NN_TABLE%p_class(nn))
Hx(j,i) = conjg(Hx(i,j))
Hy(j,i) = conjg(Hy(i,j))
Hz(j,i) = conjg(Hz(i,j))
! set SOC hamiltonian based on 'xx' type orbitals which are composed by linear combination of atomic orbitals
elseif( soc_index .gt. 0 .and. NN_TABLE%p_class(nn) .eq. 'xx' ) then
call get_param(PPRAM, soc_index, 1, lambda_soc)
! CALCULATE <orb_i|LS|orb_j>
Hx(i,j) = lambda_soc * L_x(NN_TABLE%ci_orb(nn), NN_TABLE%cj_orb(nn), NN_TABLE%p_class(nn))
Hy(i,j) = lambda_soc * L_y(NN_TABLE%ci_orb(nn), NN_TABLE%cj_orb(nn), NN_TABLE%p_class(nn))
Hz(i,j) = lambda_soc * L_z(NN_TABLE%ci_orb(nn), NN_TABLE%cj_orb(nn), NN_TABLE%p_class(nn))
Hx(j,i) = conjg(Hx(i,j))
Hy(j,i) = conjg(Hy(i,j))
Hz(j,i) = conjg(Hz(i,j))
endif
enddo
!SET UP Hamiltonian H_soc*sigma
H = kproduct(pauli_x, Hx, 2, 2, neig, neig) &
+kproduct(pauli_y, Hy, 2, 2, neig, neig) &
+kproduct(pauli_z, Hz, 2, 2, neig, neig)
elseif(.not.PPRAM%flag_slater_koster) then
Hx = 0d0
Hy = 0d0
Hz = 0d0
H = 0d0
!WARNING!! This setting is only valid for Bi/Si(110) case with certain atomic geometry and lattice vectors,
! since the sign convention is only valid and meaningful for this particular case.
! If you are dealing with other system, please construct your own hamltonian setup.
nn_cc:do nn = 1, NN_TABLE%n_neighbor
soc_index = NN_TABLE%cc_index_set(2,nn)
rashba_index = NN_TABLE%cc_index_set(3,nn)
i = NN_TABLE%i_matrix(nn) ; j = NN_TABLE%j_matrix(nn)
if(flag_phase) then
F = FIJ(k, NN_TABLE%Rij(:,nn))
elseif(.not. flag_phase) then
F = FIJ(k, NN_TABLE%R (:,nn))
endif
if( soc_index .ge. 1 .and. rashba_index .ge. 1) then
call get_param(PPRAM, soc_index, 1, lambda_soc )
call get_param(PPRAM, rashba_index, 1, lambda_rashba)
! set Rashba-SOC between i_orb and j_orb separated by |dij|, originated from E-field normal to surface
H(i,j+neig) = H(i,j+neig) + zi*lambda_rashba * NN_TABLE%Rij(2,nn)/NN_TABLE%Dij(nn) * F & ! sigma_x
+ zi*lambda_rashba *(-NN_TABLE%Rij(1,nn))/NN_TABLE%Dij(nn) * F * (-zi) ! sigma_y
H(j,i+neig) = H(j,i+neig) + zi*lambda_rashba *(-NN_TABLE%Rij(2,nn))/NN_TABLE%Dij(nn) * conjg(F) & ! sigma_x
+ zi*lambda_rashba * NN_TABLE%Rij(1,nn)/NN_TABLE%Dij(nn) * conjg(F) * (-zi) ! sigma_y
H(j+neig,i) = conjg(H(i,j+neig))
H(i+neig,j) = conjg(H(j,i+neig))
! set SOC between i_orb and j_orb separated by |dij|,
! originated from E-field due to neighbor atom nearby the hopping path
! H_SOC = sigma_<<ij>> i * lsoc * v_ij * ci' * sigma_z * cj
! v_ij = di x dj / (|di x dj|) , di(dj) are vector connecting nearest neigbohor
! atom from i (to j).
hop_signx= NN_TABLE%Rij(1,nn)/NN_TABLE%Dij(nn)
hop_signy= NN_TABLE%Rij(2,nn)/NN_TABLE%Dij(nn)
ci_atom = NN_TABLE%site_cindex(NN_TABLE%i_atom(nn))
cj_atom = NN_TABLE%site_cindex(NN_TABLE%j_atom(nn))
if( ci_atom(1:2) .eq. 'b1') hop_signatom = 1.0
if( ci_atom(1:2) .eq. 'b2') hop_signatom =-1.0
H(i,j) = H(i ,j ) + zi*lambda_soc * hop_signatom * hop_signx * F & ! for spin-up sigma_z
+ zi*lambda_soc * hop_signatom * hop_signy * F
H(i+neig,j+neig) = H(i+neig,j+neig) - zi*lambda_soc * hop_signatom * hop_signx * F & ! for spin-dn sigma_z
- zi*lambda_soc * hop_signatom * hop_signy * F
if(i .ne. j) then
H(j,i) = conjg(H(i,j))
H(j+neig, i+neig) = conjg(H(i+neig, j+neig))
endif
elseif( soc_index .ge. 1 .and. rashba_index .eq. 0) then
call get_param(PPRAM, soc_index, 1, lambda_soc )
! This model is only for Kane-mele type of SOC. Be careful..
prod=exp(-2d0*zi * pi * dot_product((/2.45d0,0d0/), NN_TABLE%Rij(1:2,nn)))
hsign = sign(1d0,aimag(prod))
ci_atom = NN_TABLE%site_cindex(NN_TABLE%i_atom(nn))
cj_atom = NN_TABLE%site_cindex(NN_TABLE%j_atom(nn))
if( ci_atom(1:1) .eq. 'a') lsign = -1.0d0
if( ci_atom(1:1) .eq. 'b') lsign = 1.0d0
H(i,j) = H(i,j) + zi * lambda_soc * lsign * hsign * F
H(i+neig,j+neig) = H(i+neig,j+neig) - zi * lambda_soc * lsign * hsign * F
if(i .ne. j) then
H(j,i) = conjg(H(i,j))
H(j+neig, i+neig) = conjg(H(i+neig, j+neig))
endif
elseif( soc_index .eq. 0 .and. rashba_index .gt. 1 ) then ! WARN: only the AB-a hopping is considered
call get_param(PPRAM, rashba_index, 1, lambda_rashba)
! set Rashba-SOC between i_orb and j_orb separated by |dij|, originated from E-field normal to surface
H(i,j+neig) = H(i,j+neig) + zi*lambda_rashba * NN_TABLE%Rij(2,nn)/NN_TABLE%Dij(nn) * F & ! sigma_x
+ zi*lambda_rashba *(-NN_TABLE%Rij(1,nn))/NN_TABLE%Dij(nn) * F * (-zi) ! sigma_y
H(j,i+neig) = H(j,i+neig) + zi*lambda_rashba *(-NN_TABLE%Rij(2,nn))/NN_TABLE%Dij(nn) * conjg(F) & ! sigma_x
+ zi*lambda_rashba * NN_TABLE%Rij(1,nn)/NN_TABLE%Dij(nn) * conjg(F) * (-zi) ! sigma_y
H(j+neig,i) = conjg(H(i,j+neig))
H(i+neig,j) = conjg(H(j,i+neig))
endif
enddo nn_cc
endif
return
endsubroutine
subroutine get_soc_param_index(index_lambda,ci_orb, cj_orb, c_atom, PPRAM, param_class)
use parameters, only : params
implicit none
type(params) :: PPRAM
integer*4 index_lambda
integer*4 i, lio, ljo, la
character*8 ci_orb, cj_orb, c_atom
character*20 lambda_name
character*2 param_class
lio = len_trim(ci_orb)
ljo = len_trim(cj_orb)
la = len_trim(c_atom)
index_lambda = 0 !initialize
write(lambda_name,*)'lambda_',param_class(1:1),'_',c_atom(1:la)
if(ci_orb(1:lio) .ne. cj_orb(1:ljo)) then
call get_param_index(PPRAM, lambda_name, index_lambda)
endif
return
endsubroutine
function L_x(ci_orb, cj_orb, param_class)
use parameters, only : zi
implicit none
integer*4 li,lj
character*8 ci_orb,cj_orb
character*2 param_class
complex*16 L_x
L_x = 0d0
select case (param_class)
case('pp')
if(ci_orb(1:2) .eq. 'py' .and. cj_orb(1:2) .eq. 'pz') then
L_x = -zi * 0.5d0
elseif(ci_orb(1:2) .eq. 'pz' .and. cj_orb(1:2) .eq. 'py') then
L_x = zi * 0.5d0
endif
case('dd')
if(ci_orb(1:3) .eq. 'dz2' .and. cj_orb(1:3) .eq. 'dyz' ) then
L_x = zi * sqrt(3d0) * 0.5d0
elseif(ci_orb(1:3) .eq. 'dyz' .and. cj_orb(1:3) .eq. 'dz2' ) then
L_x = -zi * sqrt(3d0) * 0.5d0
endif
if(ci_orb(1:3) .eq. 'dx2' .and. cj_orb(1:3) .eq. 'dyz' ) then
L_x = zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'dyz' .and. cj_orb(1:3) .eq. 'dx2' ) then
L_x = -zi * 0.5d0
endif
if(ci_orb(1:3) .eq. 'dxz' .and. cj_orb(1:3) .eq. 'dxy' ) then
L_x = zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'dxy' .and. cj_orb(1:3) .eq. 'dxz' ) then
L_x = -zi * 0.5d0
endif
case('xx')
if(ci_orb(1:3) .eq. 'xp1' .and. cj_orb(1:3) .eq. 'xp2' ) then
! L_x = zi * sqrt(3d0) * 0.5d0 / sqrt(3d0)
L_x = zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'xp2' .and. cj_orb(1:3) .eq. 'xp1' ) then
! L_x =-zi * sqrt(3d0) * 0.5d0 / sqrt(3d0)
L_x =-zi * 0.5d0
endif
end select
return
endfunction
function L_y(ci_orb, cj_orb, param_class)
use parameters, only : zi
implicit none
character*8 ci_orb,cj_orb
character*2 param_class
complex*16 L_y
L_y = 0d0
select case (param_class)
case('pp')
if(ci_orb(1:2) .eq. 'px' .and. cj_orb(1:2) .eq. 'pz') then
L_y = zi * 0.5d0
elseif(ci_orb(1:2) .eq. 'pz' .and. cj_orb(1:2) .eq. 'px') then
L_y = -zi * 0.5d0
endif
case('dd')
if(ci_orb(1:3) .eq. 'dz2' .and. cj_orb(1:3) .eq. 'dxz' ) then
L_y = -zi * sqrt(3d0) * 0.5d0
elseif(ci_orb(1:3) .eq. 'dxz' .and. cj_orb(1:3) .eq. 'dz2' ) then
L_y = zi * sqrt(3d0) * 0.5d0
endif
if(ci_orb(1:3) .eq. 'dx2' .and. cj_orb(1:3) .eq. 'dxz' ) then
L_y = zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'dxz' .and. cj_orb(1:3) .eq. 'dx2' ) then
L_y = -zi * 0.5d0
endif
if(ci_orb(1:3) .eq. 'dyz' .and. cj_orb(1:3) .eq. 'dxy' ) then
L_y = -zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'dxy' .and. cj_orb(1:3) .eq. 'dyz' ) then
L_y = zi * 0.5d0
endif
case('xx')
if(ci_orb(1:3) .eq. 'xp1' .and. cj_orb(1:3) .eq. 'xp3' ) then
! L_y = -zi * sqrt(3d0) * 0.5d0 / sqrt(3d0)
L_y = -zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'xp3' .and. cj_orb(1:3) .eq. 'xp1' ) then
! L_y = zi * sqrt(3d0) * 0.5d0 / sqrt(3d0)
L_y = zi * 0.5d0
endif
end select
return
endfunction
function L_z(ci_orb, cj_orb, param_class)
use parameters, only : zi
implicit none
character*8 ci_orb,cj_orb
character*2 param_class
complex*16 L_z
L_z = 0d0
select case (param_class)
case('pp')
if(ci_orb(1:2) .eq. 'px' .and. cj_orb(1:2) .eq. 'py') then
L_z = -zi * 0.5d0
elseif(ci_orb(1:2) .eq. 'py' .and. cj_orb(1:2) .eq. 'px') then
L_z = zi * 0.5d0
endif
case('dd')
if(ci_orb(1:3) .eq. 'dx2' .and. cj_orb(1:3) .eq. 'dxy' ) then
L_z = -zi
elseif(ci_orb(1:3) .eq. 'dxy' .and. cj_orb(1:3) .eq. 'dx2' ) then
L_z = zi
endif
if(ci_orb(1:3) .eq. 'dyz' .and. cj_orb(1:3) .eq. 'dxz' ) then
L_z = zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'dxz' .and. cj_orb(1:3) .eq. 'dyz' ) then
L_z = -zi * 0.5d0
endif
case('xx')
if(ci_orb(1:3) .eq. 'xp2' .and. cj_orb(1:3) .eq. 'xp3' ) then
! L_z = zi * ( 0.5d0 / 3d0 - 2d0 / 3d0 )
L_z = -zi * 0.5d0
elseif(ci_orb(1:3) .eq. 'xp3' .and. cj_orb(1:3) .eq. 'xp2' ) then
! L_z = -zi * ( 0.5d0 / 3d0 - 2d0 / 3d0 )
L_z = zi * 0.5d0
endif
end select
return
endfunction