Hello everyone,
I'm not sure what I am doing wrong, but here is the output when using
interpolate_current():
--------------------------------------------------------------------
kwant_sys = wraparound.wraparound(kwant_model).finalized()
ham_mat = kwant_sys.hamiltonian_submatrix(sparse=False)
evecs = sla.eigsh(ham_mat, k=48, which='SM')[1]
J = kwant.operator.Current(kwant_sys)
current = J(evecs[:, 9])
IJ = kwant.plotter.interpolate_current(kwant_sys, J)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/apps/applications/python/anaconda3/5.0.1/lib/python3.6/site-packages/kwant/plotter.py", line 1852, in
interpolate_current
if len(current) != syst.graph.num_edges:
TypeError: object of type 'kwant.operator.Current' has no len()
current
array([ 1.04495760e-10, 1.04407946e-10, 4.08360326e-10, ...,
-5.89810275e-10, -2.77384947e-10, 1.41194501e-10])
----------------------------------------------------------------------------
I was also looking at this thread:
https://mailman-mail5.webfaction.com/pipermail/kwant-discuss/2017-October/001466.html
and I think I will try also using ipyvolume or mayavi. But I would
like to know if there is a problem with this being a closed system.
Regards,
Eleni
Quoting Anton Akhmerov <anton.akhmerov...@gmail.com>:
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, <elch...@auth.gr> 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
elch...@auth.gr - tel:+30 2310 998109
--
Dr. Eleni Chatzikyriakou
Computational Physics lab
Aristotle University of Thessaloniki
elch...@auth.gr - tel:+30 2310 998109