The surface energy of Si, GaAs, and GaP