#===================CODE======But in my case, I am getting only three peaks. Am I missing something here? Please help me. The following code I have used for the transmission calculation.Dear Sir,Recently I was doing a problem on a 1D chain. The problem I faced is as follows.For a 1D chain, suppose I have taken 5 sites and set the hopping strength between lead and system very small compared to the system hopping. Now since we have 5 sites, from the Hamiltonian of the system we'll have 5 eigenvalues and if we calculate the transmission coefficient we shall have 5 peaks each occurs at particular eigenvalue.============
import kwant
# For plotting
from matplotlib import pyplot
import numpy as np
def make_system(a=1, t=1.0, L=5):
# Start with an empty tight-binding system and a single square lattice.
# `a` is the lattice constant (by default set to 1 for simplicity.
lat = kwant.lattice.chain(a)
syst = kwant.Builder()
#### Define the scattering region. ####
for x in range (L):
syst[(lat(x))] = 0
#syst[(lat(x) for x in range(L))] = onsite
syst[lat.neighbors()] = -t
#### Define and attach the leads. ####
lead = kwant.Builder(kwant.TranslationalSymmetry([-a]))
lead[(lat(0))] = 0
lead[lat.neighbors()] = -t
syst.attach_lead(lead)
syst.attach_lead(lead.reversed())
#============== set hopping between lead and system ============
for i in syst.leads[0].interface:
for j in syst.neighbors(i):
syst[i,j] = 0.1
for i in syst.leads[1].interface:
for j in syst.neighbors(i):
syst[i,j] = 0.1
return syst
#=========================================================== =====
def main():
syst = make_system()
# Check that the system looks as intended.
kwant.plot(syst)
# Finalize the system.
syst = syst.finalized()
Es = np.linspace(-1.99, 1.99, 800)
data = []
totdos = []
for e in Es:
smatrix = kwant.smatrix(syst, e)
T = smatrix.transmission(1, 0)
ldos = kwant.ldos(syst, e)
totdos.append(sum(ldos)/len(ldos))
data.append(T)
print ('%0.3f' % e, '%.4f' % T, sum(ldos)/len(ldos))
pyplot.figure()
pyplot.plot(Es, data)
pyplot.xlabel("energy [t]")
pyplot.ylabel("conductance [e^2/h]")
pyplot.show()
# Call the main function if the script gets executed (as opposed to imported).
# See <http://docs.python.org/library/__main__.html >.
if __name__ == '__main__':
main()#================End CODE=======================--সুদিন