Dear Hari,

The extra sites added when you attach a lead  are not there because n>1.
The lead is constructed and sites are added until all the lead meets your
system on all its width. So it is mainly due to the shape of the interface
lead/system.

The extra sites will be added automatically to your sys.sites and they will
take the potential of the lead and not what you defined as a potential in
the system.
This point is very important since sometimes, the potential in the system
is defined using  a function and in the lead using just scalars.
so sys[site] will return a function if it belongs to the initial system,
and will return a scalar if it is an added site.
This means, if you want to get the value of the potential in the first case
you have to write:
sys[site](site,**params), where params are the parameters of your function.
in the second case, sys[site] will return the requested value.

This is important if you are plotting the system and using a color
dependent on the potential for example.

If you want to have the list of the added sites, you can do as follows:
Added_sites=sys.attach_lead(lead1) .


I hope this helps ,

Adel


On Fri, Nov 25, 2022 at 1:01 PM Hari Gautam <gautamhari1...@gmail.com>
wrote:

> Dear Adel,
> Thank you for the link.
>
> I have another question regarding the translation symmetry.
> symlead=kwant.TranslationalSymmetry((-n*a,0))
> lead=kwant.Builder(symlead)
> sys.attach(lead)
> sys.attach(lead.reversed())
>
> If n>1, then, there is some extra addition of the layers of the lead to
> the scattering region (different numbers on right and left side of the
> scattering region) when I use kwant.plot(sys) and sys.finalized().sites().
>
> If I use params for defining the onsite and hopping term for cases with
> n>1, will the kwant be able to recognize this layers or do I need to define
> by myself which layer is the main scattering regions and which one is the
> additional lead layers added due to the translation symmetry?
>
> Thank you
> Hari
>


-- 
Abbout Adel

Reply via email to