Dear all,
I have a custom lattice that I generate outside of Kwant and I want
specific sites to belong to specific sublattices.
As a minimal reproducible example suppose I have a square lattice
(evidently, this is a crystalline lattice and there are simple ways to do
this in Kwant, but take this lattice just as the simplest example):
lattice = np.array([[x,y] for x in range(20) for y in range(20)])
And I set the system:
def system(basis,size):
syst = kwant.Builder()
lat = kwant.lattice.general([(0,size),(size,0)],basis = basis,norbs=1)
#then the onsite and hoppings etc
return syst.finalized()
I know that lat is automatically split into 400 sublattices (one for each
lattice site) but what I want is, for example, to make every other site be
of sublattice family "b" and the rest of "a" and things along those lines.
Is there a simple way to implement this? I imagine that implementing a
separate class can do the trick, but it seems more complicated than it
should be. Also, I reckon I could instantiate each sublattice as a
different lattice.general and go from there, but again, it doesn't feel
like the proper way to implement it.
In short, I want to make a lattice.general lattice from a custom basis of
N-atoms and I want to specify which sites belong to which sublattices.
Thanks in advance.