
Hello, Would you please let me know how I can add nn and nnn hoppings for random sites (not all) in graphene? Best regards, Ali

Dear Ali, I am not sure if I understand your question but let me say this way: You want to choose randomly some sites in your system. You put nn or nnn hoppings for those chosen sites. method: import random Sites=list(syst.sites) #define a list of your sites Random_sites= random.choices(Sites, k=5) # choose randomly 5 sites sys[(hop for hop in sys.expand(graphene.neighbors(2)) if (hop[0] in Random_sites or hop[1] in Random_sites) )]=-1 #(from all the hoppings of order 2, you choose the hopings hop=(site1,site2) wwhere one of the two sites is in you list of random sites.) kwant.plot(sys, site_color=family_colors, site_lw=0.1, colorbar=False) I hope this helps Adel ################################################################################## from __future__ import division # so that 1/2 == 0.5, and not 0 from math import pi, sqrt, tanh import kwant import scipy.sparse.linalg as sla from matplotlib import pyplot sin_30, cos_30 = (1 / 2, sqrt(3) / 2) graphene = kwant.lattice.general([(1, 0), (sin_30, cos_30)], [(0, 0), (0, 1 / sqrt(3))]) a, b = graphene.sublattices def make_system(r=5, w=2.0, pot=0.1): #### Define the scattering region. #### # circular scattering region def circle(pos): x, y = pos return x ** 2 + y ** 2 < r ** 2 sys = kwant.Builder() # w: width and pot: potential maximum of the p-n junction def potential(site): (x, y) = site.pos d = y * cos_30 + x * sin_30 return pot * tanh(d / w) sys[graphene.shape(circle, (0, 0))] = potential # specify the hoppings of the graphene lattice in the # format expected by builder.HoppingKind hoppings = (((0, 0), a, b), ((0, 1), a, b), ((-1, 1), a, b)) sys[[kwant.builder.HoppingKind(*hopping) for hopping in hoppings]] = -1 return sys pot = 0.1 sys = make_system(pot=pot) syst=sys.finalized() # To highlight the two sublattices of graphene, we plot one with # a filled, and the other one with an open circle: def family_colors(site): return 0 if site.family == a else 1 import random Sites=list(syst.sites) Random_sites= random.choices(Sites, k=5) sys[(hop for hop in sys.expand(graphene.neighbors(2)) if (hop[0] in Random_sites or hop[1] in Random_sites) )]=-1 kwant.plot(sys, site_color=family_colors, site_lw=0.1, colorbar=False) On Mon, Sep 30, 2019 at 5:09 PM Ali Asgharpour <asgharpour@sabanciuniv.edu> wrote:
Hello,
Would you please let me know how I can add nn and nnn hoppings for random sites (not all) in graphene?
Best regards,
Ali
-- Abbout Adel
participants (2)
-
Abbout Adel
-
Ali Asgharpour