  Recently, Lee et al. reported the experimental discovery of room-temperature
ambient-pressure superconductivity in a Cu-doped lead-apatite (LK-99)
(arXiv:2307.12008, arXiv:2307.12037). Remarkably, the superconductivity
persists up to 400 K at ambient pressure. Despite strong experimental evidence,
the electronic structure of LK-99 has not yet been studied. Here, we
investigate the electronic structures of LK-99 and its parent compound using
first-principles calculations, aiming to elucidate the doping effects of Cu.
Our results reveal that the parent compound Pb$_{10}$(PO$_4$)$_6$O is an
insulator, while Cu doping induces an insulator-metal transition and thus
volume contraction. The band structures of LK-99 around the Fermi level are
featured by a half-filled flat band and a fully-occupied flat band. These two
flat bands arise from both the $2p$ orbitals of $1/4$-occupied O atoms and the
hybridization of the $3d$ orbitals of Cu with the $2p$ orbitals of its
nearest-neighboring O atoms. Interestingly, we observe four van Hove
singularities on these two flat bands. Furthermore, we show that the flat band
structures can be tuned by including electronic correlation effects or by
doping different elements. We find that among the considered doping elements
(Ni, Cu, Zn, Ag, and Au), both Ni and Zn doping result in the gap opening,
whereas Au exhibits doping effects more similar to Cu than Ag. Our work
provides a foundation for future studies on the role of unique electronic
structures of LK-99 in superconductivity.
