Dear Kwant developers,

I want to calculate the band structure for a system with the polyatomic
basis,
but since the periodic value is not an integer, there was some problem in
finalizing the system. Could you give me some suggestions to solve this
problem?

Enclose please find my kwant script.

Thank you very much for your help.
Hang Zang

===========================
import kwant
from matplotlib import pyplot

primitive_vectors = [ (1.0,0.0,0.0) , (0.0,1.0,0.0) , (0.0,0.0,1.0) ]

atomic_sites = [ (1.0,1.0,1.0) , (0.0,0.0,0.0) , (-1.0,-1.0,-1.0) ]

lat = kwant.lattice.Polyatomic(primitive_vectors , atomic_sites)

atoms = lat.sublattices

sym_lead = kwant.TranslationalSymmetry((-1.0,0.0,0.0))

lead = kwant.Builder(sym_lead)

# inside the lead
lead[atoms[0](0.0,0.0,0.0)] = 1
lead[atoms[1](0.0,0.0,0.0)] = 1
lead[atoms[2](0.0,0.0,0.0)] = 1

lead[atoms[0](0.0,0.0,0.0),atoms[1](0.0,0.0,0.0)] = -2
lead[atoms[1](0.0,0.0,0.0),atoms[2](0.0,0.0,0.0)] = -2

# between adjacent leads
lead[atoms[0](0.0,0.0,0.0),atoms[0](-2.3,0.0,0.0)] = -4
lead[atoms[1](0.0,0.0,0.0),atoms[1](-2.3,0.0,0.0)] = -4
lead[atoms[2](0.0,0.0,0.0),atoms[2](-2.3,0.0,0.0)] = -4

lead = lead.finalized()

kwant.plotter.bands(lead,show=False)
pyplot.xlabel("momentum [(lattice constant)^-1]")
pyplot.ylabel("energy [t]")
pyplot.show()
=====================================

Reply via email to