Dear Anton,

Thanks for the quick reply.
Yes, the code was from the Kwant website at this this
<https://kwant-project.org/doc/1.0/tutorial/tutorial6> link. However, the
link does go to Kwant 1.0.5, and I assumed the same would carry on into the
newer version of Kwant as well. I couldn't find this method of plotting
(where we address the sites of a finalized system via sys.sites[i]) for
Kwant 1.3.2 and got a little confused.

The code works perfectly now. Thanks a lot for your help!

Best Regards,
Shivang


On Wed, Jun 13, 2018 at 1:22 AM Anton Akhmerov <[email protected]>
wrote:

> Dear Shivang,
>
> I believe the code you consider is from a previous version of Kwant.
> Now it'd be syst.sites[i]. Can you please let us know where you found
> that code? Was it in the Kwant documentation?
>
> Best,
> Anton
> On Tue, Jun 12, 2018 at 8:58 PM Shivang Agarwal
> <[email protected]> wrote:
> >
> > Hello All,
> >
> > I am looking to plot the wavefunction (both magnitude and phase on
> separate plots).
> > The kwant.plotter.map method doesn't give a very appealing look as it
> plots only in large sized triangles. The kwant.plotter.plot method seems
> better but I get stuck in one part. There is a piece of code that reads:
> >
> > def family_shape(i):
> >         site = sys.site(i)
> >         return ('p', 3, 180) if site.family == a else ('p', 3, 0)
> >
> > However, it gives the following error:
> >
> > AttributeError: 'FiniteSystem' object has no attribute 'site'
> >
> > This snippet was taken from online kwant tutorials itself. I am unable
> to get to the bottom of this error message because the tutorial uses the
> exact same code. Is there an update to some library of kwant that solves
> this? Or is there any other way to get better plots for wavefunctions on a
> system without using the sys.site(i) command?
> > I would like the wave functions to look smooth and continuous.
> >
> > Any help would be appreciated.
> >
> > Best Regards,
> > Shivang
> >
> > --
> > Shivang Agarwal
> > Junior Undergraduate
> > Discipline of Electrical Engineering
> > IIT Gandhinagar
> >
> > Contact: +91-9869321451
>


-- 
*Shivang Agarwal*
Junior Undergraduate
Discipline of Electrical Engineering
IIT Gandhinagar

Contact: +91-9869321451

Reply via email to