1: \begin{abstract}
2: Selected configuration interaction ({\sci}) methods, when complemented with
3: a second order perturbative correction, provide near full configuration interaction (FCI)
4: quality energies with only a small fraction of the Slater determinants of the FCI
5: space. The selection of the determinants is often implemented in a determinant-based
6: formalism, and therefore does not provide spin adapted wave functions. In
7: other words, {\sci} wave functions are not eigenfunctions of the $\stwo$ operator.
8: In some situations, having a spin adapted wave function is essential for the
9: proper convergence of the method.
10: We propose an efficient algorithm which, given an arbitrary
11: determinant space, generates all the missing Slater determinants allowing one to
12: obtain spin adapted wave functions while avoiding working with configuration
13: state functions. For example,
14: generating all the possible determinants with 6 up-spin and 6 down-spin
15: electrons in 12 open shells takes 21 {\cpu} cycles per generated Slater
16: determinant. We also propose a modification of the denominators in the
17: Epstein-Nesbet perturbation theory reducing significantly the non-invariance of
18: the second order correction with respect to different values of the spin
19: quantum number $m_s$. The computational cost of this correction is also
20: negligible.
21: \end{abstract}
22: