Protein mechanics: a route from structure to function