Hi, > The error is not completely opague of course; something seems to be > problematic about the lattice vectors and the proposed symmetry.
Indeed, the lattice and the symmetry you defined are not compatible:
> lat = kwant.lattice.general([(0, a, a), (a, 0, a), (a, a, 0)])
> ...
> sym_lead = kwant.TranslationalSymmetry((0, 0, -a))
Your lattice vectors are each of length 'a * sqrt(2)' and are pointing
at 45 degree angles to the coordinate axes. The translational symmetry
you declare is in the -z direction with period 'a'. These are not
commensurate because the symmetry vector cannot be expressed as a linear
combination of the lattice vectors with integer coefficients.
In order to correct this you will need to declare a symmetry in the
z direction with period '2*a', as this is a linear combination of the
lattice vectors with integer coefficients (explicitly v1 + v2 - v3).
> I don't care about any particular structure here really, I am just
> looking for the 3D equivalent of the square lattice.
By "3D equivalent of a square lattice" do you perhaps mean a cubic
lattice? If so then the lattice vectors should all be orthogonal.
A reasonable choice would be to have the lattice vectors pointing
along the x, y, and z directions:
lat = kwant.lattice.general([(a, 0, 0), (0, a, 0), (0, 0, a)])
In this case the symmetry definition you have will work because the
symmetry vector is an integer linear combination of lattice vectors
(it's just -v3).
Happy Kwanting,
Joe
signature.asc
Description: PGP signature
