Hi,

two things: - My understanding is that the previous poster indeed seems to have rotated the lattice, but this is not the essential part of his solution. The essential part was that he doubled the unit cell, so that graphene effectively got a rectangular lattice (with 4 basis atoms). This works for leads in x and y-direction well. - A more general solution is to do what Anton proposed. I include a sample script below.

Best,

Michael

import kwant import matplotlib.pyplot as plt

lat = kwant.lattice.honeycomb() sys = kwant.Builder()

def rectangle(pos): x, y = pos return 0 < x < 20 and 0 < y < 30

sys[lat.shape(rectangle, (1, 1))] = 0 sys[lat.neighbors()] = -1

sym = kwant.TranslationalSymmetry((-1, 0))

# We specify a specific fundamental domain/unit cell for the # translational symmetry: with other_vecs we add a second # (linear independent) lattice vector that complements the # translational vector above. Both vectors then form a basis. # # Note: - other_vecs must be lattice vectors, i.e. integer vectors. # Also, it only holds for the one (sub)lattice specified in # add_site_family. # - in contrast, kwant.TranslationalSymmetry takes a # real-space vector. This is because it could hold for different # lattices (which have different basis vectors). This real-space # vector is converted internally to a lattice vector for each # lattice. 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)

def lead_shape(pos): x, y = pos return 0 < y < 30

lead[lat.shape(lead_shape, (1,1))] = 0 lead[lat.neighbors()] = -1

sys.attach_lead(lead) sys.attach_lead(lead.reversed())

kwant.plot(sys);

On 25.10.2014 21:51, Joseph Weston wrote:

Hi, I would like to seek clarification regarding a few things about your proposed solution:

My idea is to define a different unit cell for the graphene lattice which allows lattice vectors to be defined in the x and y real space directions. So, instead of using the standard graphene unit cell (which I shall denote with a symbol | which is supposed to indicate the bond joining the two carbon atoms) I used a unit cell that looks like _/ which joins four carbon atoms in a short chain. Repeating this unit cell will generate a graphene flake with armchair edges along the horizontal direction, and zigzag edges along the vertical direction.

If I have understood correctly you have essentially rotated the lattice by a right angle. If this is the case, and if you have attached leads on the left and right as you say then you are no longer simulating the same system as before, surely? Before, the horizontal edges were zigzag and now they are armchair.

As I understand it the transport properties of graphene nanoribbons with armchair or zigzag edges are fundamentally different, so will this not affect any quantities calculated?

I would be interested to see a concrete example using the technique that Anton proposed.

Joseph

On 10/25/14 08:15, David Abergel wrote:

Dear Anton,

thanks very much for your answer to my question.

I actually found a slightly different solution, which I shall document here in case it helps anyone else in the future.

My idea is to define a different unit cell for the graphene lattice which allows lattice vectors to be defined in the x and y real space directions. So, instead of using the standard graphene unit cell (which I shall denote with a symbol | which is supposed to indicate the bond joining the two carbon atoms) I used a unit cell that looks like _/ which joins four carbon atoms in a short chain. Repeating this unit cell will generate a graphene flake with armchair edges along the horizontal direction, and zigzag edges along the vertical direction.

If a is the length of the lattice vector of the original (two-atom) unit cell, then the lattice vectors of the new unit cell are: (sqrt(3)*a,0), and (0,a).

The positions of the four atoms within the unit cell are: (0,a/2), (a/(2*sqrt(3), 0), (sqrt(3)*a/2, 0), and (2*a/sqrt(3),a/2).

This can be easily defined using the kwant.lattice.general() method as shown in the examples in the documentation. When leads are attached to the left and right ends (with translational symmetry (Âħsqrt(3)*a,0)) of a rectangular scattering region formed in this way, they do so in the vertical direction, as desired.

Hope that helps.

David

On 23/10/14 19:47, Anton Akhmerov wrote:

Dear David,

Currently a Kwant symmetry stores the extra directions that describe how it handle various lattices. If you don't do anything, the choice of the extra directions happens automatically, and a Bravais lattice vector is chosen. However you can manually override this by using the add_site_family method of the TranslationalSymmetry (see http://kwant-project.org/doc/1.0/reference/generated/kwant.lattice.Translati...

for details). I know several people have used this to solve exactly the problem that you currently encounter.

Best, Anton

On Thu, Oct 23, 2014 at 4:40 PM, David Abergel david.abergel@nordita.org wrote:

Dear all,

I am having a problem defining a system which matches what I want.

I start by defining a rectangular graphene lattice of size 0<=x<L in the x direction and 0<=x<W in the y direction. (By "rectangular" I mean in the real space coordinates, not the crystallographic coordinates.)

I want to attach a lead to the left-had end of this rectangle, going to minus infinity. Therefore, I define a lead with translational symmetry (-1,0) and the appropriate hopping. I attach the lead and plot the system.

When I plot the system, I find that the lead has been attached along the (0,1) crystallographic direction (so, that is along the (1/2, sqrt(3)/3) real space vector). A triangle of extra sites have been added for x<0 (real space) so that the total shape of the scattering region is now not rectangular.

If I attach another lead with lead.reversed(), a similar thing happens on the right of the sample so that my scattering region is now a parallelogram.

As I understand it, this should not affect the physics in any way, since the lead is semi-infinite. But, if I want to draw pictures, plot functions over the scattering region, and gain physical understanding, it is a bit of a pain. So, my question is whether there is any way to make the lead attach along the (0,1) real space direction (which is the same as the (-1,2) crystallographic direction) and yet maintain the (-1,0) translational symmetry?

If you require a sample program which reproduces this behavior then I can easily provide that, but I thought I should not extend an already long post unnecessarily.

Thanks in advance.

David

-- David Abergel Nordita david.abergel@nordita.org @David_Abergel