Constrained hartree-fock and beyond