Electronic and Magnetic Properties of Mn12 Molecular Magnets on Sulfonate and Carboxylic Acid Prefunctionalized Gold Surfaces