Hi all, I want to attach a lead on a vertical surface. I have a problem with the periods for kwant.TranslationalSymmetry. When I choose (b = 2, c = 1) in the code below, I get the system plot. But the choice of (b = 1, c = 1) doesn't work. I want the period to be (b = 1, c = 1). Can someone help me understand why it doesn't work? ++++++++++++++++++++++++++++++++++++++++ import kwant import matplotlib.pyplot as plt def make_system(a, W, L): def shape(pos): (x, y) = pos return (-L <= x <= 0 and -L <= y <= L) def onsite(site, par): return 4 * par.t - par.mu def hopx(site1, site2, par): return -par.t def hopy(site1, site2, par): return -par.t lat = kwant.lattice.square(a, norbs=1) syst = kwant.Builder() syst[lat.shape(shape, (0, 0))] = onsite syst[kwant.builder.HoppingKind((1, 0), lat, lat)] = hopx syst[kwant.builder.HoppingKind((0, 1), lat, lat)] = hopy # (b = 2, c = 1) works, (b = 1, c = 1) does not work b = 1 c = 1 lead = kwant.Builder(kwant.TranslationalSymmetry((b*a, c*a))) #, time_reversal=1) def lead_shape(pos): (x, y) = pos return - L/2 <= y <= L/2 def lead_hopx(site1, site2, par): return -par.t def lead_onsite(site, par): return 4 * par.t - par.mu lead[lat.shape(lead_shape, (0, 0))] = lead_onsite lead[kwant.builder.HoppingKind((1, 0), lat, lat)] = lead_hopx lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = hopy syst.attach_lead(lead) syst = syst.finalized() return syst a = 5 number_of_sites = 20 L=number_of_sites*a number_of_sites2 = 50 L2=number_of_sites2*a syst = make_system(a=a, W=L2, L=L) kwant.plot(syst); ++++++++++++++++++++++++++++++++++++++++ Thanks, Barış
participants (1)
-
Barış Özgüler