1) The chain consists of a single large unit cell. Then we can inizialize the lattice implementing
Code: Select all
def __init__(self, n, site_list,**kwargs):
site_1=site_1()
site_2=site_2()
sites = [site_1 if s == "s_1" else site_2 for s in site_list]
super(supersite_chain_arbitrary, self).__init__([n], sites, **kwargs)
Code: Select all
["s_1","s_1","s_2","s_1","s_2"]
2) I define a regular lattice consisting of "s_1" only and then I use the IrregularLattice class to insert the "s_2" sites in the appropriate positions. This second approach seems more reasonable and it is what I would go for, but I am wondering if there is something even simpler that I am missing. For instance, I thought there would be a way to initialize the whole lattice (and not just the unit cell) by directly imputing the list of sites, but I did not find anything like that in the documentation. Do you know if such a feature exists and I am just missing it?