Optimal control of nonlinear classical systems with application to unimolecular dissociation reactions and chaotic potentials.