  We present an efficient, linear-scaling implementation for building the
(screened) Hartree-Fock exchange (HFX) matrix for periodic systems within the
framework of numerical atomic orbital (NAO) basis functions. Our implementation
is based on the localized resolution of the identity approximation by which
two-electron Coulomb repulsion integrals can be obtained by only computing
two-center quantities -- a feature that is highly beneficial to NAOs. By
exploiting the locality of basis functions and efficient prescreening of the
intermediate three- and two-index tensors, one can achieve a linear scaling of
the computational cost for building the HFX matrix with respect to the system
size. Our implementation is massively parallel, thanks to a MPI/OpenMP hybrid
parallelization strategy for distributing the computational load and memory
storage. All these factors add together to enable highly efficient hybrid
functional calculations for large-scale periodic systems. In this work we
describe the key algorithms and implementation details for the HFX build as
implemented in the ABACUS code package. The performance and scalability of our
implementation with respect to the system size and the number of CPU cores are
demonstrated for selected benchmark systems up to 4096 atoms.

Computational Physics;Materials Science