• metal–organic frameworks;
  • gas sorption;
  • framework flexibility

Metal–organic frameworks (MOFs) are a class of porous crystalline materials of modular design. One of the primary applications of these materials is in the adsorption and separation of gases, with potential benefits to the energy, transport and medical sectors. In situ crystallography of MOFs under gas atmospheres has enabled the behaviour of the frameworks under gas loading to be investigated and has established the precise location of adsorbed gas molecules in a significant number of MOFs. This article reviews progress in such crystallographic studies, which has taken place over the past decade, but has its origins in earlier studies of zeolites, clathrates etc. The review considers studies by single-crystal or powder diffraction using either X-rays or neutrons. Features of MOFs that strongly affect gas sorption behaviour are discussed in the context of in situ crystallographic studies, specifically framework flexibility, and the presence of (organic) functional groups and unsaturated (open) metal sites within pores that can form specific interactions with gas molecules.