Dear Adel,
Thank you for your response. I am trying to use your Instructions for finding all site in the scattering region and also finding eigenvalu but I can not. That is very kind of you if you send me a short example of these problem. Would you please?
Best regard
Sajad
From: "Abbout Adel"
To: "Saj.ZiaBorujeni"
Cc: "kwant-discuss"
Sent: Saturday, Azar 2, 1398 7:21:58 PM
Subject: Re: [Kwant] Access to eigenvalue, eigenvector and number of points in each unit cell
Dear Sajad,
Getting the number of sites in the central system is easy in kwant.
sysf= syst.finalized()
Sites= list(sysf.sites) #list of all the sites in the scattering region
number_of_sites=len(Sites).
Getting the Hamiltonian of the central system is also straightforward:
H=sysf.hamiltonian_submatrix()
I want just to stress that the eigenvalues of this Hamiltonian have nothing to do with the band structure. In fact, to get the band structure, you need the hamiltonian H0 of the unit cell in the lead and the hopping matrix V between two unit cells. With the help of the Bloch theorem, the band can be obtained by diagonalizing:
H0+V*exp(+ik)+V^\dagger *exp(-ik) for all your k points.
ps: (H and H0 may be different depending on how you define your system!)
I hope this helps.
Adel
On Sat, Nov 23, 2019 at 1:09 AM Saj.ZiaBorujeni < saj.ziaborujeni.sci@iauctb.ac.ir > wrote:
Dear Joseph Weston,
yes you are right.
"I am trying to create a system with translational symmetry, and that each Kwant *site* corresponds to a single atom."
We know according to the nanoribbon, we have a scattering region that is attached to the leads. I want to find the number of kwant site (which I mentioned as atom) in the scattering region (which I mentioned as unit cell).
Please look at the following example for the graphene nanoribbon:
import kwant
from math import sqrt
import matplotlib.pyplot as plt
import tinyarray
import numpy as np
import math
import cmath
import matplotlib
d=1.42;
a1=d*math.sqrt(3)
t=-3.033;
latt = kwant.lattice.general([(a1,0),(a1*0.5,a1*math.sqrt(3)/2)],
[(a1/2,-d/2),(a1/2,d/2)])
a,b = latt.sublattices
syst= kwant.Builder()
#...................................................................................
def rectangle(pos):
x, y = pos
z=x**2+y**2
return -2.9*a1
To: "Saj.ZiaBorujeni" < saj.ziaborujeni.sci@iauctb.ac.ir >, kwant-discuss@kwant-project.org
Sent: Thursday, Aban 30, 1398 3:59:57 PM
Subject: Re: [Kwant] Access to eigenvalue, eigenvector and number of points in each unit cell
Hi Sajad,
Dear all,
I need to access to the number of atoms of my unit cell, the eigenvalue and eigenvectors for each eigenvalue of my Hamiltonian.
Is there any one to help me and let me know if it is possible in kwan to access them.
Could you post a short code example showing what you are doing? You refer to "atoms" and "unit cell", so I presume that you are trying to create a system with translational symmetry, and that each Kwant *site* corresponds to a single atom.
It is not 100% clear to me what you want when you say "the eigenvectors and eigenvalue" of your Hamiltonian; if your system has translational symmetry then presumably you want the eigen-decomposition *at a given quasi-momentum*, but you do not explicitly state this, so I am not sure.
Posting a complete code example is useful because it is more precise than describing your problem with words.
Happy Kwanting,
Joe
--
Abbout Adel