Dear Vargan,

Yes, you can do that if you use the scipy function scipy.sparse.linalg.eigsh.
You can choose the number of the returned eigenvalues and near which energy will they be picked up. 

For this purpose, you have to rebuild the function giving the bands as done in the source code.
Here is an example, without all the warnings and checking done usually in the kwant source code.

I hope this helps,
Adel
##############################
import math
import scipy
params=dict(phi=0)             #your parameters
sysf=make_system().finalized() # Finalized system
syst = sysf.leads[0]           # The lead of the system  

# Equation to solve is
# (V^\dagger e^{ik} + H + V e^{-ik}) \psi = E \psi

ham = syst.cell_hamiltonian(params=params)
hop0 = syst.inter_cell_hopping( params=params)
hop = np.empty(ham.shape, dtype=complex)
hop[:, : hop.shape[1]] = hop
hop[:, hop.shape[1]:] = 0

#The hamiltonian to diagonalize for a given momentum k
def Hamlitonian(k):
    mat = hop * complex(math.cos(k), -math.sin(k))
    h0 = mat + mat.conjugate().transpose() + ham
    return h0

#example for k=0.3
HAM=Hamlitonian(0.3)
#be careful, in the following, k is the  number of returned eigenvalues
Vals=scipy.sparse.linalg.eigsh(R,k=4,return_eigenvectors=False)

###########################################################
On Fri, Jul 16, 2021 at 1:16 PM Vardan Kaladzhyan <vardan.kaladzhyan@phystech.edu> wrote:
Dear Kwant Developers,

I am using kwant.physics.Bands to obtain the bands for a three-dimensional setup with one 'momentum'. Hence, I am inserting a set of momenta and getting a set of energies for each momentum. 

Is there a way to ask Kwant to only compute the lowest bands? My system is quite large and calculating all the bands is extremely time-consuming. 

Thank you!

Cheers,
Vardan.


--
Abbout Adel