Chemistry of photoswitching molecules in the confined nanospace of aqueous molecular vessels.