Design and control of gas diffusion process in a nanoporous soft crystal