The pb.Model class contains all the information of the structure we want to use in our calculation.
This structure can be larger than the unit cell (*stored in the pb.Lattice-class). It can also have specific geometries and other possible modifications of the original lattice.
Here, we will just double the unit cell in both directions in the pb.Model and add periodic boundary conditions:
model=pb.Model(lat,# pb.Lattice, uses the previously defined unit-cellpb.primitive(2,2),# doubles the unit-cell in both directionspb.translational_symmetry(a1=2,a2=2)# periodic boundary conditions with period '2')
As an example, the band structure is calculated using the pb.Solver defined above.
First, for a two-dimensional plot, we must define a path in the reciprocal space that connects the high symmetry points. Using the pb.Lattice build-in
method, the high symmetry points for the corners of a path can be found easily:
importkiteimportpybindingaspbimportnumpyasnpimportmatplotlib.pyplotasplta1=np.array([1,0])# [nm] define the first lattice vectora2=np.array([0,1])# [nm] define the second lattice vectorlat=pb.Lattice(a1=a1,a2=a2)# define a lattice objectonsite=0# onsite potentiallat.add_sublattices(# make a lattice site (sublattice) with a tuple# (name, position, and onsite potential)('A',[0,0],onsite))lat.add_hoppings(# make an hopping between lattice site with a tuple# (relative unit cell index, site from, site to, hopping energy)([1,0],'A','A',-1),([0,1],'A','A',-1))model=pb.Model(lat,# pb.Lattice, use the previously defined unit-cellpb.primitive(2,2),# double the unit-cell in both directionspb.translational_symmetry(a1=2,a2=2)# periodic boundary conditions with period '2')solver=pb.solver.lapack(model# pb.Model, use the previously defined system)bz=lat.brillouin_zone()gamma=np.array([0,0])x=(bz+bz)/2s=bzbands=solver.calc_bands(gamma,x,s,gamma,step=0.01)bands.plot(point_labels=[r"$\Gamma$","X","S",r"$\Gamma$"])plt.show()lat.plot_brillouin_zone(decorate=False)bands.k_path.plot(point_labels=[r"$\Gamma$","X","S",r"$\Gamma$"])plt.show()