How to attach a lead to particular position of honeycomb lattice
Dear Sir,
I am new to kwant.
How to attach a lead to a particular portion(upper side of the square) of the honeycomb structure.
sym1 = kwant.TranslationalSymmetry(lat.vec((0,1)))
lead1 = kwant.Builder(sym1)
def lead2_shape(pos):
x, y = pos
return 0<x<10
lead1[lat.shape(lead2_shape, (2,0))]=3
lead1[lat.neighbors()] = 1
I used the above code to attach the second lead but it didn’t attach to the correct place.
I want to attach the lead to the upper side of the square.
main code
Wnr=10 lnr=10 a=1 lat=kwant.lattice.honeycomb(a)
def rect(pos): x,y=pos return 0<x<lnr and 0<y<Wnr model1 = kwant.Builder() model1[lat.shape(rect,(1,1))] = 3 model1[lat.neighbors()] =1 ##########lead shape function def lead1_shape(pos): x, y = pos return 0 < y < 10 def lead2_shape(pos): x, y = pos return 0<x<10 ##########1st lead########## sym = kwant.TranslationalSymmetry(lat.vec((1,0))) #from the left sym.add_site_family(lat.sublattices[0], other_vectors=[(1, 2)]) sym.add_site_family(lat.sublattices[1], other_vectors=[(1, 2)]) lead = kwant.Builder(sym) lead[lat.shape(lead1_shape, (1,1))]=3 lead[lat.neighbors()] = 1 model1.attach_lead(lead) ##########problem in 2nd lead, from this below code it attach to other position########## sym1 = kwant.TranslationalSymmetry(lat.vec((0,1))) lead1 = kwant.Builder(sym1) lead1[lat.shape(lead2_shape, (2,0))]=3 lead1[lat.neighbors()] = 1 model1.attach_lead(lead1)
kwant.plot(model1)
Anyone, please help
please see this image in below link, I want to attach the second lead in the redcircled position of the figure
https://drive.google.com/file/d/15ORyo4j_tAvgC8jaT5lQxmQNS6e0QoOF/view?usp=s...
sahu.ajit92@gmail.com wrote:
How to attach a lead to a particular portion(upper side of the square) of the honeycomb structure.
sym1 = kwant.TranslationalSymmetry(lat.vec((0,1))) lead1 = kwant.Builder(sym1)
def lead2_shape(pos): x, y = pos return 0<x<10
lead1[lat.shape(lead2_shape, (2,0))]=3 lead1[lat.neighbors()] = 1
The first thing to note here is that lat.vec((0,1)) is the direction along one of the primitive vectors of the triangular lattice underlying the honeycomb lattice. In real space it’s tilted by 30 degrees towards the right from vertical.
Let’s assume that you want your lead to have this orientation. As always, when you use the ‘shape’ method to add sites to the lead, you are expected to provide a shape function that is consistent with the translational symmetry of the lead. I.e. the shape should also be tilted by 30 degrees.
You could solve your problem by providing an appropriate shape function.
Kwant actually does not check that the shape function respects the symmetry. (Doing so strictly is impossible, and a heuristic check would come with its own problems. Besides it can be sometimes useful to provide such “invalid” shapes.) It only evaluates the shape function *somewhere*  after all, since the shape has the same symmetry as the lead, it should not matter where! That somewhere is in the “fundamental domain” of the symmetry, which for ‘TranslationalSymmetry’ objects, is somewhere around the origin. In the case of your snippet, the sites are added at according to your shape function at real space y=0. Due to the 30 degree tilt, this no longer corresponds to the desired region towards the top of the scattering region.
Another solution to your problem would be to use a lead that is actually vertical. This is possible by declaring the symmetry as follows:
sym1 = kwant.TranslationalSymmetry(lat.vec((1,2)))
With this change, the lead is vertical and is attached where you wanted. But note that the number of sites in the until cell of the lead has been doubled. This is due to geometry, there is nothing Kwant can do about it.
Did this clarify things?
Christoph
participants (2)

Christoph Groth

sahu.ajit92＠gmail.com