Thermodynamic driving forces of guest confinement in a photoswitchable cage.