Dear Sir,

I want to assign a particular sequence of site values on a particular line (a number of lines)  of a zigzag graphene nanoribbon. For example, the bottom zigzag line.

let's say, from the left to right there are 10 sites and I want to put the onsite values as [1,2,3,...].

I was able to get the information about the sites that are in the bottom line and have assigned the site values accordingly. But the problem is that each time I finalize the system, I get different onsite values along the bottom line. Is there any way to resolve this? Or maybe this approach is not the right way to do that.

A part of my code is given below
========================
def make_system(W, L, no_of_line):

## scattering region ##
sys = kwant.Builder()
sys[lat.shape(cross(W,L), (0,0))] = 0
sys[lat.neighbors(1)] = -1.
#######INFO of the line#########
line=[]
for site in sys.expand(lat.shape(cross(W,L), (0, 0))):
#print (site.pos[0],site.pos[1])
line.append(site.pos[1])

line=set(line)
line=list(line)
line=sort(line)


i=1
for site in sys.expand(lat.shape(cross(W,L), (0, 0))):
   for j in range(0,no_of_line+1,2):
   line_no=j
     if  (site.pos[1]==line[line_no] or site.pos[1]==line[line_no+1]):
       sys[site]=i
       i=i+1
########################

With Regards,
Sudin