Gas-responsive porous magnet distinguishes the electron spin of molecular oxygen

Gas-sensing materials are becoming increasingly important in our society, requiring high sensitivity to differentiate similar gases like N2 and O2. For the design of such materials, the driving force of electronic host-guest interaction or host-framework changes during the sorption process has commonly been considered necessary; however, this work demonstrates the use of the magnetic characteristics intrinsic to the guest molecules for distinguishing between diamagnetic N2 and CO2 gases from paramagnetic O2 gas. While the uptake of N2 and CO2 leads to an increase in TC through ferrimagnetic behavior, the uptake of O2 results in an O2 pressure-dependent continuous phase change from a ferrimagnet to an antiferromagnet, eventually leading to a novel ferrimagnet with aligned O2 spins following application of a magnetic field. This chameleonic material, the first with switchable magnetism that can discriminate between similarly sized N2 and O2 gases, provides wide scope for new gas-responsive porous magnets.

I n this Internet of Things age 1 , it is essential to control how information is processed when only slight differences within the data exist, leading to the notion of sensing. The development of highly sensitive devices for ubiquitous gas and innocuous small molecule sensing is one of the major challenges in the field of materials science 2 . A magnetic change can be beneficial for providing a responsive signal in such a sensing device, and would be advantageous for gas detection owing to contactless operation and detection independent of the sample shape of the host framework. Further, devices that respond quickly with easy operability and readability for ON/OFF updates are desirable; the availability of spin freedom in host-guest interactions for gas sensing is an innovative technique that could make this possible. For instance, distinguishing between nitrogen (N 2 ) and oxygen (O 2 ) gases is exceedingly difficult because of their similar size and boiling points 3,4 . Detecting a magnetic change induced by the intrinsic magnetic nature of these gases (i.e., diamagnetic N 2 and paramagnetic O 2 ) would represent a major breakthrough in gassensing technologies. For this purpose, however, a drastic phase change in magnetism, not just small modifications of magnetic properties 5,6 , is necessary. The gas-induced magnetic response has also been investigated using Fe II spin-crossover systems; [7][8][9] however, magnetic discrimination between O 2 and N 2 has never been observed. Meanwhile, drastic magnetic changes induced by solvation/desolvation 10 have prompted lively discussions on magnetic sponges [11][12][13][14][15][16][17] and spin-crossover systems [18][19][20][21] . Despite this, a strong magnetic response to gases in air such as N 2 , O 2 , and carbon dioxide (CO 2 ), which possess relatively small sizes and low or no reactivity and electric polarity, remains a significant challenge for the development of functional porous magnetic materials.
Here, we report a porous layered ferrimagnet that reversibly alters its magnetic phase in response to the magnetic type of the inserted gas, i.e., diamagnetic for N 2 and CO 2 or paramagnetic for O 2 . The fully O 2 -adsorbed compound changes to an antiferromagnet, but application of a magnetic field results in a unique ferrimagnetic phase where some of the oxygen spins become aligned synergistically. Recently, the control of spin coupling on oxygen molecules inserted into molecular porous frameworks [22][23][24][25][26][27] or graphite 28,29 , as well as in bulk materials [30][31][32][33] , has been seen as an important topic. Nevertheless, this is the first case in which a paramagnetic phase resulting from condensed oxygen molecules plays a key role for long-range ordering in an O 2 -accommodated magnet.

Results
Crystal structure of the pristine framework. To develop gasresponsive porous magnets, we chose a layered ferrimagnet,  2 constructs a fishnet-like two-dimensional network lying on the (100) plane that stacks along the a-axis (Fig. 1a,b). The inter-layer distances defined by the vertical (l 1 ) and inter-unit translational (l 2 = a-axis; Fig. 1b) distances between the planes are 9.78 Å and 10.65 Å, respectively (Supplementary Table 8), and the crystallization solvents (3(DCM)·1.5(DCE)) are located between the layers with a solvent accessible volume of 713 Å 3 (32% of total volume).
Magnetic sponge behavior. The spins of the [Ru 2 II,II ] (S = 1) and [Ru 2 II,III ] + (S = 3/2) moieties interact antiferromagnetically with the radical spin of TCNQ(MeO) 2 •-41,42 over the layered network forming a ferrimagnetically ordered layer, which is followed by three-dimensional ferrimagnetic ordering with inter-layer ferromagnetic interactions 15,34,36,[38][39][40] . The magnetic transition temperature T C (or T N for antiferromagnetic ordering) for this type of layered magnetic material should be strongly affected by intralayer exchange interactions between the [Ru 2 ] 0/+ units and TCNQ(MeO) 2 •-, as well as inter-layer dipole interactions 15,36,[38][39][40]43 . Figure 1f shows the temperature dependence of field-cooled dc magnetization (FCM) of 1-solv and 1 in a 1 kOe dc field (H dc ). In both compounds, an abrupt increase in the FCM is observed near 80 K without a subsequent decrease at lower temperatures. This occurs independent of the applied fields, indicating the onset of ferrimagnetic ordering 35,37 (details of the comparison between 1-solv and 1 are described in Supplementary Fig. 3 and Supplementary Note 3 and 4); however, their T C values differ (i.e., 83 K and 76 K for 1-solv and 1, respectively), as evaluated from remnant magnetization (RM) (inset of Fig. 1f) and ac susceptibility data ( Supplementary Fig. 3b, e, Supplementary Note 3).
Gas sorption capability. In addition to the magnetic sponge capabilities for crystallization solvents, 1 has the ability to adsorb gases such as CO 2 , N 2 , and O 2 ; the gas-adsorbed phase is defined as 1 ⊃ Gas. Figure 2a shows their sorption isotherms (a log-scale plot is shown in Supplementary Fig. 4). For N 2 , 1 has a nonporous nature at 77 K because of the slow diffusion of gaseous molecules into the void space; however, 1 acts as an adsorbent at 120 K, where the 1st gate-opening is observed at a pressure of 3.2 kPa, as found in other low-dimensional porous systems 44 , and reaches an adsorption amount of 27 mL (stp) g −1 (2.3 mol per formula unit) at 99 kPa. The CO 2 adsorption isotherm at 195 K shows a steep rise at relatively low pressures, where the adsorption amount is 102 mL (stp) g −1 (8.7 mol per formula unit) at 99 kPa 45 , even though a gate-opening modification should be involved. The O 2 adsorption isotherm at 90 K shows a stepwise feature; 1st and 2nd gate-opening transitions at ca. 0.1 kPa and 36 kPa, respectively, reaching an adsorbed amount of 110 mL (stp) g −1 (9.5 mol per formula unit) at 99 kPa; however, only the 1st gate-opening at ca. 3.1 kPa is observed when measured at 120 K, eventually reaching an adsorbed O 2 amount of 64 mL (stp) g −1 (5.5 mol per formula unit) at 99 kPa.
Crystal structures under gases. To elucidate the gas-inserted structure, in situ powder X-ray diffraction (PXRD) of 1 were measured under 100 kPa of N 2 at 130 K, O 2 at 94 and 130 K, and CO 2 at 204 K (Fig. 2b), which illustrate the occurrence of structural transformations upon gas adsorption. Two types of gasadsorbed temperature-dependent phases exist at 130 and 94 K under O 2 , which can be associated with the 2nd gate-opening step in the adsorption isotherm for O 2 . Additionally, the PXRD pattern of 1 ⊃ O 2 at 130 K is very similar to that of 1 ⊃ N 2 at 130 K in that it does not undergo the 2nd gate-opening transition.
Hereafter, O 2 -adsorbed phases observed at 130 K and 94 K are denoted as 1 ⊃ O 2 -I and 1 ⊃ O 2 -II, respectively. Notably, the gasinduced structural changes are reversible ( Supplementary Fig. 5); after evacuating the CO 2 gas from 1 ⊃ CO 2 , the PXRD pattern reverts to the original pattern of 1. In the case of 1 ⊃ N 2 , slight heating to 150 K in addition to evacuation is required to promote desorption of N 2 . Of note, the PXRD pattern for 1 ⊃ O 2 -II becomes that for 1 ⊃ O 2 -I by evacuating at 94 K, but it does not return to the pattern of 1, indicating that the 1 ⊃ O 2 -I phase corresponds to an intermediate phase stabilized at low pressures of O 2 even at 94 K (vide infra), which eventually turns into 1 after evacuating at 300 K.
Finally, the crystal structures of 1 ⊃ N 2 , 1 ⊃ O 2 -I, and 1 ⊃ CO 2 were determined by in situ single crystal X-ray diffraction (SCXRD) under gas-pressure controlled atmospheres  .82 (6) (Fig. 2d). To accommodate an additional 4-8 mol per formula unit of gas, a subsequent enlargement in the inter-layer distance is required, as observed in 1 ⊃ O 2 -II and 1 ⊃ CO 2 (Fig. 2c).
Magnetic properties under diamagnetic gases, CO 2 and N 2 . Upon gas adsorption, a significant structural change is induced without alteration in the oxidation state of each unit in the D 2 A layer; in situ infrared (IR) spectroscopy proves the preservation of TCNQ(MeO) 2 •-, even under a 100 kPa gas atmosphere (Supplementary Fig. 11). Therefore, in situ magnetic measurements were conducted in Quantum Design MPMS-7S by accurately handling the gas pressure; the pressure in a homemade cell ( Supplementary   Fig. 12) containing the sample was evacuated down to 0.1 Pa with a turbo-molecular pump at 353 K and the gas was introduced at 200 K up to an inner gas pressure of~116 kPa. The gas-sealed cell was then cooled at a sweep rate of 0.5 K min -1 to 120 K for N 2 , 195 K for CO 2 , and 100 K for O 2 . Each cell was maintained at its respective temperature for 10 h to reach adsorption equilibrium. Once the inner pressure of each cell was obtained, the gas-sealed cell was held at 100 K or 120 K for the FCM measurements. Figure 3a shows the temperature dependence of FCM at 100 Oe for 1 ⊃ N 2 and 1 ⊃ CO 2 prepared in situ, together with that for 1. Upon insertion of N 2 and CO 2 , T C drastically increases to 88 K for 1 ⊃ N 2 and 92 K for 1 ⊃ CO 2 from 76 K for 1 (under vacuum) even under a weaker magnetic field of 5 Oe (Supplementary Fig. 13), establishing the existence of a ferrimagnetic ground state under N 2 and CO 2 atmospheres, where T C was determined from a disappeared point of RM ( Supplementary  Fig. 14). Since N 2 exists in the gas phase at 88 K in bulk, the change in T C is not caused by external N 2 . In addition, N 2 and CO 2 are diamagnetic species. Therefore, the variation in T C results from the adsorbed gases. Given that the decrease in T C from 1-solv to 1 was induced by considerable structural changes, inversely, the increase in T C for 1 ⊃ N 2 and 1 ⊃ CO 2 relative to 1 likely results from a reduction in structural deformation; the wavy layer in 1 is modified into a quasi-flat layer in 1 ⊃ N 2 and 1 ⊃ CO 2 and/or a modification in the inter-layer environment occurs, resulting from closely packed gases (Fig. 3c). Even with such a drastic change in T C , the magnetic-field dependence of the magnetization (M-H) is essentially preserved from 1 (Fig. 3b), although the coercive field (H c ) of 1 ⊃ CO 2 is somewhat larger than that of 1 and 1 ⊃ N 2 . Note that the anomalous steps around zero field for 1, 1 ⊃ N 2 , and 1 ⊃ CO 2 (1 ⊃ O 2 as well; vide infra) could be caused by a small number of free crystals that follow the magnetic field.
Magnetic properties under a paramagnetic O 2 gas. The magnetic behavior of the material under an O 2 atmosphere is completely different from that under N 2 and CO 2 and varies with the O 2 pressure (P O2 ) (Fig. 4). Similar to 1 ⊃ N 2 and 1 ⊃ CO 2 , the T C of 1 ⊃ O 2 increases once at low pressures of P O2 < 1 kPa (e.g., T C = 90 K at P O2 ≤ 0.1 kPa; vacuum pressure level at 100 K). However, under higher pressures, the FCM curve shows an anomaly with a cusp, indicating the onset of antiferromagnetic ordering; for example, T N = 71 K at 1 kPa, which gradually increases to T N = 98 K at 100 kPa with increasing O 2 pressure (Fig. 4a). The variation in T N with O 2 pressure was also confirmed by the magnetization measurements by varying the O 2 pressure at each temperature ( Supplementary Fig. 15). The initial increase in T C at low O 2 pressures (P O2 < 1 kPa) is likely caused by the same mechanism found in 1 ⊃ N 2 and 1 ⊃ CO 2 (Fig. 3c), which could be attributed to the redress of the layered structure, i.e., the modification from a wavy form of 1 to a quasi-flat form in 1 ⊃ O 2 -I (the first step in Fig. 4b). Meanwhile, the drastic change of the magnetic phase from ferrimagnetism to antiferromagnetism could be obtained whether for: (1) a structural change associated with the transformation from 1 ⊃ O 2 -I to 1 ⊃ O 2 -II, or (2) the magnetic contribution of the adsorbed O 2 molecules. To examine these possibilities, PXRD patterns (from both of common lab level and high resolution synchrotron level) were measured by varying the O 2 pressure at a fixed temperature in the range of 70-100 K (Supplementary Fig. 16 and 17), and the structural transition pressure (P c ) from 1 ⊃ O 2 -I to 1 ⊃ O 2 -II at each temperature was plotted in a T-P O2 phase diagram together with T N , where the T N line separates the magnetic phases between the paramagnetic/ferrimagnetic phase and the antiferromagnetic phase, and the P c line distinguishes between the 1 ⊃ O 2 -I and 1 ⊃ O 2 -II phases (Fig. 5). Importantly, the T N line is independent of the P c line, and antiferromagnetism in the 1 ⊃ O 2 -I phase is present (the pale blue area in Fig. 5). Since the 1 ⊃ O 2 -I and 1 ⊃ N 2 structures are identical with l 2 > 10.3 Å expected as a regime for inter-layer ferromagnetic interactions 39,40 , and indeed, 1 ⊃ N 2 is ferrimagnetic, the antiferromagnetism in 1 ⊃ O 2 -I results from the magnetic contribution of the adsorbed O 2 molecules, which is caused by long-range antiferromagnetic correlations via intercalated O 2 spins; the most likely packing mode associated with the O 2 -mediated magnetic pathway was shown in Fig. 2d. Further, the continuous shift in T N is likely dependent on the number of O 2 spins between layers, which act as magnetic mediators couple layer's ordered spins together c Field-dependence of the magnetization at 1.8 K for 1 measured at several O 2 pressures, where the inset represents the differential plots on the basis of the M−H curve for 1 (Fig. 4b). Thus, the present porous layered magnet 1 magnetically discriminates O 2 from N 2 and CO 2 , at least at P O2 ≥ 1 kPa.
The magnetic switching between the ferrimagnetic phase under vacuum with the 1 ⊃ O 2 -I structure and the antiferromagnetic phase of 1 ⊃ O 2 is quite fast and reversible (Fig. 6); the change from the ferrimagnetic phase to the antiferromagnetic phase is completed in <1 min at 85 K.
Generally, the solid states of bulk O 2 exist in the α-dimer form with a spin singlet at T < 24 K 30,46 . Compound 1 ⊃ O 2 -II eventually has~9 O 2 molecules per D 2 A layer unit, like a buried oxygen layer between ferrimagnetic D 2 A layers; at least, some of them certainly act as a paramagnetic mediator in the pores. Interestingly, the antiferromagnetic phase of 1 ⊃ O 2 -II transforms to a ferrimagnetic phase in the presence of an applied magnetic field ( Supplementary Fig. 18), giving the much higher saturated magnetization (M s ) value of 9.29 Nμ B compared to 2.22 Nμ B for 1 at 7 T (1.8 K), including a fully opened hysteresis curve (H c = 0.70 T) (Fig. 4c). On the basis of the M-H curve for 1, the differential plots clarify the contribution of the O 2 spins in the bulk magnetism of 1 ⊃ O 2 -II (Fig. 4d), giving rise to a new magnetic field-induced ferrimagnet. These magnetic alternations by gases are completely reversible upon adsorption/desorption under vacuum with heating ( Supplementary Fig. 19).

Discussion
The magnetic change caused by the introduction of guest gas molecules into a porous magnet can be attributed to three triggers: (i) an electronic trigger that causes spin emergence in the frameworks as a result of host-guest electron transfers (i.e., formation of new magnetic pathways in the framework); (ii) a structural trigger resulting from magnetostructural modifications associated with gate-opening/-closing transitions induced by gas adsorption/desorption, respectively (i.e., modification of the magnetic pathways); and (iii) a paramagnetic guest trigger resulting from the formation of new magnetic pathways or dipole-dipole interactions where paramagnetic gas molecules themselves magnetically mediate the transition to another magnetic ground state. The present gas-responsive porous magnet results from triggers (ii) and (iii); in particular, the insertion of free oxygen molecules achieves a magnetic phase change from a ferrimagnet to an antiferromagnet based on trigger (iii). The fact of magnetic ordering via paramagnetic O 2 molecules gives an opportunity to investigate the intrinsic nature of oxygen molecules in closed nano-sized porous spheres and provides a new application methodology based on paramagnetic molecules as switchable magnetic mediators. As a rapidly emerging field, this class of gas-responsive porous magnets is the most important target in the development of functional molecular porous materials.

Methods
Physical measurements. IR spectra were measured with KBr pellets using a Jasco FT/IR-4200 spectrometer. Thermogravimetric analyses (TGA) were performed using a Shimadzu DTG-60H apparatus under a N 2 atmosphere in the temperature range from 298 K to 673 K at a heating rate of 5 K min -1 . Unless otherwise noted, PXRD were collected on a Rigaku Ultima IV diffractometer with Cu-Kα radiation (λ = 1.5418 Å) at room temperature for the sample sealed in a silica glass capillary with an inner diameter of 0.5 mm with θ scan. PXRD patterns for 1 ⊃ O 2 and 1⊃N 2 with the synchrotron radiation (λ = 0.799999(6) Å) were collected at SPring-8 (BL44B2) 47 . Magnetic susceptibility measurements were performed using a Quantum Design SQUID magnetometer MPMS-XL on a polycrystalline sample in the temperature range of 1.8-300 K at a dc field of 1 kOe. Diamagnetic contributions were collected for the sample holder, Nujol, and for the sample using Pascal's constants 48 . Fresh samples taken immediately from the stock liquids were used for the magnetic measurements of 1-solv, and the formula determined by single-crystal X-ray crystallography was used for data analyses. Details for in situ IR spectra and gas adsorption-magnetic measurements are described in Supplementary Methods. Red and blue closed-circles represent T C and T N for ferrimagnetic and antiferromagnetic orderings, respectively, which were determined from the M-T curves (Fig. 4a) measured under each O 2 pressure fixed at 100 K. Blue closed-triangles represent T N for antiferromagnetic ordering determined from the magnetization measurements by varying the O 2 pressure at each fixed temperature ( Supplementary Fig. 15). Green closed-circles represent the structural transition pressure (P c ) from 1⊃O 2 -I to 1⊃O 2 -II determined by PXRD measurements by varying the O 2 pressure at each fixed temperature ( Supplementary Fig. 16). Red dotted line separates magnetic phases between the paramagnetic (Para) phase and ferrimagnetic (F) phase. Blue dotted line (T N line) separates magnetic phases between the Para/F phase and the antiferromagnetic (AF) phase. The green dotted line (P c line) separates the 1⊃O 2 -I and 1⊃O 2 -II phases. Black dotted line represents the saturated vapor pressure curve, which distinguishes between the gas phase and non-gas phase for bulk O 2 X-Ray crystallographic analysis for 1-solv, 1, 1 ⊃ N 2 , 1 ⊃ O 2 -I, and 1 ⊃ CO 2 . Crystal data for 1-solv, 1, 1 ⊃ N 2 , 1 ⊃ O 2 -I, and 1 ⊃ CO 2 were collected at 134 K, 112 K, 130 K, 130 K, and 195 K, respectively, on a CCD diffractometer (Rigaku Saturn724) with multi-layer mirror monochromated Mo-Kα radiation (λ = 0.71075 Å). Details for the measurements and structural determination are described in Supplementary Methods. These data have been deposited as CIFs at the Cambridge Data Centre as supplementary publication nos. CCDC-1519242, 1519241, 1519243, 1519244, and 1519240 for 1-solv, 1, 1 ⊃ N 2 , 1 ⊃ O 2 -I, and 1 ⊃ CO 2 , respectively. Structural diagrams were prepared using VESTA software 49 . The void volumes in the crystal structures were estimated using PLATON 50 .
Gas adsorption measurements. The sorption isotherm measurements for N 2 (at 77 and 120 K), O 2 (at 90 and 120 K), and CO 2 (at 195 K) gas were performed using an automatic volumetric adsorption apparatus (BELSORP max; BEL Inc). A known weight (ca. 30 mg) of the dried sample was placed into the sample cell and then, prior to measurements, was evacuated using the degas function of the analyzer for 12 h at 353 K. The change in pressure was then monitored and the degree of adsorption was determined by the decrease in pressure at the equilibrium state.
Gas atmosphere PXRD measurements and Structural determination of 1 ⊃ O 2 -II. A ground sample of 1 was sealed in a silica glass capillary with an inner diameter of 0.5 mm. The PXRD pattern was obtained with a 0.02°step using an Ultima IV diffractometer with Cu-Κα radiation (λ = 1.5418 Å) with θ scan. To obtain the PXRD patterns under the gas-adsorbed conditions, the glass capillary was connected to stainless-steel (SUS) lines with valves to dose and remove the gas, which were connected to a gas-handling system (BELSORP max; BEL inc). The temperature was controlled by a N 2 gas stream. Structures are determined using DIFFRACplus TOPAS ® v4.2 software, FOX software 51 , and RIETAN-FP software 52 . Details for structural determination are described in Supplementary Methods. These data have been deposited as CIFs at the Cambridge Data Centre as supplementary publication nos. CCDC-1519245.

Data availability
The data sets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request. The X-ray crystallographic coordinates for structures reported in this study have been deposited at the Cambridge Crystallographic Data Centre (CCDC), under deposition numbers 1519240-1519245. These data can be obtained free of charge from The Cambridge Crystallographic Data Centre via www.ccdc.cam.ac.uk/ data_request/cif.