Translating biomolecular recognition into nanomechanics