"""Calculate and plot the band structure of monolayer graphene"""
import pybinding as pb
import matplotlib.pyplot as plt
from math import sqrt, pi
from pybinding.repository import graphene
pb.pltutils.use_style()
model = pb.Model(
graphene.monolayer(), # predefined lattice from the material repository
pb.translational_symmetry() # creates an infinite sheet of graphene
)
solver = pb.solver.lapack(model) # eigensolver from the LAPACK library
# significant points in graphene's Brillouin zone
a_cc = graphene.a_cc # carbon-carbon distance
Gamma = [0, 0]
K1 = [-4*pi / (3*sqrt(3)*a_cc), 0]
M = [0, 2*pi / (3*a_cc)]
K2 = [2*pi / (3*sqrt(3)*a_cc), 2*pi / (3*a_cc)]
# plot the bands through the desired points
bands = solver.calc_bands(K1, Gamma, M, K2)
bands.plot(point_labels=['K', r'$\Gamma$', 'M', 'K'])
plt.show()