So, for example, I can print the on-site energies or the hopping
integrals of the sites I want using:
-----
print(kwant_sys[lattice.sublattices[4](0,0,-1))
and
print(kwant_sys[lattice.sublattices[4](0,0,-1),
lattice.sublattices[6](0,0,-1)])
-----
respectively.
I can get the tags and families of the sites as such:
-----
for x in kwant_sys.sites():
... print(x.tag, ',', x.family)
...
[0 0 -1] , <Monatomic lattice 0>
[0 0 -1] , <Monatomic lattice 1>
....
------
However, I am still unsure about the 'where' argument
-------------------------------------------------------------------------------------------------
J = kwant.operator.Current(kwant_sys,
where=kwant_sys[lattice.sublattices[4](0,0,-1),
lattice.sublattices[6](0,0,-1)])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "kwant/operator.pyx", line 883, in kwant.operator.Current.__init__
File "kwant/operator.pyx", line 217, in
kwant.operator._normalize_hopping_where
File "kwant/operator.pyx", line 218, in genexpr
ValueError: need more than 1 value to unpack
J = kwant.operator.Current(kwant_sys,
where=(lattice.sublattices[4](0,0,-1),
lattice.sublattices[6](0,0,-1)))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "kwant/operator.pyx", line 883, in kwant.operator.Current.__init__
File "kwant/operator.pyx", line 223, in genexpr
File "kwant/operator.pyx", line 223, in genexpr
AttributeError: 'Builder' object has no attribute 'graph'
--------------------------------------------------------------------------------------------------
Eleni
----- Forwarded message from [email protected] -----
Date: Mon, 26 Mar 2018 17:19:18 +0300
From: [email protected]
Subject: Re: [Kwant] Visualize current through a 2D cut for a 3D system
To: [email protected]
Hello Anton,
Thank you very much for your reply.
I am having a hard time with the "where" argument in
kwant.operator.Current. My system is not finalized. How can I find the
sites associated with the hopping? By their tag? Their position? Do
you have a piece of code for that?
Note that I am using TBModels and Wannier90 and the lattice has one
sublattice for each WF (or site, or orbital). norb is not defined, but
I see that
for x in lattice.sublattices:
x.norbs=1
works and looks correct.
Regards,
Eleni
Quoting Anton Akhmerov <[email protected]>:
Dear Eleni,
I think this should be doable with not too much of low level work.
* Firstly you probably will want to select only the hoppings that are
close to the 2D cut. You can do this by using "where" parameter to
Current operator (see
https://kwant-project.org/doc/1/reference/generated/kwant.operator.Current#kwant.operator.Current)
* After computing the current across those hoppings, you would need to
call kwant.plotter.interpolate_current. This function only does the
interpolation, but no plotting. Having that interpolation in 3D you
need to slice it and probably take a projection onto 2D plane.
* Finally, the resulting 2D array you can feed to kwant.plotter.streamplot
kwant.plotter.current is essentially a straightforward combination of
kwant.plotter.interpolate_current and kwant.plotter.streamplot
Also: your problem sounds like a useful thing to do. Please let me
know if you succeed, and what you ended up doing (or if you face any
further problems as well).
Best,
Anton
On Fri, Mar 23, 2018 at 5:22 PM, <[email protected]> wrote:
Hello everyone,
Is there currently way to visualize the current through a 2D cut for a 3D
system that does not involve messing with the kwant code?
I have a 3D system and would like to see the differences in the current when
I switch some specific hoppings on and off.
Regards,
--
Dr. Eleni Chatzikyriakou
Computational Physics lab
Aristotle University of Thessaloniki
[email protected] - tel:+30 2310 998109
--
Dr. Eleni Chatzikyriakou
Computational Physics lab
Aristotle University of Thessaloniki
[email protected] - tel:+30 2310 998109
----- End forwarded message -----
--
Dr. Eleni Chatzikyriakou
Computational Physics lab
Aristotle University of Thessaloniki
[email protected] - tel:+30 2310 998109