  A general procedure for the optimization of atomic density-fitting basis
functions is designed with the balance between accuracy and numerical stability
in mind. Given one-electron wavefunctions and energies, weights are assigned to
the product densities, modeling their contribution to the exchange and
second-order correlation energy, and a simple weighted error measure is
minimized. Generally-contracted Gaussian auxiliary basis sets are optimized to
match the wavefunction basis sets [D. N. Laikov, Theor. Chem. Acc. 138, 40
(2019)] for all 102 elements in a scalar-relativistic approximation [D. N.
Laikov, J. Chem. Phys. 150, 061102 (2019)].
