Dear Chan,

The current is calculated along a hopping for a kwant system. This means that it is calculated on any couple of sites hop=(site1,site2).

So if you provide a list of hoppings  L=[(site1,site2), (site3,site4),(site6, site73)], the kwant module will return the currents for those hoppings.

I hope this helps,
Adel

On Mon, Jul 27, 2020 at 3:36 PM Prof. CHAN Kwok Sum <apkschan@cityu.edu.hk> wrote:
Dear Kwant developer,
I want to define a spatially varying current operator which depends on the two sites of a bond. Can this be done giving the “onsite” a function in the current operator definition. According to the manual, the function for onsite has the signature of a Hamiltonian on-site function, does it mean the function can only have one site as its input and cannot have two sites of a bond as input? If “onsite” cannot do the job, any suggestion of how to solve the problem?
Regards,
KS Chan


Disclaimer: This email (including any attachments) is for the use of the intended recipient only and may contain confidential information and/or copyright material. If you are not the intended recipient, please notify the sender immediately and delete this email and all copies from your system. Any unauthorized use, disclosure, reproduction, copying, distribution, or other form of unauthorized dissemination of the contents is expressly prohibited.


--
Abbout Adel