Different hopping parameters
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
Hi Gabriel, The error you get is related to the fact that you are using lat (which is a 'Polyatomic' object and is not callable) to fill the onsite values in the lead. You may instead consider defining the onsite values for each sub-lattice exactly as you did for syst. lead1[a(0, 0)] = … lead1[b(1, 0)] = … This way it should work. Regards, Ousmane
participants (2)
-
Gabriel Garcia
-
ousmane.ly@kaust.edu.sa