Difference between hop[0].tag and hop[1].tag

Dear users, Good day. My query is about hoppings. In fact, sometimes we have to change the onsite parameters when for instance a magnetic field is applied. What is the difference between hop[0].tag and hop[1].tag My second question the onsite fuction for example: def onsite(site, V):return V why it depends on site where the shape functions for example def circle(pos): rsq = pos[0] ** 2 + pos[1] ** 2 depends on pos Best A BELAYADI

Hello,
What is the difference between hop[0].tag and hop[1].tag
hop[0].tag is the tag of the first site in the hopping and hop[1].tag is the tag of the second site in the hopping.
My second question the onsite fuction for example: def onsite(site, V):return V
why it depends on site where the shape functions for example def circle(pos): rsq = pos[0] ** 2 + pos[1] ** 2 depends on pos
Because when creating a shape in realspace you typically only care about the position, whereas your onsite matrix elements could potentially depend on other things (e.g. the lattice that the site is from) Happy Kwanting, Joe

Dear Joseph. Thank you for your reply. If I got it well, you mean the first site the hopping along x direction and second site the hopping in the y direction. Best A.BELAYADI Le lun. 2 sept. 2019 à 09:15, Joseph Weston <joseph.weston08@gmail.com> a écrit :
Hello,
What is the difference between hop[0].tag and hop[1].tag
hop[0].tag is the tag of the first site in the hopping and hop[1].tag is the tag of the second site in the hopping.
My second question the onsite fuction for example: def onsite(site, V):return V
why it depends on site where the shape functions for example def circle(pos): rsq = pos[0] ** 2 + pos[1] ** 2 depends on pos
Because when creating a shape in realspace you typically only care about the position, whereas your onsite matrix elements could potentially depend on other things (e.g. the lattice that the site is from)
Happy Kwanting,
Joe

Dear Adel, It seems that you did not get it correctly. A hopping is a tuple of two sites which make a bond in your lattice. So the direction is not important. Hop=(site1,site2) Hop[0]=site1 Hop[1]=site2 I suggest to you to have a look at the frequently asked questions in kwant [1]. It explains a lot of interesting things. I hope this helps. Regards, Adel [1] https://kwant-project.org/doc/1/tutorial/faq On Mon, Sep 9, 2019 at 2:15 PM Adel Belayadi <adelphys@gmail.com> wrote:
Dear Joseph. Thank you for your reply. If I got it well, you mean the first site the hopping along x direction and second site the hopping in the y direction. Best A.BELAYADI
Le lun. 2 sept. 2019 à 09:15, Joseph Weston <joseph.weston08@gmail.com> a écrit :
Hello,
What is the difference between hop[0].tag and hop[1].tag
hop[0].tag is the tag of the first site in the hopping and hop[1].tag is the tag of the second site in the hopping.
My second question the onsite fuction for example: def onsite(site, V):return V
why it depends on site where the shape functions for example def circle(pos): rsq = pos[0] ** 2 + pos[1] ** 2 depends on pos
Because when creating a shape in realspace you typically only care about the position, whereas your onsite matrix elements could potentially depend on other things (e.g. the lattice that the site is from)
Happy Kwanting,
Joe
-- Abbout Adel

Dear Adel, I do thank you for link. Everything is clear now since the linke describes in detains (site, family, tag, etc) Regards Adel Le mar. 10 sept. 2019 à 09:40, Abbout Adel <abbout.adel@gmail.com> a écrit :
Dear Adel,
It seems that you did not get it correctly. A hopping is a tuple of two sites which make a bond in your lattice. So the direction is not important.
Hop=(site1,site2) Hop[0]=site1 Hop[1]=site2
I suggest to you to have a look at the frequently asked questions in kwant [1]. It explains a lot of interesting things.
I hope this helps. Regards, Adel
[1] https://kwant-project.org/doc/1/tutorial/faq
On Mon, Sep 9, 2019 at 2:15 PM Adel Belayadi <adelphys@gmail.com> wrote:
Dear Joseph. Thank you for your reply. If I got it well, you mean the first site the hopping along x direction and second site the hopping in the y direction. Best A.BELAYADI
Le lun. 2 sept. 2019 à 09:15, Joseph Weston <joseph.weston08@gmail.com> a écrit :
Hello,
What is the difference between hop[0].tag and hop[1].tag
hop[0].tag is the tag of the first site in the hopping and hop[1].tag is the tag of the second site in the hopping.
My second question the onsite fuction for example: def onsite(site, V):return V
why it depends on site where the shape functions for example def circle(pos): rsq = pos[0] ** 2 + pos[1] ** 2 depends on pos
Because when creating a shape in realspace you typically only care about the position, whereas your onsite matrix elements could potentially depend on other things (e.g. the lattice that the site is from)
Happy Kwanting,
Joe
-- Abbout Adel
participants (3)
-
Abbout Adel
-
Adel Belayadi
-
Joseph Weston