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

Reply via email to