Commit 3a838318 by Anton Akhmerov Committed by Christoph Groth

add automatic calculation of n-th nearest neighbors

parent 01a617a9
 ... ... @@ -8,7 +8,7 @@ # Define the graphene lattice @@ -102,22 +103,40 @@ @@ -100,22 +101,40 @@ smatrix = kwant.solve(sys, energy) data.append(smatrix.transmission(0, 1)) ... ... @@ -57,7 +57,7 @@ def main(): @@ -130,17 +149,22 @@ @@ -128,17 +147,22 @@ return 0 if site.family == a else 1 # Plot the closed system without leads. ... ...
 ... ... @@ -38,7 +38,7 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20): # and add the corresponding lattice points using the `shape`-function #HIDDEN_BEGIN_lcak sys[lat.shape(ring, (0, r1 + 1))] = 4 * t sys[lat.nearest] = -t sys[lat.neighbors()] = -t #HIDDEN_END_lcak # In order to introduce a flux through the ring, we introduce a phase on ... ... @@ -76,7 +76,7 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20): return (-W / 2 < y < W / 2) lead[lat.shape(lead_shape, (0, 0))] = 4 * t lead[lat.nearest] = -t lead[lat.neighbors()] = -t #HIDDEN_END_qwgr #### Attach the leads and return the system. #### ... ...
 ... ... @@ -35,13 +35,13 @@ def make_system(a=1, t=1.0, W=10, L=30, L_well=10): return 4 * t + potential(site, pot) sys[(lat(x, y) for x in range(L) for y in range(W))] = onsite sys[lat.nearest] = -t sys[lat.neighbors()] = -t #HIDDEN_END_coid #### Define and attach the leads. #### lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0))) lead[(lat(0, j) for j in xrange(W))] = 4 * t lead[lat.nearest] = -t lead[lat.neighbors()] = -t sys.attach_lead(lead) sys.attach_lead(lead.reversed()) ... ...
 ... ... @@ -29,7 +29,7 @@ def make_system(a=1, t=1.0, W=10, L=30): sys[(lat(x, y) for x in range(L) for y in range(W))] = 4 * t #HIDDEN_END_vvjt #HIDDEN_BEGIN_nooi sys[lat.nearest] = -t sys[lat.neighbors()] = -t #HIDDEN_END_nooi #### Define and attach the leads. #### ... ... @@ -37,7 +37,7 @@ def make_system(a=1, t=1.0, W=10, L=30): #HIDDEN_BEGIN_iepx lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0))) lead[(lat(0, j) for j in xrange(W))] = 4 * t lead[lat.nearest] = -t lead[lat.neighbors()] = -t #HIDDEN_END_iepx # Attach the left lead and its reversed copy. ... ...