Hi develops,

I'm trying to build a diatomic chain 1D in kwant, with two differents hopping 
parameters (intracell and extracell). But when i try to attach the lead, it 
doesn't work. Can anyone help me?

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
L = 5 
C = 5 

t1 = 4 # hopping intracell
t2 = 5 # hopping extracell

lat = kwant.lattice.general([(C,0),(0,1)],[(0,0),(2,0)], norbs=1)
a, b = lat.sublattices

syst = kwant.Builder()

for i in range(L):
    syst[a(i, 0)] = 0
    syst[b(i, 0)] = 0
    
syst[kwant.builder.HoppingKind((1, 0), a, b)] = -t1
syst[kwant.builder.HoppingKind((1, 0), b, a)] = -t2
    
kwant.plot(syst)
plt.show()

sym_lead1 = kwant.TranslationalSymmetry(lat.vec((-1, 0)))

lead1 = kwant.Builder(sym_lead1)
lead1[lat(0,0)] = 0
lead1[lat(1,0)] = 0
lead1[kwant.builder.HoppingKind((1, 0), a, b)] = -t1
lead1[kwant.builder.HoppingKind((1, 0), b, a)] = -t2
syst.attach_lead(lead1)

kwant.plot(syst);
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-38-06cd19c77c10> in <module>
      3 
      4 lead1 = kwant.Builder(sym_lead1)
----> 5 lead1[lat(0,0)] = 0
      6 lead1[lat(1,0)] = 0
      7 lead1[kwant.builder.HoppingKind((1, 0), a, b)] = -t1

TypeError: 'Polyatomic' object is not callable

Reply via email to