Modulation of triplet quantum coherence by guest-induced structural changes in a flexible metal-organic framework.