hello everyone. I am trying to plot r=the band structure of 3 d structure .but getting an error.Please tell me how to deal with 3 d structures?my code is this: import kwant from matplotlib import pyplot import math import numpy as np import cmath lat = kwant.lattice.general([(0, 0.5, 0.5), (0.5, 0, 0.5), (0.5, 0.5, 0)], [(0, 0, 0), (0.25, 0.25, 0.25)]) a, b = lat.sublattices def make_cuboid(a=2, b=2, c=2): def cuboid_shape(pos): x, y, z = pos return 0 <= x < a and 0 <= y < b and 0 <= z < c sym = kwant.TranslationalSymmetry(lat.vec((-1,-1,-1))) sys = kwant.Builder(sym) sys[lat.shape(cuboid_shape, (0, 0, 0))] = None sys[lat.neighbors()] = None return sys sys = make_cuboid() sys = sys.finalized() kwant.plotter.bands(sys, momenta= np.linspace(-5,5,10000),show=False) pyplot.xlabel("momentum [(lattice constant)^-1]") pyplot.ylabel("energy [t]") pyplot.show() The error is :TypeError: a float is required
Hi Anant, You are setting the values of your sites and hoppings to “None”. That is, you define the structure of your Hamiltonian matrix but not its values. Note that I also use “None” in my graphene band structure example, but only in the ancillary system that is not used for calculations. Surely you could have found the solution to this problem yourself. Please try harder next time before asking for help. Christoph
participants (2)
-
ANANT
-
Christoph Groth