Hi,
So, for example, I can print the on-site energies or the hopping integrals of the sites I want using:
..
However, I am still unsure about the 'where' argument
-------------------------------------------------------------------------------------------------
J = kwant.operator.Current(kwant_sys, where=kwant_sys[lattice.sublattices[4](0,0,-1), lattice.sublattices[6](0,0,-1)]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "kwant/operator.pyx", line 883, in kwant.operator.Current.__init__ File "kwant/operator.pyx", line 217, in kwant.operator._normalize_hopping_where File "kwant/operator.pyx", line 218, in genexpr ValueError: need more than 1 value to unpack J = kwant.operator.Current(kwant_sys, where=(lattice.sublattices[4](0,0,-1), lattice.sublattices[6](0,0,-1))) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "kwant/operator.pyx", line 883, in kwant.operator.Current.__init__ File "kwant/operator.pyx", line 223, in genexpr File "kwant/operator.pyx", line 223, in genexpr AttributeError: 'Builder' object has no attribute 'graph'
There are 2 problems here: 1. 'where' expects a *sequence* of places where you would like to evaluate the current. In your code snippet you pass the value function associated with some hopping. Using your example this would be something like this: lat1 = lattice.sublattices[4] lat2 = lattice.sublattices[6] J = kwant.operator.Current(syst, where=[(lat1(0, 0, -1), lat2(0, 0, -1))]) 2. 'Current' expects a *finalized* system, but you pass it an *unfinalized* system (Kwant calls this a "Builder"). Does that make sense? Can you also please point me to where you looked in the documentation and explain which bits were confusing? This will help us improve the documentation! Happy Kwanting, Joe