Reversible photomechanical switching of individual engineered molecules at a metallic surface