Magnetic functionalities in MOFs: from the framework to the pore

In this review, we show the different approaches developed so far to prepare metal–organic frameworks (MOFs) presenting electronic functionalities, with particular attention to magnetic properties. We will cover the chemical design of frameworks necessary for the incorporation of different magnetic phenomena, as well as the encapsulation of functional species in their pores leading to hybrid multifunctional MOFs combining an extended lattice with a molecular lattice.


Introduction
Metal-organic frameworks (MOFs), also known as porous coordination polymers (PCPs), have emerged in the last 30 years as revolutionary materials with applications in societally and industrially relevant domains such as storage of fuels (hydrogen and methane), capture of gases (e.g. greenhouse gases), separation, drug delivery and catalysis, among others. 1 Recent advances in this area in the past decade have resulted in an explosive growth in their preparation, characterization, and study, with over 5000 publications on this topic in 2016 and more than 80 000 MOFs reported. 2 The common property of all these open crystalline frameworks, constructed from the assembly of inorganic sub-units (metal centres, clusters, chains. . .) and organic linkers (carboxylates, phosphonates, azolates, etc.), is their permanent porosity. In a similar way to zeolites, they present large cavities in their structures. However, unlike zeolites and mesoporous silica, the adaptable nature of the organic ligands and their variety of coordination modes, together with the geometry of the constitutive metal ions, provide an assortment of topologies and different architectures that can be accomplished by chemical design. In addition to this structural property, these crystalline solids may also exhibit other properties arising from the diverse manners in which different functionalities can be incorporated into these materials.
In particular, electronic properties, i.e. magnetic, electrical or optical properties, can also be introduced into MOFs by adequately choosing the functional nodes, the organic linkers and the way in which they are connected in the solid, or by including functional molecules in the pores. These possibilities, which largely span the applications of these materials, have started to be exploited only very recently. Thus, the introduction of electrical conductivity into a MOF remains an almost unexplored topic since for the most part these materials are insulators. 3 A recent review that covers this topic has recently been published. 4 As far as luminescent MOFs are concerned, this area has also been extensively reviewed recently for their use in chemical sensing and explosive detection, 5 light-harvesting sensitizers, 6 and light emitting applications. 7 In the present review, we will focus on the molecular design of magnetic MOFs. Among these materials, depending on the magnetic dimensionality within and between the two constituent sublattices (the extended framework and the molecular units), one can distinguish between MOFs exhibiting cooperative properties (e.g., magnetic ordering or cooperative spin crossover), and MOFs exhibiting molecular properties (e.g., single-molecule magnetism). We do not intend to provide a comprehensive collection of the literature, but intend to illustrate with selected examples the current state-of-the-art of the different approaches that have been employed to incorporate this functionality into MOFs.
In the field of molecular magnetism, coordination polymers have been extensively used to generate magnetic materials exhibiting cooperative properties. In this area, a major focus of interest over the last 30 years has been to design high-T c magnets, i.e., molecule-based magnetic materials exhibiting spontaneous magnetization above room temperature, or at least above liquid nitrogen. 8 These materials are highly desirable in magnetism since they can compete with the traditional inorganic magnets, showing at the same time superior properties from the point of view of their chemical versatility (they are prepared using coordination chemistry at low temperatures) and their structural and electronic versatilities (they are transparent and can often incorporate more functional properties). Taking advantage of the latter feature, a current challenge in this field is the incorporation of two or more properties into the same material, i.e. the preparation of a multifunctional magnetic material in which magnetism is co-existing and/or coupled with a second property of interest, like conductivity, superconductivity, luminescence, bistability, porosity, etc. 9 Thus, playing with a molecular approach, it has been possible to incorporate into the same material two properties that are difficult, or even impossible, to achieve in a conventional solid-state material. Depending on the way in which the two components are integrated into the coordination material, one can differentiate between ''two-network materials'', composed of two independent networks each of them providing a physical property, and ''one-network material'', in which the two properties are strongly coupled thus often leading to stimuli-responsive materials. Examples of the first approach have given rise to the combination of magnetism and conductivity, or even superconductivity, in the same crystal, 10,11 whereas examples of the second approach can be found in the so-called spin-crossover complexes with a LIESST effect, 12 or in Prussian Blue Analogues (PBAs) with photomagnetism (LIESST effect), 13 or piezomagnetism. 14 In this case, the magnetism is coupled with light or pressure in such a way that by applying the corresponding external stimulus (light irradiation or pressure) the spin state can be tuned.
There are several reasons that justify the extension of this approach to the field of MOFs. On the one hand, the possibility of adding porosity to these magnetic coordination polymers offers an attractive way to generate multifunctional materials in which the magnetism can be tuned by the presence of molecules in the pores. Thus, these systems provide an ideal scenario to unravel the role played by the guest-framework intermolecular interactions, the chemical pressure generated by the guest molecules, or the modifications of the electronic properties in the MOF (i.e. isostructural MOFs with different ligands) in the magnetic behaviour. These features may be of interest for sensing the molecular species trapped in the pores through their magnetic response. On the other hand, the presence of magnetic centres either in the nodes or in the pores of a crystalline MOF opens the possibility of creating organized nanostructures of these magnetic centres, while keeping them well separated in the space. Such a feature may be of potential interest in quantum technologies, as they require a controlled disposition of magnetic moieties in the space. All these possibilities will be illustrated in the present review, which is organized as follows.
The first part is dedicated to MOFs in which the coordination framework is magnetic (Fig. 1a). In these materials, a rational chemical design has been crucial for the appearance of new properties and for controlling the effects of different stimuli on the magnetic properties. This part covers both MOFs showing solid-state properties, such as long-range magnetic order (presenting magnetic cooperativity) or spin-crossover (presenting elastic cooperativity), and MOFs showing molecular properties as a result of the incorporation of functional molecules at the nodes of the framework. In the latter case, the functional molecules -single-molecule magnets, in particularare isolated by organic spacers (i.e., no cooperative properties are expected). Still, the crystallinity of these porous materials will give rise to long-range arrangements of these functional molecules, Fig. 1 Schematic representation of (a) a magnetic MOF with a nonfunctional guest, (b) a non-magnetic MOF with a functional guest, and (c) a magnetic-MOF with a functional guest. providing a useful way to obtain organized nanostructures of these magnetic molecules. The second part presents the inclusion of functional molecules (magnetic in particular) in the channels of the framework to give rise to hybrid functional MOFs combining an extended lattice with a molecular lattice. In this case, one can distinguish between the system formed by a non-magnetic MOF and a functional guest (Fig. 1b), or a magnetic MOF combined with a functional guest (Fig. 1c). In the latter, a judicious choice of the molecule is the key for the appearance of different functionalities. The examples presented here will show that these porous solids provide an ideal platform to create new multifunctional materials covering from the simple co-existence of different electronic properties, provided by the framework and the functional guest, to a synergy between these functionalities as a result of the coupling between the two components.

MOFs based on magnetic frameworks
The preparation of MOFs based on magnetic frameworks is an example of a one network multifunctional material where the magnetic property coexists with the presence of porosity. These porous materials offer the possibility of inserting additional molecules into the pores (either gas molecules or other guests), acting as external chemical stimuli that can serve to tune the magnetism of the framework. 15 Depending on the origin of the magnetic phenomena, four types of MOFs based on magnetic frameworks can be differentiated ( Fig. 2): (a) magnetic MOFs, where magnetic cooperativity results through magnetic exchange via the ligands; (b) spin-crossover MOFs, where the nodes have suitable coordination environments for this phenomenon to exist; (c) MOFs with magnetic relaxation, where the nodes are clusters possessing an anisotropic spin ground state; with singlemolecule magnet behaviour; (d) MOFs with a magnetocaloric effect, where the nodes are clusters possessing an isotropic spin ground state.

Magnetic MOFs
The coexistence of magnetism and porosity is a challenging aspect from the point of view of the chemical design, as these two properties are inimical to one another: whereas magnetic exchange interactions require short distances between the metal centres, which are most commonly the spin carriers, porosity is typically favoured with the use of long linkers, which are often too long for magnetic ordering to exist at temperatures much above absolute zero. However, different synthetic routes can be envisaged towards the formation of porous magnetic materials, which will be presented below (Fig. 3). First, the use of short linkers will be described in the preparation of magnetic MOFs (Fig. 3a), with selected examples using formates, cyanides, azolates, diazines, and lactates, and then moving to their combination with longer linkers that can provide large pore apertures. Secondly, a different synthetic route to achieve the preparation of magnetic MOFs will be explained, which consists in using preformed complexes, i.e. a metallo-ligand approach (Fig. 3b). Finally, we will finish this section by showing that exchange coupling and porosity can also be combined through the use of radical ligands (Fig. 3c), and different examples of the use of varied radicals will be described.
(a) Use of short linkers. MOF synthesis is dominated by the use of relatively long ligands that can provide open frameworks, but this approach typically prevents the existence of magnetic interaction between the metal centres. Among the denser structures with shorter linkers, long-range magnetic order can emerge, although sorption of gases in this situation is rather atypical. This problem has nevertheless been circumvented by our group in a dense Cu coordination polymer capable of incorporating gas molecules into the framework thus alleviating the necessity for pores in the structure for gas sorption to occur. 16 In this paper it was found that chemisorption of gaseous HCl molecules instigates drastic modifications in the magnetic properties of the material, which switch from strong antiferromagnetic exchange interactions between the Cu(II) ions to ferromagnetic ones upon gas sorption. These magnetic conversions result from profound structural changes, as the gas molecules are directly incorporated into the framework rather than located in pores, and despite involving cleavage and formation of covalent bonds there is no disruption of crystallinity, which provides direct structural evidence for the modification of the magnetic pathways. However, in the above example these exchange interactions were not sufficient to trigger the appearance of a long range magnetic order, at least at the temperatures at which the magnetic behaviour was studied (above 2 K).  The main reason for this result was the low magnetic dimensionality of these coordination compounds (formed by exchangecoupled dimers and chains).
Using this approach, more pronounced cooperative effects were observed in higher dimensional systems and, in particular, in 3D frameworks based on short organic linkers. An example of this kind is provided by ammonium metal formate frameworks. These compounds have shown the coexistence of magnetic and electric orderings in a family of multiferroic threedimensional frameworks of formula [(CH 3 ) 2 3 ] (M = Mn, Fe, Co, and Ni), as demonstrated by the groups of Cheetham 17 and Gao. 18 Specifically, these compounds display paraelectric to ferroelectric phase transitions between 160 and 254 K, which are combined with spin-canted antiferromagnetic ordering (in the range 8 to 36 K), as shown in Fig. 4. The origin of the ferroelectricity is the disorder-order transitions of the ammonium cations and their displacement within the channels of the framework, as demonstrated by single crystal diffraction, whereas the magnetic ordering is caused by the use of the short formate linkers. This type of solid has been extensively investigated in recent years, 19 but due to the presence of the cations in the pores no gas sorption has been observed.
An approach that has been developed to introduce porosity in the above family consists of using bulky amines instead of ammonium. This yields a related family of three-dimensional isostructural porous formates of formula M 3 (HCOO) 6 (M = Mn, Fe, Co, Ni), in which the bulky amine acts as a structure directing agent and is not incorporated into the solids. This family of porous magnets, discovered independently by three groups, consists of a diamond net combining octahedral and tetrahedral nodes with the pores occupied by a great variety of solvent molecules, which can be removed upon heating (Fig. 5). [20][21][22][23][24][25][26] The magnetic behaviour of these magnetic MOFs depends on the type of metal ion: the iron and manganese formates are ferromagnets, with critical temperatures T c of 16.1 and 8.0, whereas the cobalt compound is a spin-canted antiferromagnet below 1.8 K and the nickel derivative displays 3D  long-range ferromagnetic ordering at 2.7 K (see Fig. 5b). The permanent porosity of these MOFs has been proven by gas adsorption, revealing a BET surface area of 360 m 2 g À1 . Furthermore, the available space has been confirmed by successfully inserting over 40 different guests into the pores, which also modulate T c possibly due to subtle changes in the M-O-M angles and/or host-guest hydrogen-bond interactions.
The smallest bridging ligand that has been used to design magnetic coordination polymers is cyanide. An extensive family of three-dimensional (3D) bimetallic frameworks based on this linker, referred to as Prussian blue analogues, 27 has been reported. In these coordination polymers the small size of the cyanide, which provides suitable pathways for magnetic superexchange, together with the 3D character of the magnetic lattice, leads to magnetic ordering at relatively high temperatures. Many laboratories have been very active on this type of material since the pioneering works of Verdaguer and Hashimoto, including the groups of Ohkoshi, Sieklucka, Dunbar, Girolami, Sato, Oshio, Coronado, Clerac, Long, Mallah, Larionova and Miller. 28 One compound of this family, Co 3 [Co(CN) 5 ] 2 , was the first material in which long-range magnetic ordering and microporosity were rigorously demonstrated to coexist. 29 Thus, despite the use of such a short linker, Long and co-workers reported magnetic ordering at 38 K with a BET surface area of 480 m 2 g À1 , determined by N 2 adsorption. Some years later, it was demonstrated on two related compounds of formula CsNi[Cr(CN) 6 ] and Cr 3 [Cr(CN) 6 ] 2 Á6H 2 O (Fig. 6) that sorption of paramagnetic O 2 molecules causes an increase in the ordering temperature, explained by the authors as a result of ferromagnetic coupling between the gas and the [Cr(CN) 6 ] 3À units of the frameworks, as diamagnetic N 2 does not cause any shift that could originate from a structural transition. 30 More specifically, CsNi[Cr(CN) 6 ] is a ferromagnet with an ordering temperature of 75 K, and upon O 2 sorption the [Cr(CN) 6 ] 3À units couple ferromagnetically with the spin of the adsorbed O 2 molecules. Differently, Cr 3 [Cr(CN) 6 ] 2 Á6H 2 O orders at 219 K, and the sorption of O 2 molecules causes a decrease in the magnetic moment of the system, as well as a reduction in the coercivity from 110 to 10 Oe and the remanent magnetization from 1200 to 440 emu G mol À1 .
Another family of short organic ligands that have also been employed for the preparation of MOFs is that provided by azolates, which can form strong and directional coordination bonds serving as bridges between metal ions, 31,32 and therefore are appealing candidates for the preparation of magnetic MOFs. For example, zeolitic imidazolate frameworks (ZIFs) are a subfamily of MOFs consisting of tetrahedral metal centers (Zn II and Co II primarily) connected by bent imidazolate-derived organic ligands, with geometrical features analogous to those of zeolites. 33 Thus, despite the use of a short linker such as imidazolate, highly porous solids of different topologies can be obtained, akin to zeolites, which in the case of Co II are also magnetic. The term ZIF was coined in 2006, 34 but some years earlier Gao and You reported the structures and magnetic properties of seven polymorphs of Co(imidazolate) 2 , indicating structural features similar to that of silica, although no studies on gas sorption were performed at that moment (Fig. 7). [35][36][37] The robustness of the porous framework was nevertheless proven in one of these polymorphs by exchanging the included template with EtOH and removing it later by vacuum treatment. 35 Although imidazolates transmit the antiferromagnetic coupling between the Co II ions in these structures, the uncompensated antiferromagnetic couplings arising from the non-centrosymmetric structures have often led to the appearance of weak ferromagnets (also known as canted-antiferromagnets) as a consequence of spin-canting.
Functionalized imidazolates with additional coordination groups have also been used for the formation of magnetic MOFs. For example, Fig. 8 shows the crystal structure of a Co(II)imidazolate-4-amide-5-imidate based MOF, which possesses 1D hexagonal channels and a BET surface area of 649 m 2 g À1 . 38 The cobalt centres are penta-coordinated by the imidazolateamidate-imidate linkers to form a distorted trigonal-bipyramidal geometry, with antiferromagnetic coupling between the metal centres.
Another interesting example of the use of a functionalized azolate is provided by a magnetic MOF that undergoes multiple changes in magnetic properties upon desolvation/resolvation, as shown in Fig. 9. 39 The parent compound, [Cu(tzc)(dpp)]Á2H 2 O, can lose one equivalent of water to form the monohydrate phase, [Cu(tzc)(dpp)]ÁH 2 O, or can also transform into an anhydrous phase [Cu(tzc)(dpp)], which can exist in three different polymorphs. The dihydrate phase shows antiferromagnetic exchange interactions, whereas ferromagnetic properties are observed for the trimorphic anhydrate system.
A related family of heterocyclic ligands that can also promote magnetic exchange is provided by diazines, which have given rise to the first example of a gas-responsive magnetic material. The Cu-based MOF of formula [Cu(F-pymo) 2 (H 2 O) 1.25 ] n (F-pymo = 5-fluoropyrimidin-2-olate), shown in Fig. 10, has helical channels of ca. 2.9 Å diameter which are filled with water molecules that can be removed upon heating. 40 The assynthesized solid shows antiferromagnetic interactions, mediated by the pyrimidine ligands, and it orders as a canted antiferromagnet below T N = 24 K (22 K upon activation). Different gas molecules can be incorporated into the empty channels, like CO 2 , whose presence in the pores causes an increase in the Neel temperature from 22 to 29 K. The authors attribute this increase to a structural perturbation exerted by the CO 2 guests which affect the exchange interaction pathways through the ligands, albeit it cannot be confirmed due to lack of structural information after gas sorption.
An unusual ligand recently employed by Zeng and co-workers for the formation of a porous magnet is lactate. [Co II 3 (lac) 2 (pybz) 2 ]Á 3DMF is the magnetic analogue of the double-walled framework [Zn II 3 (lac) 2 (pybz) 2 ]Á3DMF. It is formed by a square rod of Co-lactate  and the double wall connection between them (Fig. 11). 41 The structure contains M-O-M connectivity within the wellseparated square chains, which provides a short pathway for magnetic exchange. Interestingly, the solvent molecules that fill the pores can be exchanged with several guests without affecting the integrity of the structure, including gases (N 2 , H 2 and CH 4 ) and volatile guests (methanol, ethanol, propanol, benzene). However, upon exposure to water molecules or iodine, a structural transformation takes place with the coordination of a water molecule or the oxidation of a Co II centre, yielding respectively a hydrated and a partially oxidized MOF. .5DMSO as J 0 4 0. All the above examples have been based on the use of short linkers to create a dense metallic packing, while keeping some porosity. A different approach to improve the porosity in these magnetic solids consists in the combination of a short ligand and a considerably longer one. In this case the short ligand may organize the metal centres in infinite chains (or layers), while the long organic links are orthogonal to those chains (or layers) providing large pore apertures. With this approach, a strong magnetic interaction between the metal centers can be envisaged, although with the limitation of occurring in one (or two) dimensions, which also limits the occurrence of magnetic ordering to low temperatures. A successful example of this methodology is illustrated by the group of MOFs known as MOF-74 or CPO-27, which display Brunauer-Emmett-Teller surface areas over 1000 m 2 g À1 and have been identified as among the most promising MOFs for CO 2 capture. These materials, of formula M 2 (dhtp)(H 2 O) 2 (dhtp = 2,5-dihydroxyterephthalate), have been prepared from several transition metals including Mg II , Zn II and the magnetic Mn II , Fe II , Co II , Ni II , Cu II . The crystal structure is formed by helical chains of cisedge connected metal oxygen octahedral which are each linked by the organic ligand with three adjacent chains, resulting in a honeycomb distribution of one-dimensional channels 11 Å wide (Fig. 12). The coordinated water molecule can be removed, leaving an open coordination site accessible to incoming adsorbate molecules. The first magnetic member of this family to be reported was the Co II derivative, 42 whose magnetic study revealed a metamagnetic-like behaviour, with antiferromagnetic ordering below 8 K and a field-induced transition to a ferromagnetic-like ordered state upon application of magnetic fields stronger than ca. 2 T. The superexchange pathway in the metal-oxygen chain suggests that the magnetic moments couple ferromagnetically in the chains, while the antiferromagnetic long-range order, observed at low magnetic fields, is a consequence of the antiparallel alignment of the spins of adjacent chains. The Fe II derivative Fe-MOF-74 (or CPO-27-Fe) was also reported. 43 This compound shows a change of the magnetic exchange along the chains upon exposure to 1 bar of different hydrocarbons, which can be related to the strength of the interaction with the framework (Fig. 12c). Thus, weakly interacting adsorbates (methane, ethane, and propane) slightly diminish the strength of the ferromagnetic exchange, whereas those that interact more strongly (propylene, ethylene, and acetylene) reverse the nature of the intrachain coupling from ferromagnetic to antiferromagnetic. Computational studies reveal that in this structure the Fe II centers are always in a high-spin state. [44][45][46][47] (b) Metallo-ligand approach. A different synthetic approach for the preparation of MOFs consists in the use of a ''complex-asligand'' strategy, where a preformed complex acts as a metalloligand. 48 In this approach, a metal complex with vacant additional coordination sites is first prepared and isolated, being used in a second step as a building block towards additional metal ions. By a suitable choice of the metallo-ligand, magnetic communication between the metal nodes can be achieved. This approach has been used extensively in the field of molecular magnetism for the preparation of Prussian blue analogues (via the metallo-ligand [M III (CN) 6 ] 3À ) and oxalate magnets (via the metallo-ligand [M III (OX) 3 ] 3À ), with pores that are filled with countercations.
A successful example of the metallo-ligand approach for the synthesis of magnetic MOFs is the use of oxamato-based oligonuclear complexes, as recently reviewed by Ferrando-Soria and Pardo. 49 For instance, oxamato-based dinuclear Cu II 2 metallacyclic complexes, with weak ferromagnetic coupling between the Cu II ions, can coordinate Mn II ions through the free carbonyloxygen atoms, yielding a 3D MOF of formula [Na( 50 The structure consists of an extended parallel array of anionic, oxamato-bridged Mn 4 Cu 6 layers that are further interconnected through two m-phenylene spacers among the Cu II ions (Fig. 13). 3D ferromagnetic ordering is observed, which results from the antiferromagnetic coupling between the high-spin Mn II (S = 5/2) and Cu II (S = 1/2) ions through the oxamato bridges (2D ferrimagnetic behaviour), and interlayer ferromagnetic interaction across the double 2,4,6-trimethylphenylenebis(amidate) bridges. The magnetic behaviour depends on the solvent molecules that fill the pores, although gas molecules (CO 2 or CH 4 ) do not interact with the magnetic framework, maybe due to the amorphization process caused upon activation.
(c) Radical-as-ligand approach. An alternative methodology for facilitating the exchange coupling between metal centres of MOFs consists in the incorporation of additional spin carriers into the organic linkers, i.e. the use of radical ligands. 51 This use of non-innocent ligands for the preparation of magnetic MOFs was first shown by Veciana and co-workers, who synthesised a MOF with magnetic sponge-like behaviour using a polychlorinated triphenylmethyl tricarboxylic acid radical (ptmtc). 52 In this work, the open-framework structure {[Cu 3 (ptmtc) 2 (py) 6 (EtOH) 2 (H 2 O)]}, known as MOROF-1 (MOROF = metal-organic radical openframework), is a 2D ferrimagnet (with T c o 2 K). The Cu II centres have a square pyramidal coordination geometry, each of them coordinated to two organic radicals, and each radical coordinated to three metal centres, thus yielding a two-dimensional structure with hexagonal nanopores of dimensions 2.8 Â 3.1 nm 2 , as shown in Fig. 14. Interestingly, this MOF undergoes a reversible and highly selective solvent-induced 'shrinkingbreathing' process involving large volume changes (25-35%) that strongly influences the magnetic properties of the material. Specifically, the desolvation process involving the loss of the coordinated and non-coordinated solvent molecules converts the crystalline ferrimagnet into an amorphous paramagnet. The same ligand has also been combined with lanthanoid centers, but in this case the lanthanoid-radical magnetic exchanges were weakly ferromagnetic. 53,54 A ubiquitous organic radical in the field of functional molecular materials is the radical anion tetracyanoquinodimethane (TCNQ À ), as well as the related tetracyanoethylene (TCNE À ). Through the use of TCNQ and TCNE as building units of MOFs, the functional properties of these non-innocent ligands can be exploited to develop charge transfer frameworks which may exhibit electrical conductivity as well as interesting magnetic properties, although the formation of non-porous coordination polymers is rather common.
, reported by Miyasaka and co-workers, consists of two-dimensional layers where Ru 2 paddlewheels are linked through the TCNQ ligands, yielding antiferromagnetic ordering at T N = 75 K (Fig. 15). Interstitial CH 2 Cl 2 molecules are located in the void spaces between the layers, which can be lost at room temperature to form a dried sample, which orders ferromagnetically at T c = 56 K. 55 This process is reversible upon exposure to CH 2 Cl 2 vapor for 72 h. The magnetic change occurs as a result of slight structural modifications caused by the ordering/disordering of ligand orientation upon the extrusion of the CH 2 Cl 2 molecules. The radical derived from chloranilic acid, 2,5-dichloro-3,6dihydroxy-1,4-benzoquinone (Cl 2 dhbq), has been combined with Fe III yielding a crystalline solid of formula (Me 2 NH 2 ) 2 -[Fe 2 (Cl 2 dhbq) 3 ]Á2H 2 OÁ6DMF, where the iron centres are bridged by the radical form of the chloranilic acid forming two-dimensional honeycomb-like anionic layers, with Me 2 NH 2 + serving as countercations (Fig. 16). 56 The one-dimensional hexagonal channels are filled with solvent molecules, but these can be removed upon activation with a slight structural distortion of the framework, yielding a microporous solid with a surface area of 885 m 2 g À1 . Magnetic susceptibility measurements indicate the presence of strong magnetic coupling at room temperature, with spontaneous magnetization occurring below T = 100 K, which is reduced to 30 K upon activation of the material. The ordering temperatures of both solvated and unsolvated MOFs have been accurately determined by AC susceptibility, revealing that T c = 80 K and T c = 26 K, respectively. To summarize this section, the different approaches investigated so far for the formation of porous magnets have both advantages and disadvantages. For example, the use of short linkers permits a large magnetic coupling between the metal centres, but limits the possibility of porosity, whereas the combination with other larger units that provide porosity reduces the dimensionality of the framework (from a magnetic point of view) thus resulting in low T c values. In a different approach, the use of radical ligands seems to be more attractive, as the coupling is favoured even with large distances between the metallic nodes, but the highest limitation resides in their stability. Finally, the use of metallo-ligands seems to be the most convenient approach for the preparation of magnetic MOFs with high T c , although there are a limited number of metallo-ligands capable of promoting magnetic exchange.

Spin-crossover MOFs
Spin-crossover (SCO) is a phenomenon in which electronic configurations of a transition metal ion can be switched between high-spin (HS) and low-spin (LS) states in response to external stimuli (temperature, pressure, light irradiation, magnetic field, electric field, guest sorption), producing changes in magnetism, colour and structure. 57,58 Therefore, due to its molecular origin, no exchange interactions between neighbouring magnetic centres are required, and it is only necessary to design a MOF with first row transition metals in a suitable coordination environment that provides an appropriate ligand field for the transition between the HS and LS states. Thus, there is no limitation on the length of the ligands, nor the connectivity between the metal centres, which in principle should facilitate the inclusion of this magnetic property in MOFs. However, cooperative effects are still necessary to make this phenomenon useful in order to have an abrupt crossover, and this arises from the elastic forces present in the solid. In these systems, such a cooperativity is favoured by the polymeric nature of the framework, which keeps the  Thanks to this cooperativity this type of MOF does show high sensitivity to the subtle structural changes occurring in metal coordination environments upon inclusion of guest species within the porous framework. Thus, from a multifunctional point of view, one can classify this material as a two-network material in which one network is composed of the framework itself, whereas the second network is provided by the guest molecules.
As a consequence, one would expect a weak influence of the molecular network (guests) on the framework. This effect can be strongly enhanced by diminishing the size of the pore, as will be discussed in this section, in which physisorption of gases can even affect the temperature of the spin transition. Moreover, we will focus on unusual MOFs in which the spin-crossover properties are tuned via post-synthetic modification of the framework. The effects of guests and small molecules in SCO-MOFs have been recently reviewed by Ohtani and Hayami, 59 and therefore will not be analysed here.
(a) Physisorption of gases. Although spin-crossover and gas sorption can co-exist in the same material, 60,61 adsorbed gas molecules do not appreciably interact with the magnetic   host network. Thus, in most cases they cause no effects on the spin transition temperature, which remains unaltered upon gas sorption. The first study on the use of gas sorption to modify the transition temperature of a spin-crossover coordination polymer was reported by our group through the use of discrete compartments that confine the gas molecules and therefore force an enhanced interaction with the framework. 62,63 Despite the lack of permanent channels, the non-porous coordination polymers [Fe(btzx) 3 ](ClO 4 ) 2 and [Fe(btzx) 3 ](BF 4 ) 2 (btzx = bistetrazole-p-xylene), denoted as CCP-1 and CCP-2 (CCP stands for compartmentalized coordination polymer), are able to allocate circa a single molecule of CO 2 , CH 4 , C 2 H 4 or C 2 H 2 in each void of the structures at 298 K and 1 bar, as unequivocally demonstrated by gas sorption isotherms and structural determination after gas loading (Fig. 17). These gases differently affect the spin transition depending on the strength of the interaction. Thus, whereas loading of CO 2 gas molecules onto CCP-1 and CCP-2 induces an increase of 5 K of the T 1/2 in both systems, sorption of ethylene causes the opposite response from the framework, i.e. a small reduction in the transition temperature, and sorption of methane, ethane and CO does not affect the transition temperature. This different behavior is related to the gas-framework interaction, which is stronger for CO 2 . Although the effect of gas sorption on T 1/2 in this system is rather limited compared to the inclusion of solvent molecules in other SCO MOFs (5 K vs. 50 K), it should be noted that the interaction of gas molecules with the framework is typically so weak that no effect on T 1/2 had been previously observed.
The increase in the size of the internal voids has also been examined by extending the length of the flexible organic ligand with the purpose of augmenting the gas sorption capacity (Fig. 18). 64 Through this ligand design, isostructural analogues of these compartmentalized coordination polymers have been prepared, with formula [Fe(btzbp) 3 ](ClO 4 ) 2 (CCP-3) and [Fe(btzbp) 3 ](BF 4 ) 2 (CCP-4) (btzbp = 4,4 0 -bis((1H-tetrazol-1-yl)methyl)-1,1 0 -biphenyl), which present discrete voids of 257 Å 3 . Gas sorption measurements show that two molecules of CO 2 can be loaded in each void at 1 bar and 298 K. Both compounds present spin transitions centred at 195 and 199 K respectively, similar to those observed in CCP-1 and CCP-2, although different magnetic behaviour has been observed for CCP-3 and CCP-4 depending on the number of CO 2 molecules that are physisorbed. Upon inclusion of one molecule of CO 2 in each internal void, a shift of T 1/2 from 199 K to 206 K has been observed (Fig. 19). Thus, physisorption of CO 2 stabilizes the LS state due to the interaction between CO 2 and the cationic framework. However, upon additional CO 2 loading (two molecules in each void), a reduction of T 1/2 occurs, reaching 202 K. This behaviour could be caused by gas-gas interaction inside the void of the compartmentalized coordination polymer.
Another important family of SCO MOFs able to trap molecules is the so-called Hofmann clathrates. This family has been extensively studied for the co-existence of SCO phenomena and porosity along 1D channels where different guests can be incorporated affecting the transition temperature. 65 More recently, it has also been demonstrated that adsorption of SO 2 molecules can modify the SCO properties. 66 The adsorption isotherm at 293 K displays a type I behaviour featuring a sharp SO 2 uptake at low pressures (below 50 mbar) and practically reaches saturation at 0.20 bar, which corresponds to ca. 1.3 equivalents of SO 2 . However, this sorption is not completely reversible, and after vacuuming for 4 h at 258 K, ca. 0.5 equivalents of SO 2 remain trapped in the pores. The sorbed SO 2 molecules coordinate the Pt II centres through the sulfur atom (Fig. 20), stabilizing the low   Fig. 21. 67,68 This oxidative addition to the Pt centres modifies the s-donor capability of the nitrogen atom of the Pt-CN group, causing a decrease of T 1/2 that depends on the electronegativity of X.
A covalent post-synthetic modification of a SCO MOF has been reported by Kepert and co-workers in a Hofmann clathrate of formula [Fe(bipytz)(Au(CN) 2 ) 2 ] through the incorporation of an organic linker, 3,6-bis(4-pyridyl)-1,2,4,5-tetrazine (bipytz), that readily undergoes an inverse-electron-demand Diels-Alder reaction. 69 The octahedral Fe II centers are bridged equatorially by four linear [Au(CN) 2 ] À linkers forming a 2D layer which is further extended into 3D through bipytz units that serve as pillars (Fig. 22). Upon this modification, the SCO behaviour differs from the pristine material in three ways: it is less abrupt; occurs at lower temperature (T 1/2 = 178 K vs. T 1/2 = 275 K); and does not show a thermal hysteresis behaviour.

MOFs with single-molecule magnets at the inorganic nodes
Single-molecule magnets are magnetic molecules that exhibit slow relaxation of the magnetization at low temperatures. Usually, they are formed by polynuclear magnetic clusters with a large spin value and high magnetic anisotropy. Recently, a second generation of SMMs based on mononuclear metal complexes composed of highly anisotropic magnetic ions has been reported, which are simpler to design from a chemical point of view. This latter class  of SMM have additional interest in quantum technologies, as they can provide ideal examples of quantum bits (qubits), which are the basic units in quantum computing. Since the ground state of these molecules is a spin doublet, it can be seen as a spin qubit, as far as its quantum coherence is large enough to have time to perform a quantum operation. One important requirement for maximizing the quantum coherence is to minimize the magnetic dipolar interactions between qubits, which can be achieved by separating these magnetic units in space. In this sense, MOF can be ideal platforms to reach this goal since they provide spatial separation at will.
The linkage of single-molecule magnets based on polynuclear cluster-type metal complexes by bridging organic ligands has been exploited in the past for the isolation of crystalline coordination polymers. 70 This approach has been useful to investigate the interplay between the single-molecule magnetic behaviour and the new (cooperative) properties that may appear when these molecular nanomagnets are magnetically coupled. Still, this has most commonly resulted in the preparation of systems with lower dimensionality, chains being the most common. 71 The first 3D coordination network of SMMs was prepared by Clérac and co-workers using Mn 4 clusters as nodes. 72 In these networks, subtle modifications in the synthetic strategies influence enormously and unpredictably the dimensionality of the network, 73 and in some other cases the formation of the extended system causes quenching in the magnet-like properties of the metal clusters. 74 Although these solids typically lack permanent porosity, Kou and co-workers have recently reported the combination of porosity and SMM behaviour in a MOF based on Mn 6 clusters. 75 With the recent discovery of the second generation of singlemolecule magnets, i.e. the so-called single-ion magnets, or SIMs, new coordination polymers based on these mononuclear lanthanoid complexes have been isolated. These SIMs are easier to assemble than the cluster-type SMMs and therefore they can allow circumventing the problems observed for the preparation of SMM-MOFs. The first family of SIM-MOF has been recently reported. 76 It can be formulated as Ln(bipyNO) 4 (TfO) 3 (bipyNO = 4,4 0 -bypyridyl-N,N 0 -dioxide, TfO = triflate). Its structure consists of a 3D coordination network containing lanthanoid SIMs in the nodes of a porous cationic framework formed by the long bipyNO as the bridging ligand (Fig. 23). The pores of this framework are filled by triflate anions. Interestingly, this family shows the capability of exchanging the anions placed in its pores, while maintaining the magnetic behaviour. This feature has been exploited to incorporate into the pores bulky anions such as polyoxometalates (POMs) and other smaller anions such as [AuCl 4 ] À by post-synthetic modification of the magnetic MOF (Fig. 24). In these cases, the anion exchange process has occurred in a single-crystal-to-single-crystal manner thus providing structural evidence for the location of the encapsulated species. 77 The interest in these SIM-MOFs is twofold. On one hand, the controlled organization of the SIMs is an important issue for their possible application in quantum computing since each SIM can behave as a quantum bit. Indeed, the ability to tune the spatial arrangement of more than one non-identical SIM qubit (in the present example three structurally distinguishable SIMs are present) is precisely what is currently needed to advance in the global control paradigm of quantum computing. 78 On the other hand, the incorporation of functional molecular species into the pores can provide a convenient way for introducing a second property into these hybrid materials. After this first report on the preparation of a SIM-MOF, many other examples have been reported based either on lanthanoids, [79][80][81] or on transition metals. 82 A very remarkable result in this context has been recently reported by Freedman and co-workers 83

MOFs for magnetic refrigeration
A different magnetic phenomenon that is of high interest for cooling applications is that of magnetic refrigeration (Fig. 25), which is based on the magnetocaloric effect (MCE). This effect is the consequence of a change in the magnetic entropy (DS m ) and related adiabatic temperature (DT ad ) in response to a change in the applied magnetic field (DB). Although the MCE is intrinsic to any magnetic material, only in a few cases are the changes sufficiently large to make them suitable for applications. In order to maximize the change in the magnetic entropy, the magnetic material should have a large spin ground state S (the maximum magnetic entropy amounts to R ln(2S + 1)), high spin degeneracy or low lying spin ground state, negligible magnetic anisotropy, and a high magnetic density. In this sense, gadolinium and manganese based molecular compounds have been largely studied because of their large spin-only magnetic moment (S Gd = 7/2, S Mn = 5/2) and quasi-isotropic character, showing great promise as low temperature magnetic refrigerants based on molecular clusters that can rival traditional materials such as lanthanide alloys and magnetic nanoparticles.
The use of magnetic MOFs is restricted to ultra-low temperature applications, whereas magnetic refrigerators near room temperature are dominated by lanthanoid-based alloys. In this context, the use of magnetic MOFs for magnetic refrigerators is very appealing  View Article Online since they can be designed to consist of isolated paramagnetic centers (i.e. with weak superexchange interactions) that favors a large MCE, combined with higher thermal and solvent stabilities than their discrete molecular cluster analogues. However, there are two important obstacles that should be taken into account: MOFs are typically poor thermal conductors (which is important to dissipate the heat), although their facile deposition on metallic surfaces can overcome this problem; and the density of magnetic centres is very low, which is a consequence of the presence of porosity.
There have been numerous examples in the literature of the use of magnetic coordination polymers for MCE since the initial reports on Prussian blue analogues, [85][86][87][88] which are mainly based on Gd or Mn centres for similar reasons to their interest in molecular clusters mentioned above. Most of these coordination polymers are dense materials, such as [Gd(HCOO)(bdc)] (H 2 bdc = terephthalic acid), 89 which present a higher density of magnetic centres. For example, this compound presents values of ÀDS m = 47.0 J kg À1 K À1 for DB = 9 T. In other cases, the materials present channels or voids which are filled with solvent molecules, as in Gd 2 (fum) 3  units, forming a three-dimensional structure with triangular channels with a diameter of ca. 5.2 Å along the c direction (Fig. 27). The argon isotherm of the dehydrated Gd derivative shows an uptake of 38.79 cm 3 g À1 at approximately 1 bar and 87 K, thus showing the presence of porosity. The MCE presents maximum values of ÀDS m of 30.7 J kg À1 K À1 and 10.8 J kg À1 K À1 for the Gd (at 3 K) and the Dy (at 4 K) derivatives, respectively (for DB = 7 T), thus showing the successful combination of porosity with the MCE effect. Fig. 25 The magnetocaloric cooling cycle consists of four steps: (1) first, the magnetic material (part ''a'' of the figure) is exposed to a magnetic field, B (represented by a red arrow), resulting in heating of the material (part ''b'' of the figure) as a consequence of the reduction in magnetic entropy; (2) the heat excess caused by the alignment of all the spins is expelled to the surroundings, thus yielding the magnetic material at the same temperature as in the beginning, but with the spins aligned (part ''c'' of the figure); (3) the removal of the magnetic field causes cooling of the refrigerant due to the increase of magnetic entropy caused by the spin relaxation (part ''d'' of the figure); (4) heat can be absorbed from the cooling compartment. The orange colour represents an increase in temperature of the magnetic material, and the dark blue colour represents a decrease in temperature of the magnetic material. The grey arrows represent the large spin of the magnetic material, whose orientation can be modified upon application of a magnetic field (represented by red arrows). To sum up, although some MOFs presenting MCE have been reported, the values are still far from those of other current state-ofthe-art molecule-based materials. For example, the dense layered material Gd 2 (OH) 5 Cl 1.5 H 2 O has ÀDS m of 51.9 J kg À1 K À1 for DB = 7 T. 93 The low values found in MOFs is a consequence of the intrinsic characteristics of these materials, in particular their low magnetic density. Thus, despite their high chemical stability, which is the major advantage of using MOFs for magnetic refrigeration, their real use is not very promising.

Hybrid MOFs incorporating functional molecules in the channels
The presence of a periodic array of empty channels in MOFs can structurally control the positioning of multiple functional guests. In this sense, porous materials capable of absorbing and orienting guest molecules through the use of networked cages have been recently developed as a new strategy for the structural determination of exotic molecules otherwise unachievable. 94 Furthermore, MOFs have also been exploited for the encapsulation of active species, 95 which can be as varied as chromophores, 96-98 drugs, 99 CO releasing molecules, 100 catalysts, 101-105 or nanoparticles. [106][107][108] Using this hybrid approach two-network solids can be prepared through the self-assembly of different molecular fragments (organic, inorganic, or organometallic) used as starting building blocks, or using a post-synthetic method in which a molecular guest is inserted into a pre-formed extended network acting as the host lattice (Fig. 28). As pointed out in the introduction, when the MOF is also functional this hybrid approach can afford the isolation of multifunctional materials (Fig. 1c). In this section, we will focus on these multifunctional hybrids, in which each network furnishes a solid with distinct properties. As guest molecules we will show the insertion of magnetic molecules (spin-crossover complexes and single-molecule magnets) and electro-active molecules (electron donors and acceptors).

SCO@MOFs
Oxalate-based bimetallic coordination polymers of general formula [M II M III (ox) 3 ] À are archetypical examples of 2D and 3D magnetic networks, which can host a wide variety of functional  cations to give rise to hybrid materials exhibiting multifunctional properties. Our group has extensively exploited this feature to combine cooperative magnetism with other properties such as electrical conductivity, paramagnetism, single-molecule magnetism and spin crossover. 109 The synthetic approach to obtain these hybrid materials involves a self-assembly method that consists in growing the extended network from its molecular precursors, [M III (ox) 3 ] 3À and M 2+ (aq), in the presence of the functional cations, which act as templates to stabilize the dimensionality of the network (2D or 3D). Using this method many examples of hybrid materials with coexistence of magnetic ordering and spin-crossover have been successfully prepared, 110 as well as using diamagnetic frameworks. 111 The most interesting properties have been observed in the 2D compounds [Fe III (sal 2 -trien)][Mn II Cr III (ox) 3 ]ÁX (X = CHBr 3 , CHCl 3 , CH 2 Br 2 and CH 2 Cl 2 ) which, apart from ferromagnetism and spincrossover, also exhibit a photo-induced spin transition (i.e., a light-induced excited spin trapping (LIEEST) effect). 112,113 Another approach that has also been successfully used to incorporate spin-crossover complexes within a magnetic MOF involves the so-called post-synthetic method (already pointed out in Section 2.3). The first example was obtained through a solid-state incorporation of the [Fe III (sal 2 -trien)] + complex into the large pores (ca. 2.2 nm) of a Mn II Cu II 3D MOF of formula Na 4 {Mn 4 [Cu 2 (Me 3 pba) 2 ] 3 }Á60H 2 O (Fig. 29). 114 Interestingly, the magnetic properties of the Mn II Cu II MOF change upon insertion of the spin-crossover complex (the critical temperature increases from 14 to 19 K) as a consequence of the strengthening of the antiferromagnetic coupling Mn II Cu II , which is likely associated with the changes induced in the crystal lattice by the exchange of Na + cations with the [Fe III (sal 2 -trien)] + complex.

SMM@MOFs
Similar to spin-crossover complexes, metal complexes exhibiting SMM behaviour have been inserted into magnetic coordination polymers. Magnetic bimetallic oxalates have also been used to reach this goal. An appealing example of this kind is provided by the hybrid compound [ 115 Notice that in the twonetwork compounds containing a magnetic oxalate network the electronic coupling between the two sublattices is usually very small and therefore a lack of interplay between the two properties has always been observed. Interestingly, this compound is an exception to this rule. Thus, the magnetic coupling between the two spin sublattices leads to an antiparallel arrangement between the magnetization of the oxalate lattice and that of the inserted SMM. This coupling affects the magnetic relaxation of the SMM, but more interestingly it also affects the magnetic behavior of the ferromagnetic lattice. In fact, in contrast to the rest of the hybrid materials containing the MnCr oxalate lattice, which behave as soft magnets, the coupling of this soft magnetic lattice with the highly anisotropic SMM leads to a drastic enhancement of the coercive field of the hybrid (from 10 to ca. 800 G), which behaves as a permanent magnet below 5 K (Fig. 30). Although limited to low temperatures, this situation resembles that found in alloys of 3d metals and lanthanide ions, like NdFe 14 B, that are among the best permanent magnets known to date, but has the advantage of using SMMs based on d-transition metal complexes instead of lanthanide ions as a source of magnetic anisotropy. The above example uses a self-assembly method to form the hybrid material. As pointed out above, the porosity and stability of some MOFs can be useful for loading molecules into their pores using post-synthetic procedures. These methods have also been used to incorporate SMMs within both magnetic and non-magnetic MOFs. In the former case, the presence of a Mn III porphyrin, which is a magnetic molecule behaving as a SIM, in a Mn II Cu II 3D magnetic MOF leads to an interplay of the magnetic properties. 116 Thus, the internal magnetic field created by the long-range magnetic ordering of the MOF seems to have an influence on the slow magnetic relaxation of the SIM leading to an attenuation of the quantum tunneling of the magnetization in the mononuclear complex. Non-magnetic MOFs have also been used to accommodate the magnetic molecules with  118 In the diamagnetic matrix the SMM behavior is retained because the magnetic anisotropy of the POMs is not altered by their interaction with the host. Differently, in the antiferromagnetic matrix the SMM character is clearly reduced because the magnetic interactions lead to faster relaxation of the magnetization.
To conclude this part we can say that magnetic molecules exhibiting a SMM behavior can be incorporated into the pores of a MOF using both self-assembly and post-synthetic methods. By using a diamagnetic MOF this approach has allowed keeping the SMMs isolated, leading to controlled nanostructures that retain the SMM behavior of the pure compound. In contrast, when the MOF matrix is magnetic, some changes in the SMM behavior are observed due to the weak interactions established between the two networks. However, with one exception, these interactions are too weak to affect the properties of the magnetic MOF.

Electroactive molecules@MOFs
Polyoxometalates (POMs) form a class of molecular anions that have been incorporated into MOFs. These metal-oxide clusters are robust species with unique electronic properties owing to their ability to act as electron reservoirs or to accommodate magnetic centers. In previous sections we have already shown some examples that illustrate these possibilities. 67,68,97 In view of the ability of POMs to act as heterogeneous catalysts, their insertion and dispersion into the pores of a MOF can be beneficial in order to increase the active surface area of the POM and consequently its catalytic properties, while enhancing also the stability of the resulting POM-MOF material thanks to the host-guest interactions established between the two sublattices. In this context MOFs have shown to be more suitable to disperse POMs than other host matrices such as silica, activated carbon, ion-exchange resins and mesoporous molecular sieves, which often lead to low POM loading, POM leaching, agglomeration of POM particles and ill-defined solids. Some examples that illustrate this concept are the following: (i) the immobilization of the protonated Keggin POMs [H n XM 12 123 These examples illustrate the use of electronically innocent MOFs for dispersing electroactive molecules in their pores (Fig. 1b). In this case, the MOFs exclusively play a structural role.
Another electroactive molecule that has been incorporated into the MOFs is the TCNQ, which is a well-known organic acceptor able to form low dimensional chain structures showing conductive properties. This molecule has been incorporated into the channels of the HKUST-1 MOF to give rise to a hybrid material showing an enhanced electrical conductivity from 10 À6 S m À1 for the as-synthesised material to 7 S m À1 for the TCNQ loaded MOF. 124

Concluding remarks
In this review we have discussed the new opportunities that can appear in the crossroad between molecular magnetism and MOFs. Thus, the different types of multifunctional materials that can be encountered when combining magnetism with porosity have been discussed. In the first part, we have shown with three different classes of magnetic MOFs that the incorporation of magnetic centers into the coordination framework can result in the appearance of new properties in the crystalline MOF. In particular, this concept has provided a new generation of stimuli-responsive materials in which the magnetism can be tuned by the presence of molecular species in the pores (see the first and second class of MOFs, vide infra), or the possibility of keeping the magnetic centers well insulated in a crystalline framework (see the third class of MOFs, vide infra).
The first class of magnetic MOFs shows cooperative magnetic properties below a given critical temperature, T c . The challenge with these materials is to shift T c to temperatures as high as possible, a goal which is difficult to achieve since porosity and cooperative magnetism are two inimical properties that require opposite structural features (large porosity requires the use of long linkers between the metal centres, while strong exchange interactions require the use of short ones). In fact, this ''magnetic exchange'' approach is seriously hindered by the relatively low temperatures at which the cooperative magnetism appears (typically much below 100 K).
To overcome this limitation, a second class of magnetic MOFs based on ''spin-crossover complexes'' has been proposed as the spin transition typically occurs near room temperature. In that case, cooperativity is controlled by elastic forces in the lattice, which can be maintained at long metal-metal distances thanks to the polymeric nature of the MOF lattice. In fact, it has been shown that the structural changes occurring upon uptake/ release of a guest molecule can be detected in these spincrossover MOFs, while the cooperativity of this phenomenon is maintained for small pore sizes (typically in the nanometer range). Notice that this molecular confinement has been shown to be beneficial to enhance the interaction between adsorbed gas molecules and the framework. This feature has resulted in a shift in the spin transition temperature upon gas sorption, which, in some cases, can be accompanied by selectivity in gas sorption.
A third class of magnetic MOFs that has been reported contains magnetic centres at the nodes of the framework. In that case, the interest is to generate magnetic nanostructures which are well organized and well insulated in space thanks to the structural features of the MOF. Since these magnetic centres may behave as single-molecule magnets, their controlled organization in space could find an application in quantum computing since each magnetic centre may be used as a quantum bit. In addition, the good magnetic insulation provided by the MOF has shown to be useful in obtaining isotropic paramagnetic materials which can be of interest as magnetic coolers.
All the examples reported in this part have exploited the possibility of incorporating the magnetism at the nodes of the framework. Still, the porosity offered by these coordination polymers can also allow us to fill the pores with functional molecules. This possibility is discussed in the second part of the review where hybrid functional MOFs combining an extended lattice with a molecular lattice are presented. These hybrids have been used as an ideal platform to create new multifunctional materials covering from the simple co-existence of different properties, provided by the framework and the functional guest, to a synergy between these functionalities as a result of the coupling between the two components. Thus, in that part different types of functional molecules have been introduced into the channels, including magnetic molecules (spin-crossover and single-molecule magnets) as well as electro-active molecules (electron donors and acceptors, for example). The result of such a combination has given rise in some cases to an improvement in the properties of the hybrid MOFs, making them of interest in magnetism (lanthanide-free hard magnets), heterogeneous catalysis (catalysts with enhanced surface areas) or electronics (MOFs with semiconducting properties).

Perspectives
To finish we should mention some of the current challenges and perspectives in the field of magnetic MOFs. The incorporation of magnetic functionality into a MOF is quite recent, so that at this stage most of the studies in this area are focused on the synthesis of materials in bulk, with an analysis of the crystal structures and properties. The field has to move on to the processing of these materials towards applications, including, among others, their use as sensors, in electronic applications, in magnetic refrigeration, or in quantum computing. For example, the study of the quantum coherence in SMM-MOFs is at a very early stage, and the integration of these qubits into superconducting circuits would be the next stage in order to manipulate the spin state. For some of these applications it is crucial to process the materials, and to not only use single crystals, or polycrystalline materials, which are currently the goal of chemists in order to get unequivocal information regarding the structural aspects of the new materials. Thus, magnetic MOFs should be processed as films, nanoparticles, or nanostructures, while retaining the properties.
The initial studies on this matter have already been done in films of coordination polymers based on spin-crossover, where thick films have been prepared. 125,126 Despite their roughness, these films can be used as sensors, but their application is unfeasible in nano-and micro-electronics (including spintronics) as these applications require films of higher quality. In this context, a current trend in this area is that of integrating these MOFs as ultrathin films onto solid surfaces (SURMOFs). The first generation of SURMOFs has given rise to the emergence of new MOF-based devices of interest as separation membranes, catalytic coatings, or sensors that exploit their porosity as an active function. 127 In the context of MOFs with electronic functionalities, an appealing issue is that of exploiting not only their porosity but also these electronic functionalities in order to use these films as active interfaces in electronic molecular-based devices. Most properties of these devices are crucially determined by these interfaces so that an active manipulation of these interfaces is the key to improve the device performance. This second generation of SURMOFs is chemically much more demanding than the first one because it requires the organization of continuous, high-quality and oriented ultrathin films (below 10-20 nm) of these materials on surfaces. Furthermore, it is also very demanding from the electronic point of view since it requires tailoring the degree of interaction between the SURMOF and the inorganic surface as that generally impacts the electronic properties of the hybrid interface and the functioning of the entire device. Still, the accomplishment of these challenging goals can open new perspectives in the use of MOFs in molecular electronics and spintronics. Here, the transport of charge carriers as well as the spin injection across the MOF interface could be manipulated by loading of molecular guests in the porous scaffold. In addition, the open structures of these crystalline materials display higher surface areas for direct contact with the molecules than those offered by a normal 2D surface, thus improving the interactions between these molecules and the inorganic surface. These complex hybrid interfaces, integrated by an open framework and molecular guests, are linked to a new idea of assembled 3D interfaces with addressable functionality, which may generate conceptually new hybrid devices. Along this line, the possibility of incorporating molecules with different functionalities (magnetism, bistability, luminescence, etc.) inside the MOF, or increasing the intrinsic conductivity of the framework could enlarge the versatility of these complex interfaces.
A recent result that exemplifies the fabrication of these electronically active MOF interfaces has been recently reported. 128 The approach involves a sequential layer-by-layer transfer of 2D preassembled MOF nanosheets, organized by using the Langmuir-Blodgett method, to SAM-functionalized substrates. As a model system, a layered MOF built from the sequential stacking of 2D networks of Co(II) tetracarboxylate porphyrin units interconnected by Cu(II) ions (NAFS-1) has been used (Fig. 31). In contrast to previous methodologies, SAM-assisted transfer enables the fabrication of homogeneous, highly oriented, ultrathin films across millimeter-scale areas, regardless of the substrate. This approach has allowed transfer of NAFS-1 onto a nonconventional, ferromagnetic substrate such as permalloy.
Owing to the high quality and low-thickness (o10 nm) of these SURMOFs, it has been possible to investigate their electrical properties and evaluate the effect of the thickness of the MOF on the conductance using Hg drop micrometric electrode junctions. This result illustrates that this liquid-phase layer-by-layer method can be a useful approach to fabricate electronic interfaces based on magnetic SURMOFs. This kind of approach has also shown to be useful in preparing thin films of good optical quality based on Hofmann clathrates exhibiting spin crossover. 124,125,129 A different approach that can be foreseen to improve the quality of these ultrathin films is based on the deposition of two-dimensional (2D) crystals on electronic/magnetic surfaces which can provide very clean interfaces of direct application in electronics/spintronics, as has already been shown with graphene and graphene-like 2D materials. 130 This goal can be achieved either by using chemical vapour deposition (CVD) methods, or by direct micromechanical exfoliation of the bulk materials and subsequent transfer of the 2D layer onto the substrate. The first approach (CVD method), although very promising, has been exploited only very recently in MOF chemistry for the preparation of ZIF-8. 131 This archetypical MOF has served to demonstrate the feasibility of CVD but its electronic properties are rather limited. The second approach (micromechanical exfoliation method) has not yet been reported in MOF chemistry. The only examples are limited to the use of liquid exfoliation methods, 132,133 which lack the high quality requirements for electronic applications.

Conflicts of interest
There are no conflicts to declare.