In situ observation of gating phenomena in the flexible porous coordination polymer Zn2(BPnDC)2(bpy) (SNU-9) in a combined diffraction and gas adsorption experiment.