Rational design and theoretical optimization of a cryopreservation protocol