The atomic positions and interactions between adsorbed guest molecules, such as ammonia in H-ZSM-5 microporous solids, are for the first time revealed by using in situ synchrotron powder X-ray diffraction combined with refinement within experimental errors.