Cooperative light-induced breathing of soft porous crystals via azobenzene buckling

Although light is a prominent stimulus for smart materials, the application of photoswitches as light-responsive triggers for phase transitions of porous materials remains poorly explored. Here we incorporate an azobenzene photoswitch in the backbone of a metal-organic framework producing light-induced structural contraction of the porous network in parallel to gas adsorption. Light-stimulation enables non-invasive spatiotemporal control over the mechanical properties of the framework, which ultimately leads to pore contraction and subsequent guest release via negative gas adsorption. The complex mechanism of light-gated breathing is established by a series of in situ diffraction and spectroscopic experiments, supported by quantum mechanical and molecular dynamic simulations. Unexpectedly, this study identifies a novel light-induced deformation mechanism of constrained azobenzene photoswitches relevant to the future design of light-responsive materials.


1) Ligand synthesis and characterization
The trans-isomer of ligand (E)-H4dacdc of this work was synthesized based on a strategy applied for the synthesis of a series of structurally related ligands which can be obtained from reference 1 . The azobenzene 1 was prepared by oxidative coupling of 4-bromoaniline according to a procedure previously described in reference 2 . The following synthesis procedure is a direct reproduction from reference 2

1,2-bis(4-bromophenyl)diazene ( azobenzene 1)
A homogeneous mixture of the oxidant was prepared by grinding gently the equal amount of KMnO4 (1 g) and FeSO4-7H2O (1 g) in a morter. The amine, 4-bromoaniline (0.35 g, 2 mmol) in dichloromethane (20 mL) was taken in a 50 mL round bottomed flask. The oxidant (2.0 g) was added and the heterogeneous mixture stirred under reflux for 5 h. The progress of the reaction was monitored by tlc until no starting material could be detected. After cooling to room temperature the product was then filtered through celite and the residue washed thoroughly with dichloromethane (3 × 15 mL) and diethylether (3 × 15 mL) and dried over anhydrous sodium sulphate. Removal of the solvent and purification of the residue by column chromatography on silica gel gave the corresponding 1,2-bis(4-bromophenyl)diazene in 96% yield.
Azobenzene 1 was reacted in a Cu(I) catalysed Ullman reaction with n-butyl ester 2, which can be obtained in a 5-step synthesis from 9H-carbazole following procedures published in reference 1, 3 to obtain (E)-nBu4dacdc in good yield. Ester hydrolysis of (E)-nBu4dacdc yields (E)-H4L (Supplementary Figure 1).

3,6-Dibromo-9H-carbazole
A 1 l flask was charged with 60 g (0.36 mol) 9H-carbazole which was previously recrystallized from a mixture of 900 ml toluene and 100 ml ethanol and dissolved in 800 ml anhydrous THF. To the solution 140 g (0.79 mol) N-bromosuccinimide was added over 30 min at room temperature and the solution was stirred for 28 h at 30 °C. The THF was removed in vacuum, the remaining solid dissolved in diethyl ether, and the solution extracted with water. The organic phases were collected, dried over MgSO4 and the solvent removed in vacuum. The yellow powder was recrystallized from a mixture of 800 ml chloroform and 50 ml diethyl ether and dried in vacuum to yield 103 g (89%) of white product.

9H-Carbazole-3,6-dicarbonitrile
Due to the high toxicity of cyanide the reaction was performed in a sealed fume hood. Deactivation of glassware and tools used for the reaction were performed in a 5% H2O2 solution containing ammonia with a pH higher than 11. A 500 ml Schlenk flask was charged with 80 g (246 mmol) of bromide 5 and 656 mg (0.59 mmol) 1,1′-bis(diphenylphosphino)ferrocene. The flask was evacuated, flushed with Ar, and 250 ml DMF and 2.4 ml water were added. In a glovebox a flask with 640 mg (9.9 mmol) Zn powder, 34.5 g (294 mmol) anhydrous zink cyanide, 1.8 g (9.8 mmol) zinc acetate, and 460 mg (0.5 mmol) bis(dibenzylideneacetone)palladium(0) was prepared and the reactants added to the Schlenk flask. The reaction mixture was stirred at 100 °C for 72 h. Afterwards the brown suspension was cooled to room temperature and poured into an aqueous solution of 400 ml saturated ammonium chloride solution and 400 ml concentrated ammonia solution. The off white precipitate was filtered off and washed with the same amount of previously described aqueous solution followed by thorough washing with water. The waste solutions were collected and deactivated as described above. The off white powder was dried, washed twice with 20 ml methanol, twice with 30 ml toluene, and dried in vacuum. The solid was recrystallized from DMF to yield 48.2 g (90%) of the white product.

9H-Carbazole-3,6-dicarboxylic acid
In a 2 l flask 30 g (0.13 mol) cyanide 6, 90 g (2.25 mol) sodium hydroxide, and 300 mg (1.58 mmol) copper (I) iodide were dissolved in 1 L water and stirred under reflux for 24 h. the solution was cooled down to room temperature and filtered over Celite ® . The solution was neutralized with 6 M hydrochloric acid, the white precipitate was filtered off, washed thoroughly with water, and dried at 80 °C to yield 33 g (93%) off white powder.

Dibutyl 9H-carbazole-3,6-dicarboxylate
In a 1 L flask 33 g (0.13 mmol) H2CDC 1 was suspended in 750 ml 1-butanol and 3 ml of sulfuric acid was added. The mixture was refluxed at 130 °C for 48 h to form a clear yellow solution. The 1-butanol was removed in vacuum, the resulting solid dissolved in chloroform, and extracted with diluted aqueous potassium carbonate solution. The organic phases were combined, dried over MgSO4 and the solvent removed in vacuum. The obtained solid was recrystallized from ethyl acetate to obtain 45 g (95%) white powder.

-diylbis(4,1-phenylene))bis(9H-carbazole-3,6-dicarboxylic acid) ((E)-H4L)
A flask was charged with 1.1 g (1.2 mmol) ((E)-nBu4dacdc) which was dissolved in 45 ml THF 4 ml methanol at 85 °C. To the solution 0.55 g (9.78 mmol) potassium hydroxide and 2 ml of water were added and the mixture was stirred at 85 °C for 16 h. THF and methanol was removed in vacuum, the resulting solution was filtered, and neutralized with 2 M hydrochloric acid. The yellow precipitate was filtered off, washed with water and ethanol and dried in vacuum at room temperature to yield a red solid which was stored under exclusion of light. Yield: 0.81 g (97%) red powder.
For all experiments described in this study irradiation at 365 nm was conducted with M365L2 Thorlabs LED and at 455 nm with M455L3-C5 Thorlabs LED. For UV-Vis spectroscopic analysis solutions with concentrations of 2.1x10 -5 mol ml -1 ((E)-H4dacdc) and 1.4x10 -5 mol ml -1 ((E)-nBu4dacdc) were prepared in HPLC grade DMSO and Chloroform, respectively. Before spectroscopic analysis the solutions were degassed by bubbling with Ar for 5 min. For in situ NMR analysis solutions of 1 mg ml -1 in d 6 -DMSO ((E)-H4dacdc) and CD2Cl2 ((E)-nBu4dacdc) were prepared. Before spectroscopic analysis the solutions were degassed by bubbling with Ar for 5 min. NMR spectra of the phot stationary state were recorded after irradiation at 365 nm for 95 min. In the case of both ((E)-H4dacdc and (E)-nBu4dacdc the photo stationary state (PSS) was found to contain 50% mixture of the Zisomer. Z-E isomerization was conducted by irradiation for 30-40 min. The PSS was found to contain 25% mixture of the Z-isomer.
From the PSS of (E/Z)-nBu4dacdc the spectra of the two different isomers was determined:  Figure 9. a) Aromatic region of the 1 H NMR spectrum of (E)-nBu4dacdc upon irradiation at 365nm and 455 nm at 298 K. b) Evolution of the signal integrals upon irradiation, signals of (E)-nBu4dacdc in blue symbols, signals of (Z)-nBu4dacdc in orange symbols.  From the PSS of (E/Z)-H4dacdc the spectra of the two different isomers was determined:  Figure 14. a) Aromatic region of the 1 H NMR spectrum of (E)-H4dacdc upon irradiation at 365nm and 455 nm at 298 K. b) Evolution of the signal integrals upon irradiation, signals of (E)-nBu4dacdc in blue symbols, signals of (Z)-nBu4dacdc in orange symbols. Peak integrals were normalized to the peak at 9.03 ppm.
Supplementary Figure 15. 1 H NMR spectrum of (E)-H4dacdc under light exclusion at 298 K.
14 Supplementary Figure 16. 1 H NMR spectrum of (E/Z)-H4dacdc PSS upon irradiation at 365 nm for 95 min at 298 K. Raman spectra of n-Bu4dacdc were acquired in solution (5 mg ml -1 ) in CHCl3. Raman spectra were postprocessed using Spectragryph software. For time series, spectra containing cosmic spikes were removed from the series and the remaining spectra were averaged in the groups of 16 to increase the signal to noise ratio. Upon irradiation of (E)-n-Bu4dacdc at 365 nm a continuous decrease in the Raman intensity of several bands was observed. At the PSS after 60 min irradiation, the intensity of the relevant bands decreased by ca. half of the initial value. These data are consistent with the NMR data which showed that the PSS upon irradiation at 365 nm consists of approximately 1:1 of (E)-and (Z)-n-Bu4dacdc. At the same time only a small increase in the Raman scattering was observed around 1520 cm -1 , which probably stems from lower polarizability of the Z-isomer. Since the Raman intensity is proportional to polarizability squared, even small differences in the polarizability between both isomers are drastically magnified. As a consequence, bands characteristic of (Z)-n-Bu4dacdc could not be observed in the PSS mixture at the studied concentration. Subsequent irradiation of this mixture at 455 nm for 60 min resulted in an increase in the Raman intensity of the relevant bands up to ca. 75% of the initial value, in line with Z-E back isomerization. These observations are consistent with the determined composition of visible-light PSS upon irradiation with 455 nm determined by NMR spectroscopy (Supplementary Figure 13).  Figure 19. a,b) Time-dependent in situ Raman spectroscopy of (E)-n-Bu4dacdc (black) in CHCl3 during irradiation with 365 nm until state PSS (blue) and c,d) irradiation at 455 nm from PSS-365 nm (blue) to PSS-455 nm (red).   500  1000  1500  2000  2500  3000  3500  1000  1100  1200  1300  1400  1500  1600   1000  1100  1200  1300  1400  1500  1600  1380 1400 1420 1440 1460 1480 1500  Attenuated total reflection (ATR) Fourier-Transform-Infrared (FTIR) spectroscopy was used to further analyze the isomerization of n-Bu4dacdc. For that small drops of solutions of (E)-n-Bu4dacdc (1 mg ml -1 ) in CHCl3 before and after irradiation at 365 nm were placed on the sample stage of the spectrometer and the solvent was evaporated by a flow of nitrogen at ambient temperature. This way a spectrum of (E)-n-Bu4dacdc and (E/Z)-n-Bu4dacdc at the PSS from irradiation with 365 nm could be obtained, assuming no change in the conformation occurs upon evaporation of the solvent (the Z-isomer was found to be thermally stable at 298 K in solution). In two sets of experiments the sample amount was varied by subsequently dropping 0.05 ml and 0.15 ml of the same solution on the sample stage and evaporating the solvent by a flow of nitrogen .   3500  3000  2500  2000  1500  1000  1300  1400  1500  1600  1700   1300  1400  1500  1600  1700  700  800  900  1000  1100  1200

3) Synthesis of metal-organic framework DUT-163
Synthesis of DUT-163 (Dresden University of Technology No. 163) powder was conducted via solvothermal reaction of (E)-H4L with Cu(NO3)2·3H2O in DMF. In a round bottom flask 400 mg (0.58 mmol) (E)-H4L were dissolved in 85 ml DMF and 3 ml acetic acid using an ultrasonic bath. To the yellow solution 351 mg (1.45 mmol) Cu(NO3)2·3H2O were added and dissolved, the flask was closed and the reaction mixture stirred for 48 h at 80 °C. Afterwards the MOF powders were separated from the mother liquid via centrifugation and washed with fresh DMF for at least three times over three days.
To yield crystals large enough for single crystal analysis the synthesis procedure was modified. In a Pyrex tube 10 mg (0.014 mmol) (E)-H4L were dissolved in 4 ml DMF and 0.3 ml acetic acid using an ultrasonic bath. To the yellow solution 9.7 (0.035 mmol) Cu(NO3)2·3H2O were added and the tube was sealed and heated at 80 °C for 3 d to yield light green cuboctahedral crystals approximately 80 µm in diameter.

4) Supercritical activation of MOF powder
Drying (solvent removal from the pores) of DUT-163 powder was conducted using a protocol based on previous reports 1, 4 : After synthesis the MOF powder suspended in fresh DMF was exchanged at least 6 times over a period of at least three days with anhydr. acetone. The material was dried using a protocol involving liquid/supercritical CO2. The acetone suspended MOF powder was placed in glass filter frit in a Jumbo Critical Point Dryer 13200J AB (SPI Supplies) which was subsequently filled with liquid CO2 (99.995% purity) at 288 K and 5 MPa. To ensure a complete substitution of the acetone by CO2, the liquid in the autoclave was exchanged with fresh CO2 at least 18 times over a period of 5 days using a valve at the bottom of the autoclave. The temperature and pressure were then risen beyond the supercritical point of CO2 to 308 K and 10 MPa and kept until the temperature and pressure was stable. The supercritical CO2 was steadily released over 3 h and the dry brown powder was transferred and stored in an argon filled glove box under exclusion of light. To ensure complete removal of the solvent (especially from the open metal sites of the Cu-paddle-wheels) additional activation at 353 K in a Schlenk-tube under dynamic vacuum of 10 -4 kPa for at least 24 h was performed.

5) Single crystal X-ray diffraction
As synthesized single crystal of DUT-163 with linear dimensions of 20 x 20 x 20 µm was prepared in a borosilicate glass capillary (d = 0.3 mm) with small amount of DMF, which was sealed with was afterwards. The dataset was collected at BESSY MX BL14.3 beamline of Helmholtz-Zentrum Berlin für Materialien und Energie 5 at 296 K. After short test scans, the crystal symmetry and scan range were determined in each particular case using iMosflm program 6 . The φ-scans with oscillation step of 0.5° were used for data collection. The dataset was processed automatically using XDSAPP 2.0 software 7 . Crystal structures were solved by direct methods and refined by full matrix least-squares on F 2 using SHELX-2014/7 program package 8 . All non-hydrogen atoms were refined in anisotropic approximation. Hydrogen atoms were refined in geometrically calculated positions using "riding model" with Uiso(H)=1.2Uiso(C). During the refinement of the crystal structure, the disorder of the phenyl rings over two positions and disorder of the nitrogen atoms of azo group over four positions have been detected and treated in the refinement using corresponding distance restraints of 1.45(1) and 1. 30(1) for C11-N2 and N2-N2 #1 ( #1 -1.5-x, 1.5-y, 1-z). Disordered guest molecules could not be refined unambiguously from the difference Fourier map, hence, SQUEEZE routine in PLATON was used to generate the reflection intensities with subtracted solvent contribution 9

9) Scanning electron microscopy of MOF samples
Supplementary Figure 28. a,b) Scanning electron microscopy images of DUT-163, c) Experimental crystal size distribution (red histogram) and distribution curve (black dashed line).

10) Gas adsorption experiments
For the conduced adsorption and in situ experiments various gases and vapours were chose. Nitrogen at 77 K is a classical adsorptive to probe porosity. Methane in the rane of 110-120 K and n-butane at 273-303 K are adsorptives heavily used to investigate NGA in DUT-49-type materials and thus allows to draw comparisons with other materials. MP was chosen because the upper temperature limit for framework contraction without irradiation is around ambient temperature, which makes it a probe easy to apply in near ambient experiments. CCl4 vapor was chosen as a probe with low IR activity for DRIFT analysis.    An experimental specific pore volume of Vp = 2.84 cm 3 g -1 was determined by nitrogen adsorption at 77 K at a relative pressure p/p0 of 0.98 (p=97 kPa) using the Belsorp Max software package. Cyclability of the adsorption process was demonstrated by applying a routine previously established for DUT-49 and related materials 1 . In the case of DUT-49 and DUT-163, if adsorption-induced contraction occurs during the adsorption process it was likewise found to occur during the desorption process. Interestingly, under these conditions no reopening of the framework was observed upon desorption. However, the framework can be expanded again by readsorbing gas up to the saturation pressure. To desorb gas without structural contraction occuring one simply has to elevate the temperature beyond the temperature at which adsorption contraction no longer occurs. In the case of DUT-163 this temperature was found to be beyond 122 K upon methane adsorption. Isotherms in Supplementary Figure 32 were recorded by sequential methan adsorption. The first cycle was conducted by adsorbing and desorbing methane at 115K. The sample was then pressurerized again up to 110 kPa and the Temperature was elevated to 130 K. The pressure was subsequently released and the sample evacuated for 1 h under dynamic vacuum. The sample was then reexamined by recording a second adsorption isotherm which demonstrates the same hysteresis, NGA features and shows only slight loss in uptake. Detailed information on how NGA impacts the adsorption measurement and to what extend the gas release can be quantified is accessible from reference 10,11 . Additional information on NGA as a function of adsorption of different gases at different temperatures can be obtained from reference 12 .
Although the shape of experimental and computational (based on perfect infinite crystals) adsorption isotherms matches well, the excess adsorbed amount is found to deviate by a constant factor of ca. 22% throughout all adsorption experiments and the whole pressure range. This effect was previously observed for DUT-49 in samples with reduced crystal size and related to enhanced surface effects/reduction in internal pore volume in small crystallites below around 1 µm 13 and may also be caused by partial pore collapse upon solvent removal previously observed for DUT-49 solids with reduced mechanical stability. 14 To better illustrate the adsorptioninduced contraction and its effect on the adsorption behavior independent of these effects, isotherms in Supplementary Figure  To investigate the effect of irradiation on the adsorption and transition behavior of DUT-163 ca. 10mg of powdered sample was placed in a special quartz sample cell with 2 mm diameter and connected to the regular BELSORP-max instrument. In a second port another DUT-163 sample of comparable mass was placed in a regular sample cell and covered with aluminum foil to establish light exclusion. Both cells were placed in a water-filled quartz-glass beaker that was connected to a JULABO thermostat. Temperature of the bulk coolant was monitored and stabilized throughout the whole adsorption experiment. The quartz cell was continuously irradiated with a nominal wavelength of 365 nm throughout the whole experiment (including dead volume measurement) using a CONSORT UV-lamp with 1800 µW/cm² that was placed 5 cm away from the sample cell outside the water filled beaker. Irradiated and non-irradiated samples were analyzed in parallel using the BELSORP software setup for parallel sample analysis. A series of experiments with MP at different temperatures were performed on the same sample starting with adsorption at 307 K. After adsorption/desorption experiments at a given temperature the samples were evacuated in dynamic vacuum (<10-5 kPa) for 30 min during which the light source was switched off. The temperature was set to a new value and equilibrated before the next adsorption experiment was conducted following the same protocol. Detailed desorption branches were only recorded in a few of these experiments.
The experimental Vp of 2.84 cm 3 g -1 determined by nitrogen adsorption at 77 K shows a 18% deviation compared to the theoretical value which might be caused by crystal size effects or partial pore collapse upon solvent removal of the bulk powder previously observed in DUT-49. 13 Throughout the whole temperature range the shape of experimental and simulated isotherms shows good agreement, however a difference in adsorbed amount of 18-22% is observed. This deviation is in line with the difference of experimental and simulated Vp. Adsorbed amounts in mmol g -1 can be transferred into units of molecules per unit cell by multiplying the adsorbed amount in mmol g -1 with the molar mass of one unit cell in g mmol -1 . For DUT-163 (C40H20Cu2N4O8, 811.70 g mol -1 per formular unit, Z = 24) this is 19.48°g mmolUC -1 .
The deviation of simulated isotherms for the op phase to experimental adsorption isotherms occurs in three different ways. First, we observe a general deviation in adsorbed amount by ca. 22% reduction in the experimental data. This is observed throughout all sets of experiments/simulations. We associate this to 31 factors such as crystal size which has been reported to cause changes in the gas capacity of real-world materials in comparison to simulations conduced on "perfect" crystal structures.
The second deviation is caused by structural transitions in the solid. As the op-cp transitions in DUT-49-type materials are known to occur upon mesopore filling (see https://www.nature.com/articles/s41467-019-11565-3) the pressure range in which the cp phase is present is quite defined (ca. p/p0 0.16 for DUT-163). Strong deviation in adsorbed amount in this pressure range (such as the deviations observed in the temperature range of 295 K and below for MP adsorption or 115 K upon methane adsorption) are consequently a result of structural contraction. These have been identified by in situ PXRD and are known to occur upon MP adsorption in the temperature range of 296 K and below. Hysteresis in MP isotherms in the temperature range of 299-293 K are not visible since the absolute pressure reached in these experiments is limited to 100 kPa and thus is not able to reach the gate opening relative pressure of 0.5 and above at these temperatures.
The third type of deviation observed between the simulated and experimental data originates from the lack of accurate description of the experimental adsorption process in comparison to the experiment and is found to occur specifically in the range of mesopore filling. It is well known that adsorption isotherms of mesoporous materials exhibit hysteresis and that capillary condensation (a kinetic phenomenon during the adsorption process) results in a shift of the mesopore filling during adsorption towards higher pressure, reflected by a steep increase in uptake in a narrow pressure range. The GCMC simulations conducted in this work and predominantly in most other studies do not capture these kinetic effects. We have observed this kind of deviation of simulation from experiment in isotherms of DUT-49 materials in particular for the adsorption of long chain alkanes such as n-butane (see https://www.nature.com/articles/s41467-019-11565-3 , https://pubs.rsc.org/en/content/articlelanding/2020/sc/d0sc03727c#!divAbstract )

11) In situ PXRD analysis under exclusion of light.
To characterize adsorption induced structural transitions of DUT-163 we used two different in situ-powder Xray diffraction setups at KMC-2 beamline of the BESSY II synchrotron 15 , operated by Helmholtz-Zentrum Berlin für Materialien und Energie. The first experimental setup allows to expose the MOF sample under defined pressures of non-corrosive gases up to 100 kPa at defined temperatures in the range of 300-15 K while recording PXRD patterns of the absorbent sample in parallel. This instrumentation is based on the volumetric adsorption instrument BELSORP-max and a closed-cycle Helium cryostat, equipped with an adsorption chamber with beryllium domes 16 . It was used to investigate structural transitions of DUT-163 upon adsorption of n-butane at 298 K and MP at 261 K. PXRD patterns were measured at constant wavelength λ = 0.15406 nm (E = 8048 eV) in transmission geometry. Because of the bulky cryostat, the sample holder cannot rotate during experiments, however an average crystallite size in the range of 2-5 µm and using an area 2D detector (Vantec 2000, Bruker) allowed to record diffraction images with reasonable particle statistics. Each 2D image was measured with 31 s exposure. For each experiment 10-12 mg of sample were used. In order cut off reflections coming from the crystalline Be-dome, tungsten slits with 5 mm aperture were mounted on the detector cone. The obtained diffraction images were integrated using DATASQUEEZE 2.2.9 17 with further processing in FITYK 0.9 software 18 . For these experiments no physisorption isotherms were measured in situ but defined dosing pressures were selected based on the previously recorded isotherms. For each pressure point the sample was equilibrated for 300 s before PXRD patterns were recorded. In case of the manual measurements, each pressure was set manually and PXRD patterns were measured after the pressure in the cell was

Gas-cell setup for irradiation at cryogenic temperatures
To characterize phase transitions by PXRD in parallel to gas adsorption and irradiation at cryogenic temperatures (in the conducted experiments methane physisorption in the range of 115-122 K) we modified the sample stage by introducing fiber optics. Experiments were conducted at KMC-2 beamline, operated by HZB. 15 An instrumentation, based on the closed-cycle helium cryostat, gas dosing apparatus and specially designed in situ cell was used. A flat sample holder for reflection geometry was designed to facilitate the simultaneous sample irradiation from the top and PXRD measurements. The sample cell was mounted on the cryostat, which was fixed on the goniometer of the beamline. The goniometer was equipped with XYZ table allows  The LEDs M365FP1 (λ= 365 nm, 15.5 mW) and M455F3 (λ= 455 nm, 24.5 mW) in combination with glass fibre optic from Thorlabs GmbH were used for the sample irradiation. BELSORP-max instrument was used for precise regulation of the pressure in the cell in range of 0.1 Pa to 100 kPa. After each gas dosing step, the sample was equilibrated for at least 300 s to establish adsorption equilibrium conditions. PXRD patterns were measured using irradiation with E = 8048 eV (λ = 0.15406 nm) and beam size of 0.3x0.3 mm in reflection geometry and ω-2θ scans with step scans with Δ2θ = 1° and 15 s exposure per step. VANTEC 2000 2D detector from Bruker AXS was used for the data collection. The data were automatically integrated using GADDS software and scaled using the powder software, developed at the beamline for this purpose. Because of thermal expansion of the cryostat and contraction / expansion effects of the sample, an automatic height correction was performed before each scan. The thickness of the sample bed in these experiments is estimated to be in the range of 0.8-1.3 mm and cannot be precisely adjusted.
Based on the previously collected methane adsorption data (Supplementary Figure 30) four experiments were conducted.
1. Analysis of methane adsorption at 115 K without irradiation → sample change 2. Analysis of methane adsorption at 122 K without irradiation 3. Analysis of methane adsorption at 120 K with irradiation (365 nm, 455 nm) 4. Analysis of methane adsorption at 120 K without irradiation Experiments 2-4 were conducted on the same sample using the recycling procedures described above. In situ PXRD experiments of methane adsorption in DUT-163 at 115 K show an almost complete disappearance of the peak intensity at 30 kPa and the appearance of reflections with low intensity that can be assigned to the formation of the cp phase. At higher pressures of 100 kPa the peaks of the op reappear and the cp phase is found to be reversibly transferred back to the gas-filled op phase. This reversable breathing is typical for DUT-49 type frameworks and validates the experimental setup.
The second experiment was conducted at 122 K, a temperature at which no adsorption-induced contraction is found to occur (Supplementary Figure 30 The third experiment was conducted in parallel to methane adsorption at 120 K, a temperature close to the temperature range at which adsorption-induced contraction is found to occur (Supplementary Figure 30). First the sample was irradiated at 365 nm and 455 nm in parallel to the adsorption process up to a pressure of 40 kPa.  Figure 49). The sample was subsequently recycled by increasing the temperature to 130 K and desorbing the methane in dynamic vacuum.
The fourth experiment was conducted on the same sample in parallel to methane adsorption at 120 K without irradiation. Interestingly, small peaks of the cp phase occur in the pressure range of 45-80 KPa but with peak intensity inferior to the previously conducted experiment with irradiation. At 100 kPa peaks of the cp phase disappeared and only peaks of the op phase are present indicating a complete reopening of the partially contracted framework. To better illustrate the evolution of the different phases peak intensities for the op (3.128°) and cp (4.177°) were extracted and plotted against the pressure. It is obvious that peak intensities of the op phase change as a function of methane pressure. This can be explained by the incorporation of methane molecules in the pores of DUT-163. These methane molecules, although not spatially fixed, transiently occupy different crystallographic positions and thus contribute to the scattering intensity of the framework. This property is well known from X-ray studies in parallel to Ar adsorption 19 in mesoporous materials in which an increase in scattering intensity is observed upon mesopore filling which is then again reduced with increasing pressure and pore saturation. Comparison with the dataset recorded at 115 K shows a sharp drop in signal intensity of the op phase due to structural contraction. The experiments clearly demonstrate the reversibility of the op-cp transition in DUT-163. Furthermore, the sample can be recycled by applying a protocol that involves desorption of the gas at elevated temperatures. Undoubtful analysis of the photo-induced structural contraction cannot be delivered from this experiment since peaks of the cp phase are also present without the application of a lightsource. In addition, it is unclear to what extend the fibre optics required in this experimental setup reduce the light intensity that hits the sample and which penetration depth can be expected from a powdered sample with a thickness of ca. 1 mm.
To analyze these factors, we decided to apply a second experimental setup specifically designed to analyze photoirradiation at ambient conditions.

Capillary setup for irradiation at ambient temperature
Because the Be-domes used in the above described setup do not allow to irradiate the samples and the light intensity and penetration depth in the cryogenic fibre-optics-based setup were insufficient a different setup was used based on an instrumentation originally built for high pressure adsorption 20 . In this setup <0.2 mg of DUT-163 powder is placed in quartz capillary (diameter <1.5 mm) which are connected to a gas dosing system via a VCR valve and Cu-capillary and a cryojet system for temperature control (setup shown in Supplementary The capillary can be rotated for improved diffraction statistics and uniform irradiation. The sample temperature is controlled via an Oxford cryojet system that allows to set the sample temperature in the range of 270-310 K with a temperature fluctuation below ±0.1 K. The sample temperature is monitored by a sensor attached adjacent to the sample capillary and recorded at a frequency of 0.5 Hz. To stabilize the adsorption temperature the sample-filled capillary is placed in a copper block with holes drilled for the capillary, the cryojet inlet for temperature control, the temperature sensor, the X-ray beam, and for light irradiation.
The setup is installed at KMC-2 beamline of the BESSY II synchrotron 15  To compare the absolute intensity evolution of different experiments the PXRD patterns from experiment CAP1-CAP9 were adjusted to represent the same exposure time compared to CAP10-CAP20. Quartz capillaries with diameters of 0.3 mm, 0.7 mm, and 1 mm were used to assure maximum exposure of the sample with light and a high transmission and good resolution of X-ray diffraction.
No adsorption isotherms could be recorded in situ due to the small sample amount that fits inside the capillaries.
Gas dosing was performed continuously and not stepwise as compared to the previously mentioned setup for analysing MP adsorption at 262 K. All experiments were conducted using MP of 99.9% purity. To assure quasi-equilibrated adsorption conditions over the whole bulk sample, small sample amounts below 0.3 mg (compared to 10-12 mg in the traditional Be-dome setup) and the pressure increase was kept below a rate of 10 Pa s -1 . This results in a pressure resolution of 0.3 (at low pressure)-1.2 kPa (at high pressure) per PXRD pattern (exposure 50s, deadtime 10s). The gas dosing was performed using a syringe pump (Modell 260D from TELEDYNE ISCO) with a maximum cylinder volume of 260 cm 3 . The decrease of this volume by moving the piston at a certain fixed rate generated a constant gas flow from the gas-filled cylinder volume to the sample capillary resulting in a hyperbolic pressure increase. After each experiment, the whole dosing system was evacuated and flushed with fresh methylpropane (MP) to avoid contamination. Experiments with 0.3 mm and 1 mm capillary were conducted in the following order: 1) Quartz capillary was glued in a Swagelok sample holder 2) Sample was placed in capillary under inert conditions in an Ar-filled glovebox 3) Capillary was placed in the sample stage and connected to the gas dosing system 4) Sample was evacuated in dynamic vacuum at p<10 -2 Pa for at least 20 min 5) Sample temperature was set and equilibrated 6) PXRD pattern of evacuated sample (p = 0 kPa) was recorded 7) Sample was exposed to p ≈ 30 kPa MP 8) External light source (LED with corresponding wavelength) was installed and operated 9) Continuous PXRD recording and pressure increase (adsorption) were started simultaneously until a pressure in the range of 100 kPa was reached where PXRD recording was halted 10) Continuous PXRD recording (55 s exposure, 5 s blank) and pressure decrease (desorption) were started simultaneously until the initial pressure of 20 kPa was reached where PXRD recording was halted 11) Depending on the nature of the experiment (summary of experiments in Supplementary          Table 2), and c) magnified region during adsorption. Grey area indicates exposure period of detector for recording of diffraction images.  Table 2). c) selected PXRD patterns in comparison with simulated PXRD patterns of DUT-163op (purple) and DUT-163cp (orange) and theoretical peak positions as vertical lines. d,f) Contour plots based on PXRD data with absolute intensity (a,d) and normalized to the highest intensity (b,f). e) Intensity evolution at the peak positions of the (111) reflections of DUT-163op (purple) and DUT-163cp (orange). g) Evolution of MP pressure during the experiment.

13) Rietveld refinement of PXRD data
To obtain the crystal structure of DUT-163cp we analyzed in situ PXRD patterns, measured in the thermodynamic equilibria at 20 kPa during the adsorption of methylpropane at 261 K, by Rietveld method. The refinement was performed using the Reflex tool of Materials Studio 5.0. A structural model of the (E)-DUT-163cp that contains (E)-dacdc was generated in the space group Pa3 ̅ . Paddle-wheel units, carbazoles, phenyl rings, nitrogen atoms of the diazo group, and MP molecules in the pores were defined as rigid bodies, respectively. Rietveld refinement with energy option (contribution of UFF ~1%) was used in the structure refinement to maintain framework connectivity. The final structural parameters are given in the Supplementary Table 4 and the corresponding Rietveld plot is shown in the Supplementary Figure 78.The crystal structure of (E)-DUT-163cp is submitted in CSD database and available under CCDC-2040811.
It must be noted that diffraction patterns of DUT-163cp exhibit severe peak broadening and a drastic reduction in peak intensity. The origin for this loss in diffraction intensity is based on the presence of nonordered gas molecules in the pores and the structural disorder of the cp phase due to the highly strained ligand. As a result quantitative Rietveld analysis, in particular of diffraction patterns that contain mixtures of op-cp phases.
Supplementary  u.)     To recreate the sample environment applied in the in situ PXRD studies we extended the DR-UV-Vis analysis using 2-Methylpropane as gas and performed the measurement at 300 K. Because the experiments were conducted under gas flow, the feedstock 2-Methylpropane bottle was kept at 301 K guaranteeing equilibrated temperatures of 300±1 K of the sample, crucial for the experiment. A set of two experiments were conducted on two individual samples.
First, DUT-163 was dosed with 2-Methylpropane under exclusion of light (Supplementary Figure 85a,b). Only a very minor chane in the UV-Vis specta is observed indicating the absence of structural transitions. After 20 min of equilibration the sample was irradiatied with 365 nm and a redshift of the spectrum was observed similar to the previous analysis using n-butane as gas. This observation indicates structural contraction by parallel application of light and 2-Methylpropane while gas dosing alone at 300 K was insufficient to trigger structural contraction.
In a second experiment on a fresh sample we continuously irradiated the sample before and during the dosing with 2-Methylpropane at 300 K (Supplementary Figure 85c,d). similar to previous observations we identify a decrease in absorbance around 550 nm upon application of 365 nm and a strong redshift upon exposure to 2-Methylpropane. Similar to the first experiment both, only gas dosing and application of light under these conditions yielded structural contraction. Changes in the overall signal intensity between different loadings can occur due to sample contraction upon structural transitions. This is a common feature that all spectroscopic techniques that rely on a constant exposed area. These effects can to some degree be minimized by normalizing the spectra to the highest intensity. The spectra themselves should not suffer from these effects and shifts in the signal are attributed to changes in the electronic structure rather than the sample are. In some measurements an artificial step in the UV-Vis spectra between 349 and 350 nm is observed which is caused by the instrument due to the change of radiation source. These steps were corrected by aligning the signal intensities <350 nm by subtraction or addition of a constant value in the range of 0.01-0.03 depending on the magnitude of the step.

15) In situ DRIFT spectroscopy
In situ DRIFT spectroscopy on MOF samples was conducted using a HARRICK Praying Mantis reaction chamber with ZnSe windows. Samples were either investigated under inert atmosphere (N2) or by applying a constant flow of a mixture of inert carrier gas (N2) and vaporized CCl4 by bubbling. CCl4 was selected due to the low absorptivity and small range of IR-active vibrations compared to n-butane (Supplementary Figure 84). The temperature of the sample was found to be in the range of 297 K. The composition during in situ adsorption of vaporized CCl4 was estimated by two valves controlling the flux of inert and CCl4 saturated inert gas and tested on a blank measurement. The concentrations could internally be estimated by the signal intensity in the DRIF spectrum. DUT-49 was investigated as a reference material.
Supplementary Table 6

16) In situ Raman spectroscopy
Raman experiments were conducted on 2 different Raman microscopes using a Raman microscope and 785 nm and 633 nm lasers for excitation of solid samples. For investigation of solid MOF Powders low sample amounts (<0.2 mg) were placed in a quartz cuvette under dry nitrogen atmosphere in a glovebox and sealed. Samples were irradiated with the same LED setup (365 and 455 nm) previously used for solution and solid-state UV/Vis and DRIFTS experiments.
Structural contraction without irradiation was investigated by CCl4 adsorption in accordance to the DRIFTs experiments. In addition, Raman spectra were recorded of the samples previously analyzed by in situ PXRD which were sealed in an Ar-filled glovebox. To investigate effects of local irradiation on the structural transition capillaries from the PXRD experiments (CAP4, CAP10, CAP13 and CAP17) were used.
Supplementary Table 7

17) Computational analysis of porosity and adsorption properties
Pore characteristics such as density, specific geometrical pore volume, and specific geometrical accessible surface area were calculated using Zeo++ 21 in the default settings. Simulations were performed on the simulated crystal structures of DUT-163op, (E)-DUT-163cp, and (Z)-DUT-163cp.
Supplementary Table 8. Specific surface area, pore volume and density of the series of materials determined by Zeo++ based on simulated crystal structures of op and corresponding cp phases. Experimental pore volumes were determined from nitrogen adsorption isotherms at 77 K and a relative pressure of 0.95. Each isotherm was simulated with an equilibration of 5×10 5 cycles and the subsequent 1×10 6 cycles were sampled, for each pressure point. A total of 50 pressures were investigated for each temperature and were uniformly distributed in log space between 1×10 -2 Pa and 1×10 6 Pa. For each simulation, the van der Waals interactions for the framework used the UFF force field 23  (1) All these values except ∆ − can be found in the above simulated isotherms so to consider the energetic contributions to the osmotic potential ∆ is computed as described in supplementary equation 2.
This difference in osmotic potential function (∆ ) allows us to characterize the energetic conditions for temperature dependent adsorption-induced contractions 12 as contraction will only occur when ∆ > ∆ − . The potential for contraction is observed to decrease with increasing adsorption temperature, as ∆ − is considered temperature independent 26 .

18) Computational analysis of framework mechanics
Molecular dynamics simulations were used to compute the structures of DUT-163 using the MOF-FF forcefield 27 . Parameters missing from MOF-FF were adapted from the MM-3 forcefield 28 and previously reported parameters for azobenzene 29 . The lammps code was employed for computing the molecular dynamics and optimizations 30 . Op and cp structures were simulated starting from an idealized crystal structure. The conjugate gradient method was used for geometry optimization and steepest descent to relax the lattice parameter to a threshold root-mean-squared value of 0.0001Kcal/mole-Angstrom.
Free energy profiles were computed using a prior established protocol with the approximation of a cubic cell 31 . Bulk moduli were computed from the slope of the pressure-volume equations of state. The free energy profiles for MP included structures were computed using an identical approach employing the lammps "deposit" fix to randomly place gas molecules into the cell. MP molecules were treated as rigid particles using the same van der Waals forcefield parameters as the GCMC simulations.
E-Z isomerization is based on an excited transition state and to probe the influence of this on the framework properties simulations were completed using a modified classical potential. The DUT-163 classical potential parameters were modified by halving the dihedral parameters of C-N-N-C and turning off the improper dihedral potential imposed on the two carbon atoms of the azobenzene unit. This is one of the criteria reported by Böckmann et al. to emulate the NN-twist mechanism observed in nonadiabatic ab initio MD

19) Computational analysis of single ligand ligand buckling
Ligand buckling simulations were performed according to a strategy previously applied to ligands in DUT-49type frameworks. 14,26 The ligand dacdc was simulated using density functional theory (DFT) simulations employed by the ORCA 4.2.1 software. 32,33 The B97X-D/def2-TZVP//B3LYP/6-31G(d,p) level of theory consistent with the analysis of the E-Z isomerization described below. Dispersion corrections were included using the Grimme "D3-BJ" approach. 34,35 The optimized structure was strained by decreasing the N-N length from the identified local minimum of 11.84 Å to 11.04 Å, in 20 steps. No other constraints to the structure were applied. For each step, the structure was optimized with default convergence criteria and with this N-N length fixed.

20) Computational analysis of the thermal E-Z isomerization of Me4dacdc
All the calculations for the thermal isomerization of Me4dacdc were carried out using the Gaussian 16 Rev. B.01 36 at the B97X-D/def2-TZVP//B3LYP/6-31G(d,p) level of theory. To take into account the diradical nature of the rotational transition state, a broken-symmetry approach was included. All the optimizations were confirmed to be stationary points by the number of imaginary frequencies found (0 for the minima,1 for the transition state). The cartesian coordinates (in Å) and energies (in Hartrees) for all the relevant structures are reported in the following section.  In the simulated Raman spectra two particularly interesting bands distinguish the E from the Z-isomer which are observed at 1453 and 1468 cm-1. Both of these bands involve an N-N stretching of the central diazobond. And only occur in the E isomer. In fact, in the experimental Raman spectra upon irradiation at 365 nm the band at 1460 cm -1 with a small shoulder at 1475 cm -1 undergo a strong decrease in intensity allowing to use this band as a fingerprint for the E-isomer.

Supplementary
Due to the nature of the isomerization infrared spectroscopy is less sensitive to track changes in the molecular structure compared to Raman spectroscopy. However, from the DFT simulation the band at 1604 cm -1 is prominent for the N-N stretch vibration for the (Z)-isomer and not present in the Z-isomer. Although no pronounced changes in the FTIR spectra could be observed that would allow to definitely describe the presence of the Z-isomer, the studies of the ligand by FTIR are in particular useful for the investigation of the MOF material at a later stage.

21) Computational analysis of the charge transfer in Cu2dacdc
In order to compute the possibility of a charge transfer between the HOMO and the LUMO of the chromophore in DUT-163, we approximated the photoswitchable core to a triacid with only a copper dimer attached to one of the acid sites. All the calculations were performed using ORCA 4.1.2 32,33 . The starting geometry was obtained from the X-Ray diffraction optimized structure. We removed three copper dimers and substituted those cores with a proton. The fourth copper dimer was capped with formates. All the oxygens and the copper cluster were fixed while the other atoms were optimized at the B97-3c level. Spin-flip DFT was computed at the PBE0/def2-TZVP level. Supplementary

22) TD-DFT analysis of the excited state of H4dacdc
In order to compute the buckling motion at the excited state we picked 20 geometries of the dacdc chromophore obtained from the MD run describing the buckling geometries of DUT-163 at the ground state. The carboxylates were functionalized with protons to obtain the tetraacid H4dacdc and the geometries were reoptimized at the B97-3c level, fixing the carboxylate oxygens to preserve the distortion derived from the buckling. Both CNN angles were further fixed in order to scan different elongations-contractions of the central azo bond, performing a redundant optimization scan of 5° from 100 to 155 degrees. TD-DFT calculations were performed following the Tamm-Dancoff approximation on 10 different states at the PBE0/def2-TZVP level. All these calculations were performed via the ORCA 4.1.2 suite. 32,33 All the coordinates are given as a separated compressed file as additional supplementary information.