Skip to content
Snippets Groups Projects
Commit 194fd07a authored by Anton Akhmerov's avatar Anton Akhmerov Committed by Christoph Groth
Browse files

minor corrections to tutorial2c

parent 6deb130f
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20): ...@@ -33,7 +33,7 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20):
return ( r1**2 < rsq < r2**2) return ( r1**2 < rsq < r2**2)
# and add the corresponding lattice points using the `shape`-function # and add the corresponding lattice points using the `shape`-function
sys[lat.shape(ring, (0, 11))] = 4 * t sys[lat.shape(ring, (0, r1+1))] = 4 * t
for hopping in lat.nearest: for hopping in lat.nearest:
sys[sys.possible_hoppings(*hopping)] = - t sys[sys.possible_hoppings(*hopping)] = - t
...@@ -64,17 +64,17 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20): ...@@ -64,17 +64,17 @@ def make_system(a=1, t=1.0, W=10, r1=10, r2=20):
def lead_shape(pos): def lead_shape(pos):
(x, y) = pos (x, y) = pos
return (-1 < x < 1) and ( -W/2 < y < W/2 ) return (-1 < x < 1) and (-W/2 < y < W/2)
lead0[lat.shape(lead_shape, (0, 0))] = 4 * t lead0[lat.shape(lead_shape, (0, 0))] = 4 * t
for hopping in lat.nearest: for hopping in lat.nearest:
lead0[lead0.possible_hoppings(*hopping)] = - t lead0[lead0.possible_hoppings(*hopping)] = - t
# Then the lead to the right # Then the lead to the right
# (again, obtained using reverse() # [again, obtained using reversed()]
lead1 = lead0.reversed() lead1 = lead0.reversed()
#### Attach the leads and return the finalized system. #### #### Attach the leads and return the system. ####
sys.attach_lead(lead0) sys.attach_lead(lead0)
sys.attach_lead(lead1) sys.attach_lead(lead1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment