The aim of this proposal is to study the condensation transitions of polar gas molecules in nanoporous flexible materials by means of wide Q-range neutron diffraction. An in-situ gas adsorption/desorption experiment on the zeolitic imidazole framework ZIF-8 will allow us to monitor the behaviour of the adsorbate upon condensation within the pores during the gate opening structural transition. This neutron study complements our previous experiment with non-polar gases in which it was found that N2, O2 and CO2 have a very distinctive arrangement of the molecules inside the pore upon adsorption. With this combined study we expect to provide improved understanding of the microscopic details of the host-guest interactions for ZIF materials that will be very valuable for a molecular understanding of the framework flexibility and the gate opening phenomena.