Design and optimization of molecular nanovalves based on redox-switchable bistable rotaxanes.