Re: [Kwant] Periods for kwant.TranslationalSymmetry
Hi Ousmane et al, I actually want the block of unit cells to be perpendicular to the scattering region as in the Wanted_System.png, attached. Note that it is a representative plot, I didn't produce it via Kwant but I want to attach the red lead to the black region in that direction, not like in Unwanted_System.png, which is also attached and produced via the code: ########################################## import kwant import numpy as np import matplotlib.pyplot as plt from types import SimpleNamespace def make_system(a, W, L): def shape(pos): (x, y) = pos return (0 <= y <= W/2 and -x/2 <= y <= (-x + L)/2) # or (-W <= y <= 0 and 0 <= x <= L) def onsite(site, par): return 4 * par.t - par.mu def hopx(par): return -par.t def hopy(par): return -par.t # lead lat = kwant.lattice.square(a, norbs=1) syst = kwant.Builder() syst[lat.shape(shape, (0, 0))] = onsite syst[kwant.builder.HoppingKind((1, 0), lat, lat)] = hopx syst[kwant.builder.HoppingKind((0, 1), lat, lat)] = hopy lead = kwant.Builder(kwant.TranslationalSymmetry((-a, -2*a))) def lead_shape(pos): (x, y) = pos return -W <= x <= 0 def lead_hopx(site1, site2, par): return -par.t def lead_onsite(site, par): return 4 * par.t - par.mu lead[lat.shape(lead_shape, (-2*a, -a))] = lead_onsite lead[kwant.builder.HoppingKind((1, 0), lat, lat)] = lead_hopx lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = hopy syst.attach_lead(lead) syst = syst.finalized() return syst syst = make_system(a=5, W=100, L=100) kwant.plot(syst) ########################################## I couldn't make the lead rotated in the perpendicular direction to the surface. Is there a way to do it? Thanks, Barış
The figures are attached.
Hi Barış, everyone, Barıș, you aim to have a lead with a different (rotated) lattice, compared to the scattering region. This is possible, but requires extra manual work (see https://kwant-project.org/doc/1/tutorial/faq#how-to-use-different-lattices-f...). I am, however, not sure if this is really what you want. In most mesoscopic systems, such a lattice change doesn't occur naturally, and if it does, then it does not have a very profound effect. Best, Anton On Mon, 15 Jul 2019 at 21:10, Barış Özgüler <ozguler@wisc.edu> wrote:
Hi Ousmane et al,
I actually want the block of unit cells to be perpendicular to the scattering region as in the Wanted_System.png, attached. Note that it is a representative plot, I didn't produce it via Kwant but I want to attach the red lead to the black region in that direction, not like in Unwanted_System.png, which is also attached and produced via the code:
##########################################
import kwant import numpy as np import matplotlib.pyplot as plt from types import SimpleNamespace
def make_system(a, W, L):
def shape(pos): (x, y) = pos
return (0 <= y <= W/2 and -x/2 <= y <= (-x + L)/2) # or (-W <= y <= 0 and 0 <= x <= L)
def onsite(site, par): return 4 * par.t - par.mu
def hopx(par): return -par.t
def hopy(par): return -par.t
# lead lat = kwant.lattice.square(a, norbs=1) syst = kwant.Builder() syst[lat.shape(shape, (0, 0))] = onsite syst[kwant.builder.HoppingKind((1, 0), lat, lat)] = hopx syst[kwant.builder.HoppingKind((0, 1), lat, lat)] = hopy lead = kwant.Builder(kwant.TranslationalSymmetry((-a, -2*a)))
def lead_shape(pos): (x, y) = pos return -W <= x <= 0
def lead_hopx(site1, site2, par): return -par.t
def lead_onsite(site, par): return 4 * par.t - par.mu
lead[lat.shape(lead_shape, (-2*a, -a))] = lead_onsite lead[kwant.builder.HoppingKind((1, 0), lat, lat)] = lead_hopx lead[kwant.builder.HoppingKind((0, 1), lat, lat)] = hopy syst.attach_lead(lead)
syst = syst.finalized() return syst
syst = make_system(a=5, W=100, L=100) kwant.plot(syst)
##########################################
I couldn't make the lead rotated in the perpendicular direction to the surface. Is there a way to do it?
Thanks,
Barış
participants (2)
-
Anton Akhmerov
-
Barış Özgüler