Untangling the mechanics of knots