  We present a symmetry projection technique for enforcing rotational and
parity symmetries in nuclear-electronic Hartree-Fock wave functions, which
treat electrons and nuclei on equal footing. The molecular Hamiltonian obeys
rotational and parity-inversion symmetries, which are, however, broken by
expanding in Gaussian basis sets that are fixed in space. We generate a trial
wave function with the correct symmetry properties by projecting the wave
function onto representations of the three-dimensional rotation group, i.e.,
the special orthogonal group in three dimensions SO(3). As a consequence, the
wave function becomes an eigenfunction of the angular momentum operator which
(i) eliminates the contamination of the ground state wave function by highly
excited rotational states arising from the broken rotational symmetry, and (ii)
enables the targeting of specific rotational states of the molecule. We
demonstrate the efficiency of the symmetry projection technique by calculating
energies of the low-lying rotational states of the H$_2$ and H$_3^+$ molecules.
