## Introduction

The design of responsive porous materials, in which the porosity can be modulated externally and non-invasively by light to control adsorption, transport, and release properties offers fascinating opportunities. Azobenzene (AB) molecular photoswitches1 (PS) undergo light-activated E-Z isomerization and are frequently applied in light-responsive actuators2 membranes3, smart materials4, and single-molecule optical memories5. Pendent AB-switches grafted onto the backbone of porous metal-organic frameworks (MOFs) were demonstrated to reversibly control the separation and release of guest molecules by manipulating the porosity and host-guest interactions via photoswitching6,7,8. However, pendent AB switches occupy pore space, which could be used for guest inclusion, and lack cooperativity that would be highly beneficial for the efficiency and selectivity of adsorption processes9,10. Soft porous crystals11 (SPCs) exhibit cooperative framework deformation dictated by the crystal structure. As a result, SPCs show adsorption phenomena such as gate-opening (pore expansion)12, breathing (pore contraction)13, and negative gas adsorption (NGA, gas release upon pore contraction)14 that show potential for improved diffusion15,16, storage17 and separation15 of gases and gas mixtures. Currently the contraction and expansion of the porous network of SPCs are primarily guest-induced and energetically driven via adsorption18. To date, the chemical modification of building blocks and framework topology are the dominant strategy to alter the guest-responsive behavior of SPCs19,20. The use of diarylethene PS in the framework backbone is a promising strategy to manipulate cooperative framework transitions21,22,23,24. However, the observed effects are very small, compared to the response due to guest-induced deformations of SPCs, and the initiation of massive framework deformations in SPCs by the application of both light- and guest-interactions is unprecedented. The large geometric change upon E-Z isomerization of AB is expected to result in a much stronger framework deformation when incorporated in the framework backbone. Until now, photoswitching is observed to be either suppressed due to framework constraints25,26 or causes irreversible bond-breaking and degradation of the extended framework27,28,29,30. The fundamental challenges of how to accommodate the large geometric change of AB upon E-Z isomerization and establish photoinduced cooperative transitions, in the absence of framework disintegration, requires uncompromised/robust photoswitching, sufficient mechanical softness, enhanced porosity, and long-range order. Furthermore, it remains unexplored whether geometric constrains of framework-embedded PS might result in alternative photoswitching pathways, unknown for unconstrained molecular PS.

In this work we demonstrate the design and analysis of DUT-163, a MOF with framework-embedded azobenzene photoswitch. DUT-163 exhibits structural contraction by combined application of light irradiation and adsorption-stress via gas adsorption. Our work is based on a detailed theoretical analysis of the energy landscape of DUT-163 followed by in depth in situ experimental analysis using a range of spectroscopic and diffraction methods. From this data we derive that unexpectedly the contraction mechanism in DUT-163 is based on a buckling process of the ligand, previously unknown for molecular AB photo-switches. This mechanism is further supported by a series of computational simulations that detail the photochemistry and adsorption mechanism. Our analysis highlights the impact of framework-constraint on the behavior of framework-embedded photo-switches and postulates framework softening via light irradiation as the underlying mechanism responsible for framework transitions in DUT-163. Furthermore, we show that the light activation is applied locally allowing to use this process in light-responsive nanoscopic pneumatic systems and gas-releasing devices.

## Results and discussion

### Modeling of molecular photoswitch and framework

We selected the 49th MOF material discovered at the Dresden University of Technology (DUT-49)31 as a blueprint for our new photoresponsive SPC design because of its ability to accommodate large changes in ligand configuration and framework structure without disintegration following substantial framework contraction14. The three-dimensional (3D) framework of DUT-49 is based on the linkage of tetra-connective carbazole-based ligands to copper(II) dimers. By using (E)-9, 9’-(diazene-1, 2-diylbis(4, 1-phenylene))bis(9H-carbazole-3, 6-dicarboxylic acid ((E)-H4dacdc) we are able to establish the structurally related framework of DUT-163 which contains an AB functionality in the backbone. We conducted density functional theory (DFT) simulations of (E)-H4dacdc and its methylester ((E)-Me4dacdc), to probe the energetics upon buckling32 and E-Z-isomerization as a function of the distance between two AB-bridged carbazole-nitrogen atoms (dN-N) and the dihedral angle of the azo-unit (δCNNC) (Fig. 1).

Regardless of the E-Z isomerization mechanism chosen (i.e. rotation or inversion33,34), the energy barrier of E-Z isomerization at the ground state is over five times larger than the barrier of buckling (E)-Me4dacdc. This result is to be expected since buckling is a conformational change while E-Z isomerization involves the breaking of the azo π-bond in the ligand backbone. To investigate how the constraints imposed by the incorporation in a framework impact the energetics of E-Z isomerization and buckling, we computed the contraction mechanism of DUT-163 as a function of unit cell volume (VUC) for buckling and E-Z isomerization of the ligand by molecular dynamics (MD) simulations (Fig. 2).

Similar to the analysis of the unconstrained Me4dacdc ligand, E-Z isomerization of dacdc in DUT-163 exhibits a much larger energy barrier compared to the buckling transition (Fig. 2). However, the associated contraction mechanism of the DUT-163 framework exhibit two very different trajectories. The energy landscape of DUT-163 as a function of VUC exhibits the global minimum at VUC = 120 nm3 corresponding to the open pore (op) state (DUT-163op) (Fig. 2f). A metastable state with buckled ligand in E conformation at VUC = 54 nm3 is observed which is assigned to a contracted pore (cp) state, further denoted as (E)-DUT-163cp (See supplementary videos 1 and 2). This state is very similar to DUT-161cp which contains a stilbene instead of an AB unit in the ligand backbone35.

To probe the framework energetics upon E-Z isomerization of dacdc, we investigated the evolution of VUC and the framework geometry as a function of φCNNC (See supplementary video 3 and 4). Interestingly, this energy landscape presents a local minimum at VUC = 74 nm3, which is assigned to a contracted framework with dacdc in Z-configuration, (Z)-DUT-163cp. The energy barrier for contraction (Eop-cp) per unit cell (UC) between DUT-163op and (E)-DUT-163cp (Eop-(E)cp = 1250 kJ molUC−1) is ca. three times smaller compared to the barrier between DUT-163op and (Z)-DUT-163cp (Eop-(Z)cp = 3900 kJ molUC−1) (Fig. 2). Based on this data it can be concluded that DUT-163 is theoretically able to undergo contraction via buckling or E-Z isomerization, with buckling being the energetically more favorable mechanism at the ground state.

### Photoswitching of the molecular ligand

(E)-H4dacdc was synthesized using an established strategy (see Supplementary Information for details)36. Upon irradiation at 365 nm (295–298 K) we observed changes in the UV-Vis absorption, Raman (Fig. 3) and 1H nuclear magnetic resonance spectra (Supplementary Figs. 710) of (E)-H4dacdc and the corresponding n-butyl ester ((E)-nBu4dacdc), typical for light-induced E-Z isomerization33,37.

For both molecules, we observed a photostationary state (PSS) composed of a ca. 1:1 E-Z mixture at 293 K. Upon irradiation at 455 nm the Z-isomer was partially reverted to a PSS comprising of ca. 25% of the Z-isomer. Thermal Z-E isomerization was observed by heating above 338 K for over 5 h and the system showed excellent photochemical and thermal reversibility in solution.

### Synthesis of DUT-163

The solvothermal reaction of H4dacdc with Cu(NO3)2·3H2O in DMF at 80 °C yields DUT-163 as a brown microcrystalline powder with a mean crystal size of 2.6 µm (Supplementary Fig. 28). The single-crystal structure of DUT-163 with cubic Fm$$\bar{3}$$m symmetry and cell dimensions of a = 49.240(6) Å and a unit cell volume of VUC = 119386(41) Å3 was determined by synchrotron-based single-crystal X-ray diffraction (Supplementary Table 8), in line with the in silico optimized op structure. In DUT-163op, dacdc exhibits a linear (E)-configuration in which the AB-unit is disordered due to symmetrical restrictions (Supplementary Fig. 24). The porous framework is characterized by a geometrical surface area, pore volume and pore diameters of GSA = 5112 m2 g−1, Vp(sim) = 3.2 cm3 g−1, and dp = 0.9–2.7 nm, respectively which were simulated from the single crystal structure (Supplementary Fig. 97). Desolvation of DUT-163 was achieved using supercritical carbon dioxide, a protocol previously described for DUT-4936. Permanent porosity was investigated by N2-adsorption experiments at 77 K from which a Vp of 2.84 cm3 g−1 (at p/p0 = 0.98) was determined. The reduction in pore volume compared to the computed values might be based on crystal size effects previously observed for DUT-4938.

### Spectroscopic analysis of structural contraction

The light-responsiveness of DUT-163 was investigated by in situ PXRD, diffuse reflectance infrared Fourier transform spectroscopy (DRIFTS), solid state diffuse reflectance UV-Vis (DRUV-Vis) spectroscopy, and Raman spectroscopy experiments under dry nitrogen atmosphere with 365 nm irradiation at 293 K. These conditions were previously found to promote E-Z isomerization in solutions of both nBu4dacdc and H4dacdc. Interestingly, we observed no significant changes in the Raman and DRIFT spectra as well as PXRD patterns of DUT-163 upon elongated 365 nm irradiation (Fig. 3), indicating the absence of E-Z isomerization of the ligand and structural contraction of the framework. This is further supported by nitrogen adsorption experiments at 77 K, which showed no change in porosity after 365 nm irradiation (Supplementary Fig. 29). However, upon 365 nm irradiation, we observed a bathochromic shift of the absorption in the DRUV-Vis spectrum of DUT-163 corresponding to the AB-functionality, and decrease of the signal assigned to the absorption of the Cu2+-dimer at 550–600 nm (Fig. 3a). The original spectra were not restored upon irradiation at 455 nm (Supplementary Fig. 84). Rather than E-Z isomerization which would cause pronounced changes in the PXRD patterns as well as Raman and DRIFT spectra, we propose a photoinduced charge transfer from the AB-functionality to the Cu2+ site, which is reported in other metal-AB-complexes39. The absence of changes upon irradiation in the DRUV-Vis spectrum of DUT-49 (Supplementary Fig. 80), which does not contain an oxidizable AB-unit, supports such mechanism. Furthermore, spin-flip DFT calculations on Cu2dacdc indicate that the HOMO is located on the AB backbone while the LUMO is localized on the Cu2+-dimer, which would support the feasibility of photoinduced charge transfer (Supplementary Fig. 104).

### Adsorption- and photo-induced structural contraction

Although light-driven contraction via E-Z isomerization was not observed in guest-free DUT-163, we reasoned that additional adsorption interactions might help to stabilize a contracted (Z)-DUT-163cp state and trigger a structural response by parallel application of light and gas adsorption. In initial experiments we recorded MP physisorption isotherms of two individual samples of DUT-163 in the temperature range of 307-295 K for which one sample was irradiated at 365 nm throughout the whole experiment, while the other was kept under light exclusion. Still, no differences between the adsorption isotherms of irradiated and non-irradiated DUT-163 samples could be detected, neither in the temperature range above nor below 299 K (Fig. 4a–c and Supplementary Figs. 3442) indicating the absence of light-induced contraction of the porous material in this experimental setup.

However, the large sample amount (>10 mg) required for accurate gas adsorption experiments causes light scattering and absorption leading to inhomogeneous illumination of the entire bulk solid. Consequently, adsorption experiments only provide little information on structural transitions that potentially occur only for a small part of the bulk sample.

In order to explore in more detail, the light-responsive structural behavior of DUT-163 in parallel to adsorption we designed in situ experimental setups that allow exposing small sample amounts (<0.2 mg) to defined gas pressure while irradiating with light of defined wavelengths under isothermal conditions and tracking structural transitions by synchrotron-based PXRD. Initial experiments used a setup designed for cryogenic temperatures with a flat sample bed in reflection geometry encapsulated in an insulated sample cell connected to glass fiber and gas capillary for irradiation and gas dosing, respectively. This setup was used to analyze methane adsorption at 120 K with and without UV irradiation. In fact, a partial contraction was observed which reversibly transformed back to the pristine op state. Yet, a more detailed study proved difficult due to insufficient light intensity and penetration depth of the flat sample bed (Supplementary Fig. 45). Consequently, a second setup in which sample filled capillaries are directly exposed to UV-light in parallel to the adsorption process proved more suitable and reliable (Supplementary Fig. 51). In a series of experiments, we probed the adsorption-induced structural transition upon MP adsorption at 296 K and 300 K (Fig. 4f).

At 296 K and relative pressure of 0.15–0.16, we observed an op→cp transition (Fig. 4f), demonstrating the ability to generate, observe, and identify the nature of adsorption-induced structural changes in DUT-163 with this setup. In a second experiment we raised the temperature to 300 K, beyond the upper temperature limit for adsorption-induced contraction. As expected, no structural contraction is observed (Fig. 4a) in line with the gas adsorption experiments at 299 K (Supplementary Fig. 38). In a third experiment, we used the same conditions (300 K) on the same sample, but this time irradiated the sample, throughout the whole adsorption process, with 365 nm light. Interestingly, at a relative pressure of 0.17–0.18, we observed a strong decrease in diffraction intensity at 2θ = 3.09 ° and appearance of new peaks at 2θ = 4.07° and 6.66° (Fig. 4e, f), which we can assign to the formation of (E)-DUT-163cp. Reversible reopening of the structure was not observed in the investigated pressure range but is expected to occur at increasing relative pressures similar to the experiment conducted at 262 K without and methane at 120 K with irradiation (Supplementary Fig. 49). Repetition of the experiments at 300 K on three individual samples confirmed the initial observations and the light-responsive behavior (Supplementary Figs. 5761). In all experiments, the temperature recorded in close proximity to the sample was stable at 300 K, with fluctuations below ±0.2 K. We observed no change in the diffraction patterns of (E)-DUT-163cp upon irradiation with 365 nm and 455 nm light (Supplementary Fig. 54), reflecting the absence of light-induced op→cp transition by potential Z-E photoisomerization. In one experiment, 365 nm irradiation was applied only in the relative pressure range of 0.16–0.28, 1 min before the op-cp transition occurred, demonstrating that prolonged irradiation is not essential and the light application allows for temporal control of the process.

### Spatial control over light-induced contraction

Because only a 6-mm length section of the sample-filled capillary was irradiated in the experiments described above, we performed an axial PXRD scan along the capillary to determine the spatial phase composition (Fig. 5).

Only DUT-163 powder in the irradiated area exhibited structural contraction, supporting that light is indeed the trigger for the transition and demonstrating the spatial applicability of light-initiated contraction in DUT-163 (Fig. 5a, d). However, in all irradiation experiments, the residual op phase detected by PXRD indicates that only part of the sample undergoes a contraction. As the dense packing and high absorptivity of DUT-163 in the range of 200-600 nm can filter the light stimulus, we tested the light penetration depth by analyzing DUT-163-filled quartz capillaries with diameters of 0.3 mm, 0.7 mm, and 1 mm (wall thickness 0.01 mm) (Fig. 5f–h). We observed that an estimation of 88% (0.3 mm), 79% (0.7 mm), and 26% (1 mm) of the bulk sample in the detected area underwent contraction, considering the change in intensity of the (111) reflection of DUT-163op at 2θ = 3.09°. Thus, we evaluated that the penetration depth of the applied Light-emitting diode (LED) light is in the range of 0.1–0.15 mm for a non-compressed sample bed of DUT-163 powder. Although a more powerful light source might initiate contraction in a denser or thicker sample bed, the applied low power 15 mW LED used for irradiation in these experiments is sufficient to trigger structural contraction in microscopic or nanoscopic single crystals or thin films.

### Modeling of photoexcited state

To postulate a mechanism of how irradiation can promote contraction via buckling we computed the photoexcitation process of framework-constrained dacdc. Ligand geometries upon buckling were extracted from the MD simulations of the DUT-163 contraction (Fig. 2f). The energy landscapes of the ground state S0 and excited states S1 and S2 for H4dacdc were determined by TD-DFT calculations as a function of dN-N distances and αCNN angles44 (Fig. 6).

To probe the response of DUT-163 upon irradiation we modeled an excited state of DUT-163 (DUT-163*) using established classical potentials that resemble the mechanics of dacdc in a biradical or zwitterionic state (further denoted to as dacdc*). This state is also a good mechanical representation of the previously described photooxidized state upon charge transfer between AB and Cu2+. We investigated the free energy landscape of guest-free DUT-163* upon loading with MP using the same MD method applied in the analysis of the DUT-163 ground state. Interestingly, guest-free DUT-163* is found to exhibit a much lower barrier for contraction compared to DUT-163. The breakage of π-conjugation in the ligand backbone of DUT-163* is the origin for this softening, which is also found to occur in chemically modified DUT-49-type frameworks35. It is well reflected by the simulated bulk modulus of 4.8 GPa for guest-free DUT-163 and 4.1 GPa for guest-free DUT-163*, respectively. Because DUT-163* is mechanically softer compared to DUT-163 adsorption stress produces a greater change in volume. In fact, at a loading of 200 molecules MP per UC, (E)-DUT-163*cp200i-C4H10 was found to be the thermodynamically stable state with a reduction in contraction barrier of 42% compared to DUT-163200i-C4H10 under the same conditions. Although in this model of DUT-163* all ligands are simultaneously in the excited state, which might not occur in a real crystal, even partial photoexcitation or -oxidation is expected to soften the framework of DUT-163 significantly. The nature of the mechanism triggering the softening of the structure can hence be hypothesized to be buckling of the chromophore either via an excited state pathway, as described in Fig. 6a, a photooxidation of the azo group by the Cu2+ clusters (Supplementary Fig. 104), or a combination of both. Additional adsorption interactions lower the barrier for contraction and initiating a light/adsorption-induced cooperative contraction of the crystal. To further analyze the photooxidation and charge transfer mechanism we propose characterization of thin films or single crystals of DUT-163 by methods such as X-ray photoelectron, X-ray absorption near edge structure, or electron paramagnetic resonance spectroscopy.

This dual-stimulus approach provides several advantages over purely light- or adsorption-induced transitions: photoexcitation allows the framework to respond to lower adsorption-induced stress levels and even drive contraction of a metastable state beyond the upper temperature limit of adsorption-induced contraction. The observed contraction results in gas release by NGA in an extended temperature range with a potentially increased magnitude. In addition, it allows to trigger NGA by a physical stimulus that specifically interacts with the framework. This photostimulation can be applied orthogonally to other non-radiative processes and other chemical or physical stimuli. Finally, it provides the possibility to spatially and temporarily control the release of gas via NGA using light as a physical trigger.

In conclusion, we show a cooperative structural transition of a SPC by combined application of light and adsorption-stress. Although DUT-163 was initially designed for contraction via E-Z isomerization of the AB-backbone, this process was ruled out by a combination of in situ experiments and extensive computation. Instead, the contraction mechanism is based on a buckling process, previously unknown for molecular ABs, and highlights the impact of framework-constraint on the behavior of photo-switches. In DUT-163 photoexcitation causes framework softening, allowing to drive structural contraction at reduced adsorption stress levels. The effect is reproducible under different conditions and allows for spatial and temporal control over the framework contraction by light. As such, light-responsive gas release by NGA can be locally and temporarily activated in DUT-163 for the use in nanoscopic pneumatic systems and gas-releasing devices47. The postulated mechanism not only demonstrates a novel switching transition in AB and an unexplored way of initiating structural transitions in SPCs, it provides a novel strategy to physically alter the mechanical properties of extended molecular frameworks without the application of chemical functionalization, potentially allowing such frameworks to respond to other forms of stimuli such as electric or magnetic fields, temperature, or mechanical pressure which would result in a novel class of mechanical nanoscopic actuators. Furthermore, we believe the findings of this study go beyond the discovery of a novel mechanism of a light-induced cooperative transition in a SPC. Over the past years, many AB-doped materials were shown to exhibit light-induced changes of their properties upon irradiation23,48. In the vast majority of cases E-Z-photoisomerization was postulated as the primary origin for the observed behavior. The present study clearly illustrates that framework- or matrix-constrained photoswitches can exhibit properties and states very different to the unrestricted single molecular analog. We conclude that photochemical properties of self-assembled systems are also governed by the structure and nature of the assembly beyond the properties of the molecular building blocks. In-depth analysis of these effects will lead to new design principles and novel properties of smart materials which may give rise to unexpected responsive behavior.

## Methods

### Chemicals

For the synthesis and characterization the following commercial chemicals were used: 4-Bromoaniline (CAS: 106-40-1, 97%, Sigma Aldrich), Cu(NO3)2·3H2O (CAS: 10031-43-3, 98%, Sigma Aldrich), N,N-Dimethylethylenediamine (CAS: 108-00-9, 95%, Sigma Aldrich), 9H-Carbazole (CAS: 86-74-8, >95%, Sigma Aldrich), Copper(I) iodine (CAS: 7681-65-4 99%, Riedel-de Haen), N,N′-Dimethylformamid, (CAS: 68-12-2, 99%, Fischer Scientific). Solvents and stock chemicals were used with purities exceeding 98%.

### Solution/liquid-state NMR

Nuclear magnetic resonance (NMR) spectra were acquired on a Bruker AV III 600 spectrometer (600.16 MHz and 150.91 MHz for 1H and 13C, respectively)). All 1H and 13C NMR spectra are reported in parts per million (ppm) downfield of TMS and were measured relative to the residual signals of the solvents at 7.26 ppm (CHCl3) or 2.54 ppm (DMSO). Data for 1H NMR spectra are described as following: chemical shift (δ (ppm)), multiplicity (s, singlet; d, doublet; t, triplet; q, quartet; m, multiplet; br, broad signal), coupling constant J (Hz), integration corresponding to amount of C or CH. Data for 13C NMR spectra are described in terms of chemical shift (δ (ppm)) and functionality were derived from DEPT spectra.

### Mass spectrometry

Matrix-assisted laser desorption/ionization (MALDI) time of flight (TOF) mass spectrometry analysis was performed on a BRUKER Autoflex Speed MALDI TOF MS using dithranol as matrix.

### Elemental analysis

Elemental analysis was carried out on a VARIO MICRO-cube Elemental Analyzer by Elementar Analysatorsysteme GmbH in CHNS modus. The composition was determined as the average of three individual measurements on three individually prepared samples.

### DRIFT spectroscopy

Diffuse reflectance infrared Fourier transform (DRIFT) spectroscopy was performed on a BRUKER VERTEX 70 with a SPECAC Golden Gate DRIFT setup. Prior to the measurement 2 mg of sample were mixed with 10-15 mg dry KBr in a mortar and pressed in the DRIFT-cell. Assignments of peaks in wavenumber ν (cm-1) were categorized by strong (s), medium (m), weak (w).

Diffuse Reflectance Solid state UV-Vis (DRUV-Vis) spectra were recorded on a VARIAN CARY 4000. 2 mg of sample were mixed with 20′35 mg dry BaSO4 and pressed in the sample cell. To analyze MOF samples under inert atmosphere and in situ under various concentrations of n-butane, a HARRICK Praying Mantis reaction chamber was equipped with a dome containing UV-Vis-transparent quartz windows.

### Thermogravimetric analysis

Thermal analysis (TGA) was carried out in synthetic dry air using a NETZSCH STA 409 thermal analyser at a heating rate of 5 K min−1. Air sensitive MOF samples were prepared in an Ar-filled glovebox and inserted in the instrument with little exposure to ambient conditions.

### Powder X-ray diffraction

Powder X-ray diffraction (PXRD) patterns were collected in transmission geometry with a STOE STADI P diffractometer operated at 40 kV and 30 mA with monochromatic Cu-Kα1 (λ = 0.15405 nm) radiation, a scan speed of 30–15 s/step and a detector step size of 2Ѳ = 0.1–2°. The samples were placed between non-diffracting adhesive tape or in a glass capillary. “As made” samples were analysed while suspended in DMF. Desolvated samples were prepared under inert atmosphere in an Ar-filled glovebox. Theoretical PXRD patterns were calculated on the basis of crystal structures using Mercury 4.0 software package.

### SEM analysis of crystal size and morphology

Scanning electron microscopy (SEM) images of DUT-163 were taken with secondary electrons in a HITACHI SU8020 microscope using 1.0 kV acceleration voltage and 10.8 mm working distance. The powdered samples were prepared on a sticky carbon sample holder. To avoid degradation upon exposure to air, the samples were prepared under argon atmosphere. For each sample a series of images was recorded at different magnifications and for each sample three different spots on the sample holder were investigated. The crystal size refers to the edge length of the cubic crystals as they are the easiest to measure. The analysis of the SEM images was performed with ImageJ Software package49. Values for mean crystal size, as well as relative standard deviation (RSD) were obtained by using the ImageJ Analyse-Distribution function.

For irradiation studies LEDs from THORLABS (M365FP1 Fiber-Coupled LED with 365 nm Nominal wavelength and M455F3 Fiber-Coupled LED with 455 nm Nominal wavelength) were used. The LEDs were controlled by a THORLABS T-Cube™ LED Driver with maximum current of 1.2 A and modulation mode of 0–5 kHz. The 365 nm LED was driven at 1.2 A, the 455 nm LED was driven at 1 A. For irradiation in parallel to UV-Vis (solid and solution), IR, and Raman spectroscopy and in situ PXRD the LEDs were mounted in close proximity to the sample. For in situ NMR studies a Ø400 µm fiber optic was used in a setup that was previously described in more detail50. Irradiation of the sample during gas adsorption with 365 nm was conducted with a CONSORT UV-lamp with 1800 µW/cm².

### Raman spectroscopy

Raman spectra in solution were recorded on a home-built system comprising of a sample holder with magnetic stirrer, 785 nm 400 mW laser (Cobolt, 08-NLDM) guided through a Raman probe and connected to a spectrograph (AndorTM Technology, Kymera 193i) equipped with CCD camera (AndorTM Technology, iDus-416). Solid samples were packed in Quartz capillaries and sealed under dry nitrogen atmosphere in a glovebox. Raman spectra of MOFs were recorded using a fiber coupled Raman microscope equipped with a 785 nm (50 mW) or 633 nm (300 mW) laser.