Half-projected Hartree–Fock model for computing potential-energy surfaces