  An electronic structure and magnetic properties analysis of the recently
proposed Cu-doped lead apatite is performed. We show that electronic structures
of differently Cu-substituted structures are characterized by localized
molecular Cu-O bands at or near the Fermi level. The Cu substitutions can
happen at both Pb1 and Pb2 sites, leading to metallic and semiconducting states
differently. The electronic states in these bands are highly unstable
magnetically and form clusters of rigidly ferromagnetically coupled magnetic
moments on Cu and neighboring oxygen atoms with a total moment of about 1
$\mu_B$. The ground state of uniformly Cu-doped lead apatite appears to be
magnetic and semiconducting. The non-uniform distribution of two Cu atoms at
the nearest Pb2 sites leads to an antiferromagnetic semiconducting state with
formation energy close to uniformly distributed Cu configurations. The
inclusion of quantum spin fluctuations confirms the stability of magnetic Cu-O
clusters. Our calculations revealed the absence of the long-range magnetic
order between uniformly distributed Cu-O clusters, creating the spin glass type
of system.
