Dear KWANT developers, I want to generate a 3D annulus cylinder with hopping in all the three directions(periodic in x-direction) like the following figure. Please suggest me the way to generate such type of geometry. If possible then provide an example code for that for better understanding. [image: image.png] I will be very thankful to you. Naveen -- With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
Hi,
Dear KWANT developers,
I want to generate a 3D annulus cylinder with hopping in all the three directions(periodic in x-direction) like the following figure. Please suggest me the way to generate such type of geometry. If possible then provide an example code for that for better understanding.
image.png
You can use a 'shape' function as shown in Kwant tutorial 2.3: https://kwant-project.org/doc/1/tutorial/spin_potential_shape#nontrivial-sha.... The code will be almost exactly the same as the ring example in the tutorial, except that you will have 3 coordinates instead of 2. Happy Kwanting, Joe
Problem solved. Thanks a lot sir. On Fri, Aug 9, 2019 at 2:45 PM Joseph Weston <joseph.weston08@gmail.com> wrote:
Hi,
Dear KWANT developers,
I want to generate a 3D annulus cylinder with hopping in all the three directions(periodic in x-direction) like the following figure. Please suggest me the way to generate such type of geometry. If possible then provide an example code for that for better understanding.
[image: image.png]
You can use a 'shape' function as shown in Kwant tutorial 2.3: https://kwant-project.org/doc/1/tutorial/spin_potential_shape#nontrivial-sha.... The code will be almost exactly the same as the ring example in the tutorial, except that you will have 3 coordinates instead of 2.
Happy Kwanting,
Joe
-- With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
Dear sir, Could we attach *circular leads* to the inner and outer circle of annulus geometry in 3D? Please suggest me if there is a way to do that. Thank you. Naveen On Fri, Aug 9, 2019 at 3:26 PM Naveen Yadav <naveengunwal72@gmail.com> wrote:
Problem solved. Thanks a lot sir.
On Fri, Aug 9, 2019 at 2:45 PM Joseph Weston <joseph.weston08@gmail.com> wrote:
Hi,
Dear KWANT developers,
I want to generate a 3D annulus cylinder with hopping in all the three directions(periodic in x-direction) like the following figure. Please suggest me the way to generate such type of geometry. If possible then provide an example code for that for better understanding.
[image: image.png]
You can use a 'shape' function as shown in Kwant tutorial 2.3: https://kwant-project.org/doc/1/tutorial/spin_potential_shape#nontrivial-sha.... The code will be almost exactly the same as the ring example in the tutorial, except that you will have 3 coordinates instead of 2.
Happy Kwanting,
Joe
--
With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
-- With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
Hi,
Dear sir,
Could we attach *circular leads* to the inner and outer circle of annulus geometry in 3D? Please suggest me if there is a way to do that.
What do you mean by circular leads? Do you mean leads with a circle cross-section (i.e. a semi-infinite cylinder lead)? If so then all you need to do is create a lead with a circular cross-section uses 'lat.shape' in a similar way to how you created the scattering region. You can attach leads to the interior of the annulus by specifying the parameter 'origin' to be a site in the interior of the annulus when calling 'attach_lead' (see the documentation [1]). e.g.: syst.attach_lead(lead, origin=lat(0, 0)) # lat(0, 0) is in the hole of the annulus Happy Kwanting, Joe [1]: https://kwant-project.org/doc/1/reference/generated/kwant.builder.Builder#kw...
Dear sir, syst.attach_lead(lead, origin=lat(0, 0, 0)) # lat(0, 0, 0) is in the hole of the annulus This is okay. But I want to create leads in the radial direction, suppose X is the width of cylinder, Y is circumference and Z is the Difference in outer and inner radii. So, I want to create leads wrapped around Y, for inner circumference lead should directed towards origin and for outer circle directed away from the origin. Code for creating annulus geometry is given below- import kwant import scipy.sparse.linalg as sla import matplotlib.pyplot as plt import tinyarray import numpy as np from numpy import cos, sin, pi import cmath from cmath import exp sigma_0 = tinyarray.array([[1, 0], [0, 1]]) sigma_x = tinyarray.array([[0, 1], [1, 0]]) sigma_y = tinyarray.array([[0, -1j], [1j, 0]]) sigma_z = tinyarray.array([[1, 0], [0, -1]]) def make_system(a=1, L=22, r_in=22, r_out=30, t=1.0, t_x=1.0, t_y=1.0, t_z=1.0, lamda=0.2, beta=1.05, phi_uc = 0.0078): # ring shape def ring(pos): (z, y, x) = pos rsq = y ** 2 + z ** 2 return r_in ** 2 <= rsq <= r_out ** 2 and x in range (L) def onsite(site): return (t_z * cos(beta) + 2 * t) * sigma_z def hoppingx(site0, site1): return (-0.5 * t * sigma_z - 0.5 * 1j * t_x * sigma_x) def hoppingy(site0, site1): return -0.5 * t * sigma_z - 0.5 * 1j * t_y * sigma_y def hoppingz(site0, site1): y = site1.pos[1] return (-0.5 * t_z * sigma_z - 0.5 * 1j * lamda * sigma_0) * exp(2 * pi * 1j * phi_uc * a * (y-40)) syst = kwant.Builder() lat = kwant.lattice.cubic(a, norbs=2) syst[lat.shape(ring, (0, r_in+1, 0))] = onsite syst[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingz syst[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy syst[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingx lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0, 0))) lead[lat.shape(ring, (0, r_in+1, 0))] = onsite lead[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingz lead[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy lead[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingx syst.attach_lead(lead) syst.attach_lead(lead, origin=lat(0,0,0)) return syst def analyze_system(): syst = make_system() fig = plt.figure() ax = kwant.plot(syst) ax.savefig('sys2.png',dpi=200) def main(): syst = make_system() analyze_system() main() On Tue, Aug 13, 2019 at 3:18 PM Joseph Weston <joseph.weston08@gmail.com> wrote:
Hi,
Dear sir,
Could we attach *circular leads* to the inner and outer circle of annulus geometry in 3D? Please suggest me if there is a way to do that.
What do you mean by circular leads? Do you mean leads with a circle cross-section (i.e. a semi-infinite cylinder lead)? If so then all you need to do is create a lead with a circular cross-section uses 'lat.shape' in a similar way to how you created the scattering region. You can attach leads to the interior of the annulus by specifying the parameter 'origin' to be a site in the interior of the annulus when calling 'attach_lead' (see the documentation [1]). e.g.:
syst.attach_lead(lead, origin=lat(0, 0)) # lat(0, 0) is in the hole of the annulus
Happy Kwanting,
Joe
[1]: https://kwant-project.org/doc/1/reference/generated/kwant.builder.Builder#kw...
-- With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
Dear Naveen, These inwards- and outwards- facing leads wouldn't have translation invariance. This makes one unable to compute a mode decomposition in such a geometry, and therefore computing the conductance becomes extremely difficult. Right now Kwant only implements the algorithms that assume translationally invariant leads. Best, Anton On Tue, 13 Aug 2019 at 14:15, Naveen Yadav <naveengunwal72@gmail.com> wrote:
Dear sir,
syst.attach_lead(lead, origin=lat(0, 0, 0)) # lat(0, 0, 0) is in the hole of the annulus This is okay. But I want to create leads in the radial direction, suppose X is the width of cylinder, Y is circumference and Z is the Difference in outer and inner radii. So, I want to create leads wrapped around Y, for inner circumference lead should directed towards origin and for outer circle directed away from the origin. Code for creating annulus geometry is given below-
import kwant import scipy.sparse.linalg as sla import matplotlib.pyplot as plt import tinyarray import numpy as np from numpy import cos, sin, pi import cmath from cmath import exp
sigma_0 = tinyarray.array([[1, 0], [0, 1]]) sigma_x = tinyarray.array([[0, 1], [1, 0]]) sigma_y = tinyarray.array([[0, -1j], [1j, 0]]) sigma_z = tinyarray.array([[1, 0], [0, -1]])
def make_system(a=1, L=22, r_in=22, r_out=30, t=1.0, t_x=1.0, t_y=1.0, t_z=1.0, lamda=0.2, beta=1.05, phi_uc = 0.0078): # ring shape def ring(pos): (z, y, x) = pos rsq = y ** 2 + z ** 2 return r_in ** 2 <= rsq <= r_out ** 2 and x in range (L)
def onsite(site): return (t_z * cos(beta) + 2 * t) * sigma_z
def hoppingx(site0, site1): return (-0.5 * t * sigma_z - 0.5 * 1j * t_x * sigma_x)
def hoppingy(site0, site1): return -0.5 * t * sigma_z - 0.5 * 1j * t_y * sigma_y
def hoppingz(site0, site1): y = site1.pos[1] return (-0.5 * t_z * sigma_z - 0.5 * 1j * lamda * sigma_0) * exp(2 * pi * 1j * phi_uc * a * (y-40))
syst = kwant.Builder() lat = kwant.lattice.cubic(a, norbs=2) syst[lat.shape(ring, (0, r_in+1, 0))] = onsite syst[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingz syst[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy syst[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingx
lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0, 0)))
lead[lat.shape(ring, (0, r_in+1, 0))] = onsite lead[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingz lead[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy lead[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingx
syst.attach_lead(lead) syst.attach_lead(lead, origin=lat(0,0,0)) return syst
def analyze_system(): syst = make_system() fig = plt.figure() ax = kwant.plot(syst) ax.savefig('sys2.png',dpi=200)
def main(): syst = make_system() analyze_system() main()
On Tue, Aug 13, 2019 at 3:18 PM Joseph Weston <joseph.weston08@gmail.com> wrote:
Hi,
Dear sir,
Could we attach circular leads to the inner and outer circle of annulus geometry in 3D? Please suggest me if there is a way to do that.
What do you mean by circular leads? Do you mean leads with a circle cross-section (i.e. a semi-infinite cylinder lead)? If so then all you need to do is create a lead with a circular cross-section uses 'lat.shape' in a similar way to how you created the scattering region. You can attach leads to the interior of the annulus by specifying the parameter 'origin' to be a site in the interior of the annulus when calling 'attach_lead' (see the documentation [1]). e.g.:
syst.attach_lead(lead, origin=lat(0, 0)) # lat(0, 0) is in the hole of the annulus
Happy Kwanting,
Joe
[1]: https://kwant-project.org/doc/1/reference/generated/kwant.builder.Builder#kw...
--
With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
Dear Sir, Thank you for the clarification. Naveen Department of Physics & Astrophysics University of Delhi New Delhi-110007 On Tue, Aug 13, 2019, 17:56 Anton Akhmerov <anton.akhmerov+kd@gmail.com> wrote:
Dear Naveen,
These inwards- and outwards- facing leads wouldn't have translation invariance. This makes one unable to compute a mode decomposition in such a geometry, and therefore computing the conductance becomes extremely difficult. Right now Kwant only implements the algorithms that assume translationally invariant leads.
Best, Anton
On Tue, 13 Aug 2019 at 14:15, Naveen Yadav <naveengunwal72@gmail.com> wrote:
Dear sir,
syst.attach_lead(lead, origin=lat(0, 0, 0)) # lat(0, 0, 0) is in the
hole of the annulus
This is okay. But I want to create leads in the radial direction, suppose X is the width of cylinder, Y is circumference and Z is the Difference in outer and inner radii. So, I want to create leads wrapped around Y, for inner circumference lead should directed towards origin and for outer circle directed away from the origin. Code for creating annulus geometry is given below-
import kwant import scipy.sparse.linalg as sla import matplotlib.pyplot as plt import tinyarray import numpy as np from numpy import cos, sin, pi import cmath from cmath import exp
sigma_0 = tinyarray.array([[1, 0], [0, 1]]) sigma_x = tinyarray.array([[0, 1], [1, 0]]) sigma_y = tinyarray.array([[0, -1j], [1j, 0]]) sigma_z = tinyarray.array([[1, 0], [0, -1]])
def make_system(a=1, L=22, r_in=22, r_out=30, t=1.0, t_x=1.0, t_y=1.0, t_z=1.0, lamda=0.2, beta=1.05, phi_uc = 0.0078): # ring shape def ring(pos): (z, y, x) = pos rsq = y ** 2 + z ** 2 return r_in ** 2 <= rsq <= r_out ** 2 and x in range (L)
def onsite(site): return (t_z * cos(beta) + 2 * t) * sigma_z
def hoppingx(site0, site1): return (-0.5 * t * sigma_z - 0.5 * 1j * t_x * sigma_x)
def hoppingy(site0, site1): return -0.5 * t * sigma_z - 0.5 * 1j * t_y * sigma_y
def hoppingz(site0, site1): y = site1.pos[1] return (-0.5 * t_z * sigma_z - 0.5 * 1j * lamda * sigma_0) * exp(2 * pi * 1j * phi_uc * a * (y-40))
syst = kwant.Builder() lat = kwant.lattice.cubic(a, norbs=2) syst[lat.shape(ring, (0, r_in+1, 0))] = onsite syst[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingz syst[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy syst[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingx
lead = kwant.Builder(kwant.TranslationalSymmetry((-a, 0, 0)))
lead[lat.shape(ring, (0, r_in+1, 0))] = onsite lead[kwant.builder.HoppingKind((1, 0, 0), lat, lat)] = hoppingz lead[kwant.builder.HoppingKind((0, 1, 0), lat, lat)] = hoppingy lead[kwant.builder.HoppingKind((0, 0, 1), lat, lat)] = hoppingx
syst.attach_lead(lead) syst.attach_lead(lead, origin=lat(0,0,0)) return syst
def analyze_system(): syst = make_system() fig = plt.figure() ax = kwant.plot(syst) ax.savefig('sys2.png',dpi=200)
def main(): syst = make_system() analyze_system() main()
On Tue, Aug 13, 2019 at 3:18 PM Joseph Weston <joseph.weston08@gmail.com> wrote:
Hi,
Dear sir,
Could we attach circular leads to the inner and outer circle of annulus
geometry in 3D? Please suggest me if there is a way to do that.
What do you mean by circular leads? Do you mean leads with a circle
cross-section (i.e. a semi-infinite cylinder lead)? If so then all you need to do is create a lead with a circular cross-section uses 'lat.shape' in a similar way to how you created the scattering region. You can attach leads to the interior of the annulus by specifying the parameter 'origin' to be a site in the interior of the annulus when calling 'attach_lead' (see the documentation [1]). e.g.:
syst.attach_lead(lead, origin=lat(0, 0)) # lat(0, 0) is in the
hole of the annulus
Happy Kwanting,
Joe
[1]:
https://kwant-project.org/doc/1/reference/generated/kwant.builder.Builder#kw...
--
With Best Regards NAVEEN YADAV Ph.D Research Scholar Deptt. Of Physics & Astrophysics University Of Delhi.
participants (3)
-
Anton Akhmerov
-
Joseph Weston
-
Naveen Yadav