Dear Eudes,

You created a general 3D square lattice and an amorphous lattice.
So it is normal that you will need integers for the site you create with the 3D  lattice.

Just use the lattice that you called "atoms".

Another remark: If you are studying systems like nanobubles in Graphene, although the texture is curved, you do not need to go to 3D. Indeed, just use the 2D structure and change the hopping according to what the deformations gives you.

I hope this helps.

On Tue, Nov 26, 2019 at 5:34 PM EUDES THOMAS GOMES DA SILVA <> wrote:
Hi dears, 

I am trying to study curved structures on Kwant and i've already done a code that gives me the coordinates for all atoms.
What I have done was to curve a graphene sheet. By now, I am trying to add the hoppings to its structure, but as my structure does not have "symmetry"
when I write down:

lat = kwant.lattice.general([(1,0,0), (0,1,0), (0,0,1)],norbs=3)

syst[sites[0], lat(surface[0][0],surface[1][0],surface[2][0])] = -t

where surface[0][0], surface[1][0], surface[2][0] are the coordinates x, y and z of the first atom and sites[0] is the first site.

I create a curved surface and make my Kwant Ambient as follow:

class SURFACE(kwant.builder.SimpleSiteFamily):
    def normalize_tag(self, tag):
        return tinyarray.array(tag, float)
    def pos(self, tag):
        return tag

atoms = SURFACE(norbs=3)
syst = kwant.Builder()
sites = []
for i in range(int(len(surface[0]))):
    x = surface[0][i]
    y = surface[1][i]
    z = surface[2][i]

My question is:

When I write  lat(surface[0][0],surface[1][0],surface[2][0]) it does not stay at the
real surface[0][0],surface[1][0],surface[2][0] position because it has floats values.

When I type lat(surface[0][0],surface[1][0],surface[2][0]) I see:

(Site(<class '__main__.SURFACE'>(None, 1), array([-3.472, -9.108, 1.205])), Site(kwant.lattice.Monatomic([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], [0.0, 0.0, 0.0], '', 3), array([-3, -9, 1])))

and array([-3, -9, 1]) should be array([-3.472, -9.108, 1.205]). Why lattices accept only integer values?

Abbout Adel