Gas detection by structural variations of fluorescent guest molecules in a flexible porous coordination polymer.