Dear Tibor,
The order of the sites in the Hamiltonian is the same as for sys.sites. So you just need to find the number ( index) of your sites <2,5,a| and <1,2,b|.
you can do this the following way:
# List containing the (tag,family) of the sites with the same order as sys.sites
Liste=[(sys.sites[i].tag, sys.sites[i].family) for i in range(len(sys.sites))]
H= sys.hamiltonian_submatrix() #the Hamiltonian of the sys
# This function returns the value of the Hamiltonian
# x and y have the form (tag,family). Ex: x=([1,2],a)
def H_value(x,y):
k=Liste.index(x)
l=Liste.index(y)
return H[k,l]
#value of <2,5,a|H|1,2,b>
value=H_value(([2, 5],a),([1, 2],b))
For the second part of your question, you shoud know that for a finite system, the spectrum is not continuous (it is discrete) and can be obtained just by diagonalising your Hamiltonian. This is true even if you put periodic boundary conditions. Think about a 1D chain of lenght L:
the eigenvalues are e_m= -2t cos(m pi/(L+1)). m=1..L
if you put the periodic boundary condition, you will just have :
e_m=-2t cos(2 m pi/L), m=1..L
In general, when we talk about the relation of the dispersion, we mean that of the leads (which are infinite) independently from the shape of the scattering region.
I hope that this helps.
Best regards,
Adel