Simultaneous Control of Flexibility and Rigidity in Pore-Space-Partitioned Metal-Organic Frameworks.