Structures of metal nanoparticles adsorbed on MgO(001). I. Ag and Au.