Within the weak-field asymptotic theory, the dependence of the tunneling ionization rate of a molecule in a static electric field on its orientation with respect to the field is determined by the structure factor for the highest occupied molecular orbital (HOMO). An accurate determination of this factor, and hence the ionization rate, requires accurate values of the HOMO in the asymptotic region. Techniques for calculating the structure factors for molecules in the Hartree-Fock approximation are discussed. For diatomics, grid-based numerical Hartree-Fock calculations which reproduce the correct asymptotic tail of the HOMO are possible. However, for larger molecules, to solve the Hartree-Fock equations one should resort to basis-based approaches with too rapidly decaying Gaussian basis functions. A systematic study of the possibility to reproduce the asymptotic tail of the HOMO in calculations with Gaussian basis sets is presented. We find that polarization-consistent basis sets with quadruple or pentuple-zeta quality greatly improve the tail of the HOMO, but only when used with variationally optimized exponents. This methodology is validated by considering the CO molecule for which reliable grid-based calculations can be performed. The optimized Gaussian basis sets are used to calculate the structure factors for the triatomic molecules CO2 and OCS. The results are compared with available experimental and theoretical results.