Dear Joseph Weston
Thank you very much for your quick response.
Of course, I can post you my cod example. It is in the following:
import kwant
import matplotlib.pyplot as plt
import math
d=1.42;
a1=d*math.sqrt(3);
t=-0.033;
latt = kwant.lattice.general([(a1,0),(a1*0.5,a1*math.sqrt(3)/2)],
[(a1/2,-d/2),(a1/2,d/2)])
a,b = latt.sublattices
syst= kwant.Builder()
#...................................................................................
def rectangle(pos):
x, y = pos
z=x**2+y**2
return -4.75*a1<x<4.75*a1 and -8*d<y<8*d
syst[latt.shape(rectangle, (1,1))]=0
def delet(pos):
x, y = pos
z=x**2+y**2
return z<(1*a1)**2
del syst[latt.shape(delet, (1,1))]
#nearest
neighbors.............................................................
syst[[kwant.builder.HoppingKind((0,0),a,b)]] =t
syst[[kwant.builder.HoppingKind((0,1),a,b)]] =t
syst[[kwant.builder.HoppingKind((-1,1),a,b)]] =t
sym = kwant.TranslationalSymmetry(latt.vec((-4,0)))
sym.add_site_family(latt.sublattices[0], other_vectors=[(-1, 2)])
sym.add_site_family(latt.sublattices[1], other_vectors=[(-1, 2)])
lead = kwant.Builder(sym)
def lead_shape(pos):
x, y = pos
return -8*d<y<8*d
lead[latt.shape(lead_shape, (1,1))] = 0
def delet_lead(pos):
x, y = pos
z=x**2+y**2
return z<(1*a1)**2
del lead[latt.shape(delet_lead, (1,1))]
lead[[kwant.builder.HoppingKind((0,0),a,b)]] =t
lead[[kwant.builder.HoppingKind((0,1),a,b)]] =t
lead[[kwant.builder.HoppingKind((-1,1),a,b)]] =t
syst.attach_lead(lead,add_cells=3)
syst.attach_lead(lead.reversed(),add_cells=3)
ax=kwant.plot(syst);
Best wishes,
Nafise