Skip to content

Commit

Permalink
add block_tri in deviceprop.cal_green_function
Browse files Browse the repository at this point in the history
  • Loading branch information
AsymmetryChou committed Oct 11, 2024
1 parent cdc7fd5 commit 6cf54c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dptb/negf/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def integrate(self, deviceprop, kpoint, eta_lead=1e-5, eta_device=0.,Vbias=None,
for i, e in enumerate(poles):
deviceprop.lead_L.self_energy(kpoint=kpoint, energy=e, eta_lead=eta_lead)
deviceprop.lead_R.self_energy(kpoint=kpoint, energy=e, eta_lead=eta_lead)
deviceprop.cal_green_function(energy=e, kpoint=kpoint, block_tridiagonal=False, eta_device=eta_device,\
deviceprop.cal_green_function(energy=e, kpoint=kpoint, block_tridiagonal=block_tridiagonal, eta_device=eta_device,\
Vbias = Vbias)
term = ((-4 * 1j * kBT) * deviceprop.grd[0] * self.residues[i]).imag
DM_eq -= term
Expand All @@ -189,7 +189,7 @@ def integrate(self, deviceprop, kpoint, eta_lead=1e-5, eta_device=0.,Vbias=None,
for i, e in enumerate(xs):
deviceprop.lead_L.self_energy(kpoint=kpoint, energy=e, eta_lead=eta_lead)
deviceprop.lead_R.self_energy(kpoint=kpoint, energy=e, eta_lead=eta_lead)
deviceprop.cal_green_function(energy=e, kpoint=kpoint, block_tridiagonal=False, eta_device=eta_device)
deviceprop.cal_green_function(energy=e, kpoint=kpoint, block_tridiagonal=block_tridiagonal, eta_device=eta_device)
gr_gamma_ga = torch.mm(torch.mm(deviceprop.grd[0], deviceprop.lead_R.gamma), deviceprop.grd[0].conj().T).real
gr_gamma_ga = gr_gamma_ga * (deviceprop.lead_R.fermi_dirac(e+deviceprop.mu) - deviceprop.lead_L.fermi_dirac(e+deviceprop.mu))
DM_neq = DM_neq + wlg[i] * gr_gamma_ga
Expand Down

0 comments on commit 6cf54c2

Please sign in to comment.