Hi all,
My name is Connor. I'm a PhD student at Brock University. As an introduction to
using Kwant, I want to simulate the transmission though a slab of
Bernal-stacked graphene layers with a potential barrier (that is, all 4 basis
atoms in a single unit cell, denoted {A1, B1, A2, B2}, have an on-site energy
denoted g, while all other atoms have onsite energy zero. The first-neighbour
hopping parameter (between {A1,B1} and {A2,B2}) is denoted t1, and the
second-neighbour hopping parameter (between {B1,A2} in Bernal graphite) is
denoted t2. I treat the barrier as my scattering region, and the rest of slab
as the two leads. Periodic boundary conditions are applied along both in-plane
primitive directions.
My code (below) runs without error. However, when I plot my scattering region
after attaching one lead (the one pointing in the positive stacking direction,
taken to be the z-axis), the lead does not appear in the plot (i.e. in this
Kwant tutorial: https://kwant-project.org/doc/dev/tutorial/first_steps, the
lead appears as a faded red region, which is absent in my plot). Could someone
tell me how to go about attaching the leads to my scattering region?
Thank you for your time. Please let me know if I've left out any information,
Connor
----- Code below -----
import numpy as np
import kwant
from matplotlib import pyplot
# unit cell extrusion
La = 1
Lb = 1
Lc = 1
# lattice parameters
a0 = 1.42
c0 = 3.35
# hopping parameters / defect on-site energy
t1 = 1.0
t2 = 0.5
g = 0.7
# lattice vectors
a1 = a0 * np.array([1.5, 0.5*np.sqrt(3), 0.0])
a2 = a0 * np.array([1.5, -0.5*np.sqrt(3), 0.0])
a3 = c0 * np.array([0.0, 0.0, 2.0])
# basis atoms
b1 = a0 * np.array([0.0, 0.0, 0.0]) + c0 * np.array([0.0, 0.0, 0.0]) #A1
b2 = a0 * np.array([1.0, 0.0, 0.0]) + c0 * np.array([0.0, 0.0, 0.0]) #B1
b3 = a0 * np.array([1.0, 0.0, 0.0]) + c0 * np.array([0.0, 0.0, 1.0]) #A2
b4 = a0 * np.array([2.0, 0.0, 0.0]) + c0 * np.array([0.0, 0.0, 1.0]) #B2
# Bernal graphite lattice
lat = kwant.lattice.general([a1, a2, a3], basis=[b1, b2, b3, b4], norbs=1)
A1, B1, A2, B2 = lat.sublattices
# left lead
lead = kwant.Builder(kwant.TranslationalSymmetry(lat.vec([La, 0, 0]),
lat.vec([0, Lb, 0]), lat.vec([0, 0, 1]) ))
lead[lat.neighbors(1)] = -t1
lead[lat.neighbors(2)] = -t2
for i in range(La):
for j in range(Lb):
lead[A1(i,j,0)] = 0
lead[B1(i,j,0)] = 0
lead[A2(i,j,0)] = 0
lead[B2(i,j,0)] = 0
lead = kwant.wraparound.wraparound(lead, keep=2)
# scattering region
sr = kwant.Builder(kwant.TranslationalSymmetry(lat.vec([La, 0, 0]), lat.vec([0,
Lb, 0])))
sr[lat.neighbors(1)] = -t1
sr[lat.neighbors(2)] = -t2
for i in range(La):
for j in range(Lb):
for k in range(Lc):
sr[A1(i,j,k)] = g
sr[B1(i,j,k)] = g
sr[A2(i,j,k)] = g
sr[B2(i,j,k)] = g
sr = kwant.wraparound.wraparound(sr)
# attach leads
sr.attach_lead(lead)
kwant.plot(sr);
exit()