A nanoscale molecular switch triggered by thermal, light, and guest perturbation.