dear all

I want to plot two different structures in one system. Although it is easy to plot separate lattices with the same structure, I will not be able to solve the problem when the structures are different. For example, I plotted two lattices with the same diamond structure, but when I replaced one of them with a honeycomb structure, I got an error after plotting the system. Apparently and logically, I think there is no bug in my code.

Is there a way to solve this problem? 

I ask you to take a look at my code and report any possible bugs to me.

Thanks

 

###################################################################

import kwant
from math import sqrt


lat = kwant.lattice.general([(0, 0.5, 0.5), (0.5, 0, 0.5), (0.5, 0.5, 0)],
[(15, 15, 15), (15.25, 15.25, 15.25)], name=['a1', 'a2'])
a1, a2 = lat.sublattices


honeycomb = kwant.lattice.general([(1, 0), (1 / 2, sqrt(3) / 2)],
[(0, 0), (0, 1 / sqrt(3))])
subA , subB = honeycomb.sublattices


def make_system(a=25, b=25, c=30):

syst = kwant.Builder()

def cuboid_shape(pos):
x, y, z = pos
return 15 <= x < a and 15 <= y < b and 15 <= z < c

syst[a1.shape(cuboid_shape, (15, 15, 15))] = 1 
syst[a2.shape(cuboid_shape, (15, 15, 15))] = 1
syst[lat.neighbors()] = 1


def graphene_shape(pos):
x,y = pos
return 0 <= x < 10 and 0 <= y < 10 

syst[honeycomb.shape(graphene_shape,(0,0))] = 1
syst[honeycomb.neighbors()] = 1


return syst


def main():

syst= make_system()

kwant.plot(syst)


syst = make_system(a=1.1, b=1.1, c=1.1)

if __name__ == '__main__':
main()

###################################################################