Rational design of soft mechanical metamaterials