Introduction

Spin crossover (SCO) phenomena has received great attention in recent decades [1,2,3]. This phenomenon is potentially useful due to the measurable changes caused by the spin transition in some macroscopic properties [1,2,3]. It can be observed in the cyanide-bridged Hofmann-type coordination polymers derived from the reversible change in the Fe2+ spin states between the \({}_{{}}^{1} A_{1} \left( {t_{{2{\text{g}}}}^{6} } \right)\) and \({}_{{}}^{5} T_{2} \left( {t_{{2{\text{g}}}}^{4} e_{{\text{g}}}^{2} } \right)\) configurations [4,5,6,7,8,9]. Recently, a reversible thermally induced SCO was reported for 2D ferrous nitroprussides stabilized via pyridine with formula Fe(Pyridine)2[Fe(CN)5NO] (FePyNP from now on) [10] and for the Hofmann-type Fe(Pyridine)2[Ni(CN)4] (FePyTCN from now on) [11]. Raman spectroscopy, Mössbauer spectroscopy and SQUID Magnetometry, among others, were used to understand the spin crossover phenomenon in both compounds. Thermal analysis was also used to verify the existence of the organic ligand bound to the iron atom and to identify the temperatures at which layer decomposition events occur [10, 12].

The SCO in both FePyNP and FePyTCN can be used to design switches and sensor of temperature, pressure or even molecules, if their access to the interlaminar region is achieved [10,11,12]. Guest-induced gate-opening effect has been observed in the FePyTCN isostructural platinum compound, Fe(Pyridine)2[Pt(CN)4] [6]. The gate-opening phase transition allows the diffusion of molecules into the interlaminar region. However, this phase transition was observed in very thin films of the compound. The particle size at which sensitive responses of the material to external stimuli are observed could be tuned by modifying the composition of the interlayer space. In this sense, the controlled thermal evolution of pyridine molecules would be a useful mechanism. The combination of SCO and guest-induced gate-opening effect with the possibility of tuning these properties by controlled modification of the interlayer composition offers FePyNP and FePyTCN compounds great potential as sensors and switches for molecules in fluid media.

Partial removal of pyridines molecules from the interlaminar region of FePyNP and FePyTCN compounds should convert both into molecular sieves. Host molecules could then diffuse to open metal sites in the interlaminar region and affect the conditions at which spin transitions occur, which would allow detection. However, to control the thermal evolution of pyridine pillars in the interlaminar region is a great challenge due to the complexity of the thermodynamic and kinetic processes occurring in this region. To achieve this, is mandatory a detailed and quantitative description of these processes.

In summary, the challenges in the post-synthesis modification of FePyNP and FePyTCN involve a quantitative description of both thermally stimulated events: the partial removal of pyridine molecules and the SCO. Furthermore, it would be desirable to use the same methodology in both cases. Isoconversional methods are a very useful tool in the description of the kinetics of thermally stimulated processes [13]. However, isoconversional methods have been rarely used in the description of the SCO [14]. The isoconversional methods should allow the study of both thermal events in FePyNP and FePyTCN with the same approach.

The aim of this study is to parameterize both, the thermal evolution of pyridine molecules and SCO, in FePyNP and FePyTCN, through their activation energy. This will allow us to evaluate the feasibility of pyridine partial post-synthesis removal and tunability of the SCO process in this type of materials. For the former purpose, a mathematical deconvolution analysis of derivative thermogravimetry curves obtained in open and hermetically sealed sample holders is performed to accurately identify the events associated with pyridine loss. For the latter purpose, calorimetric and magnetometric measurements are used to study the transition between HS and LS states.

Materials and methods

The FePyNP sample was obtained by sonication of an aqueous suspension of the 3D analog, Fe[Fe(CN)5NO]·H2O, in the presence of pyridine in the suspension. To obtain the 3D ferrous nitroprusside samples, aqueous solutions (0.01 M) of Na2[Fe(CN)5NO]·2H2O and FeSO4 were mixed, while stirring. The formed precipitate was aged for at least three days within the mother liqueur and then separated and washed several times by centrifugation, until obtain a filtrate free of accompanying ions.

The FePyTCN sample was prepared by the precipitation method [11]. In 20 mL of deionized water dissolved 0.33 mmol of pyridine with 0.48 mmol of K2[Ni(CN)4]. Mohr salt, (NH4)2Fe(SO4)2·6H2O (0.78 mmol), was dissolved in 20 mL of deionized water as well. Then, both aqueous solutions were mixed under stirring at room temperature. A fine precipitate formed on aging is separated from the mother liqueur by centrifugation and washed several times with distilled water to remove the accompanied ions. The pasty solid is air-dried until constant mass.

Powder X-Ray diffraction (XRD) patterns were recorded at 300 K, in the Bragg–Brentano geometry with CuKα radiation in a D8-Advance diffractometer (from Bruker). The powder patterns were indexed with the DicVol algorithm [15]. Void volume was calculated with CALC VOID instruction of PLATON code [16], version 200322, using 1 Å probe. The method used to calculate the crystallite size is the Halder-Wagner, implemented in the PDXL2 program (Rigaku, Japan). IR spectra were run at 300 K using an ATR device coupled to a Spectrum One (from Perkin Elmer) spectrophotometer.

Both processes, SCO and thermal dissociation of pyridine ligands, were studied by the isoconversional advanced method of Vyazovkin [17] (See section S5 of Supporting Information) to estimate the activation energy of the processes, without proposing a specific mechanism function [18]. Isoconversional computations were made with python modules pICNIK [19] and pyDSC [20].

The conversion (equation (S1)) during thermal dissociation of pyridine ligands in both materials was based on mass loss, measured by thermogravimetry (TG). The thermogravimetric experiments were carried out at SDT Q600 V8.3 Build 101 thermogravimetric analyzer from TA Instruments. Heating rates of 5 K min−1, 7.5 K min−1, 10 K min−1 and 12 K min−1 were used under a nitrogen flux of 10 mL min−1 (Figures S5 and S6). The property used to follow the conversion through SCO was the heat flux, in the case of FePyTCN, measured with the differential scanning calorimetry in a DSC 821 (Mettler-Toledo). The calorimeter was operated under N2 flow (20 mL min−1) at heating rates of: 4 K min−1, 6 K min−1, 10 K min−1 and 14 K min−1, on cooling and heating, Figure S17. For the FePyNP SCO, zero field-cooling (ZFC) and field-cooling (FC) magnetic data were recorded with an MPMS-3 magnetometer (Quantum Design) from 90 to 300 K with an applied magnetic field of 100 Oe, at different cooling/warming rates, of 0.25 K min−1, 0.5 K min−1 and 2 K min−1, Figure S18. The effective magnetic moment was calculated according to \(\mu_{{{\text{eff}}}} = 2.828\sqrt {\chi T}\) [21]. The experimental magnetic susceptibility values were previously corrected for the diamagnetic contribution according to the reported Pascal constant for the involved elements [21].

The resolution of the overlapped rate peaks in the derivative thermogravimetric (DTG) curve was accomplished by mathematical deconvolution analysis (MDA) approach [27]. The DTG curves were fitted to a series of events corresponding to the molecular moieties leaving the matrix of the material as temperature increases (Figures S7S10). However, the cyanide dissociations were coupled and could not be resolved coherently for any heating rate. On the other hand, the pyridine dissociations were separable enough to make a comparative analysis between the samples (Figures S11S16).

As the data could not be directly treated with isoconversional methods from the individual deconvoluted curves due to incoherent displacement of the signals from different temperature ramps, the convolution of the curves assigned to the pyridine dissociations were used as input data for isoconversional computations. Table S2 reports the temperature range used in the isoconversional computations for FePyNP and FePyTCN.

Conversion of the SCO process measured by DSC for the FePyTCN was computed with python’s module pyDSC [20]. This module computes the baseline correction with an iterative self-consistent algorithm [22] based on the definition proposed by Van der Plaats [23]:

$$C_{{\text{p}}}^{{{\text{bl}}}} = \left( {1 - \alpha } \right)C_{{\text{p}}}^{{{\text{pre}}}} + \alpha C_{{\text{p}}}^{{{\text{post}}}}$$

where \(C_{{\text{p}}}^{{{\text{pre}}}} ,C_{{\text{p}}}^{{{\text{post}}}}\) and \(C_{{\text{p}}}^{{{\text{bl}}}}\) are the apparent heat capacities of the sample before, after and during the SCO event, respectively and α is the conversion of the process defined as:

$$\alpha \equiv \frac{{\mathop \smallint \nolimits_{{t_{{{\text{beg}}}} }}^{{\ t_{{\text{i}}} }} \left[ {\dot{Q} - g\left( {t_{{\text{i}}} } \right)} \right]{\text{d}}t}}{{\mathop \smallint \nolimits_{{t_{{{\text{beg}}}} }}^{{\ t_{{{\text{end}}}} }} \left[ {\dot{Q} - g\left( {t_{{\text{i}}} } \right)} \right]{\text{d}}t}}$$

where \(\dot{Q}\) is the heat flux measured at the ith time and g(ti) is the baseline function evaluated at the ith time. The conversion values obtained were used as input for pICNIK. The advanced method of Vyazovkin was used to study this system from 170 to 200 K for the cooling series and from 205 to 240 K for the heating series.

Conversion of the SCO process measured by MPMS-3 magnetometer (Quantum Design) for the FePyNP was computed as the high spin fraction conversion αHS with equation [24]:

$$\alpha_{{{\text{HS}}}} = \frac{{\mu_{{{\text{eff}}}} \left( T \right) - \mu_{{{\text{eff}}}}^{{{\text{LS}}}} }}{{\mu_{{{\text{eff}}}}^{{{\text{HS}}}} - \mu_{{{\text{eff}}}}^{{{\text{LS}}}} }}$$

The high spin fraction conversion quantifies the fraction of transition metal atoms in high spin configuration. This parameter deviates from a Boltzmann population law and can display two different behaviours: (i) either αHS increases continuously with increasing temperature and does not show a thermal hysteresis; (ii) or αHS shows a discontinuity with increasing temperature and a thermal hysteresis, which is characteristic of a first order phase transition (called spin transition).

The activation energy fitting errors are available in section S5 of supporting information. The same section includes graphs providing detailed information on the computations performed. In addition, the experimental conversion curves are compared with simulated ones, using the estimated kinetic parameters to validate the results obtained (section S6 of supporting information).

Results and discussion

Electronic and crystal structures of the FePyNP and FePyTCN

The electronic and crystal structures of the FePyNP and FePyTCN solids were reported previously [10, 11]. However, in this section we will discuss some aspects of both to support the discussion in the following sections. In addition, accessible volume and crystal morphology data will be reported. These data will be useful to understand some thermal processes.

The synthesis of both FePyNP and FePyTCN was confirmed by infrared spectroscopy (Figures S1 and S2) and powder X-ray diffraction (Figures S3 and S4). The powder diffraction pattern for FePyNP was properly indexed with an orthorhombic unit cell in the Ic2m space group, according to CCDC database deposition number 1943304 [10]. Similarly, the FePyTCN powder pattern was indexed with a monoclinic cell in the C2/m space group, according to the CCDC database deposition number 1543147 [11]. The crystallite size was estimated by the Halder-Wagner method [25]. The average crystallite size was 633(36) Å and 359(57) Å for FePyNP and FePyTCN, respectively. The stacking of the sheets in the crystal corresponds to the family of planes {200}. The crystallite size of FePyNP in direction perpendicular to {200} family of planes is 848(113) Å while for FePyTCN is 357(35) Å. The void volume of the unit cell for 1 Å probe was 15.4% for FePyNP and 11.9% for FePyTCN. For probes greater than or equal to 1.5 Å, no free volume was obtained.

The FePyNP polymer layers consist of two Fe(II) ions alternately linked by bridging cyano groups (Fig. 1a). One of the iron atoms has a pseudo-octahedral coordination with five carbon atoms and one nitrogen atom. Four of the carbon atoms occupy equatorial positions of the pseudo-octahedron and belong to cyano groups. The fifth carbon atom occupies one of the axial positions and belongs to a cyano group. The nitrogen atom occupies the remaining axial position and belongs to a nitrosyl group. This iron atom and the groups coordinated to it form the building block nitroprusside, [Fe(CN)5NO)]2−. The second iron atom coordinates with the nitrogen atoms of the equatorial cyano groups of the nitroprusside block, forming two-dimensional layers. Two pyridines molecules complete their coordination in an axial position to form: (Fe(Pyridine)2(NC)4)2+. The FePyNP framework has rippled sheets due to the existence of two configurations for the pyridine molecules in the interlayer region: a parallel face-to-face and parallel-displaced configurations. For the FePyNP framework, half of the pyridine rings are in face-to-face configuration with a distance between the centroids of 3.76 Å. The other half of the pyridine rings are in the displaced-parallel configuration with a distance between the centroids of the rings of 5.32 Å.

Fig. 1
figure 1

Atomic packing within the unit cell for: a FePyNP and b FePyTCN

FePyTCN polymer layers are formed by Fe(II) and Ni(II) ions alternately linked by cyano groups (Fig. 1b). The Ni atom is coordinated to four cyano groups carbons to form the tetracyanonickelate building block [Ni(CN)4]2−. The tetracyanonickelate block has a planar square geometry. On the other hand, the iron atom, which has an octahedral geometry, is coordinated to six nitrogens. Four of them occupy equatorial positions and belong to the cyano groups of the tetracyanonickelate block. In the axial positions, the two pyridine molecules are coordinated through their pyridinic nitrogens to complete the moiety [Fe(pyridine)2(NC)4]2+. The sheets in the FePyTCN network, are practically flat due to the absence of repulsive groups in the interlaminar region and to the planar square symmetry of the tetracyanonickelate block. For these reasons, all pyridines lie in a face-to-face configuration in the interlaminar region with a centroid–centroid distance of 3.73 Å.

The pyridine molecules in the FePyNP and FePyTCN crystals are close enough to interact by dispersive and electrostatic forces (Fig. 1). The strongest electrostatic interactions are due to their dipole and quadrupole moments.

In FePyNP framework the nitrosyl group governs the electronic properties, its physicochemical characteristics, and the final properties of the materials formed with the nitroprusside molecular block [26]. The nitrosyl group has low-energy antibonding π* orbitals on the nitrogen that can subtract electron density from the iron atom in the [Fe(CN)5NO]2− molecular block, which reduces its ability to donate charge density to the nitrogen atom of the cyano groups (Fig. 2). On the contrary, in the FePyTCN material, the charge accumulation on the nitrogen of the cyano group is greater than for the FePyNP. The evidence of the accumulated electron density on the nitrogen of the cyano ligands is found in infrared stretching frequencies of these groups for both materials. The cyano stretching frequencies [ν(CN)] are: 2182 cm−1 for FePyNP and 2158 cm−1 for FePyTCN. (Figures S1 and S2). The higher ν(CN) in FePyNP is attributed to the existence of less electron density on all the anti-bonding 5σ CN orbitals (Fig. 2). Similar evidence of the low charge density on the nitrogen of the cyano ligands in the nitroprusside ion is derived from the XPS spectra [27]. The N1S binding energy (BE) is significantly higher for nitroprussides than the corresponding value for tetracyanometallates [27, 28].

Fig. 2
figure 2

Charge density redistribution effects resulting from the complex ion and coordination polymer formation in a FePyNP and b FePyTCN materials

Thermal evolution of FePyNP and FePyTCN materials

The thermogravimetric and its first derivatives profiles of FePyNP and FePyTCN samples (Figs. 3, 4) show multi-step processes. Multi-step processes commonly manifest themselves in the form of overlapped rate peaks in DTG [29]. The overlapped rate peaks should be deconvoluted into individual rate peaks that can be expected to represent individual reaction steps. This can be accomplished by mathematical deconvolution analysis (MDA). In these sections, we perform MDA of the experimental data using Frazer-Suzuki functions and identify the individual reaction steps in order to support thermokinetics analyses carried out in the following sections. The TGA profiles for FePyNP and FePyTCN at heating rates of: 5 K min−1, 7.5 K min−1, 10 K min−1, and 12 K min−1 are shown in Figures S5 and S6. The deconvolution of DTG curves corresponding to pyridine losses in FePyNP and FePyTCN samples, using open pans, are shown in Figures from S7 to S14 of supporting information.

Fig. 3
figure 3

Thermogravimetric and DTG curves for the FePyNP solid: a with an open pan b with a pinhole hermetic DSC pan. The upper insets illustrate the rupture of the bonds between the iron coordinated to N end of CN group and pyridine. The lower inset illustrates the rupture of the bonds between the iron coordinated to C end of CN groups and NO and axial CN during the solid thermal decomposition

Fig. 4
figure 4

Thermogravimetric and DTG curves for FePyTCN: a with an open pan and b with a pinhole hermetic DSC pan. The insets illustrate the rupture of the bonds: Fe–pyridine and Ni–CN, during the solid thermal decomposition

The DTG curve of FePyNP, performed in an open pan, shows three thermal events (Fig. 3a). The first one, from room temperature to approximately 323 K, can be assigned to the loss of water adsorbed on the surface of the FePyNP crystallites. The second and third events occur at higher temperatures and overlap. To identify the overlapped thermal events, is useful to examine the curve run in a hermetically sealed pan with a pinhole in the lid (Fig. 3b). The use of hermetic pan with pinhole improves the resolution of the peaks in the DTG curve [30]. However, there are still overlaps between them in our experimental results (Figures S15). This suggests that some events occur simultaneously. The second (at 518 K) and third (at 602 K) events in DTG curve could be deconvoluted with five Fraser–Suzuki functions [31]. The sum of the areas of the functions with maxima at: 514 K, 518 K, 585 K, and 604 K; corresponds to the loss of two pyridine molecules (Table S1), while the function with maximum at 603 K has an area corresponding to the loss of one nitrosyl group per molecular formula (Figure S15). According to Ávila et al. the pyridine molecules occupy two non-equivalent sites in the crystal structure [10] (Fig. 1a), so, the observed additional heterogeneity may be caused by diffusive barriers arising from the reduction of the interlaminar space due to the loss of pillars and/or the changes caused in the layers by the same loss. All three events observed at temperatures above 723 K are related to the loss of the axial and equatorial cyano groups associated with the decomposition of the layers.

Turning now to the analysis of the curve of FePyNP in a sample holder with pinhole (Fig. 3b), we can state that the superposition of the peaks corresponding to the evolution of pyridine and nitrosyl groups cannot be resolved. Therefore, the thermal evolution of FePyNP must be treated as a multi-step process [29]. In the following sections, we will analyze the effect of the nitrosyl group on the bonds between pyridine molecules and the layers.

The derivative of the thermogravimetric curve, of FePyTCN, performed in an open pan, shows five thermal events (Fig. 4a). The first one, from room temperature to approximately 328 K, can be assigned to the loss of water adsorbed on the surface of the FePyTCN crystallites. This behavior is like that observed for FePyNP. These events suggest that the surface of the crystallites of both compounds (FePyNP and FePyTCN) contain hydrophilic groups that interact weakly with water molecules. The second (at 502 K) and third (at 533 K) events have overall mass loss corresponding to two pyridine molecules per formula unit. The remaining events begin after the evolution of the pyridine molecules above 600 K. They correspond to the loss of the cyano groups of the Ni(CN)4 molecular block that forms the layers.

The thermal evolution of FePyTCN observed in Fig. 4 and described in the previous paragraph does not correspond to the crystal structure reported for this compound [11]. In the crystal structure, both pyridines are equivalent and should evolve together with heating. The difference between the behavior expected from the crystal structure and the one observed experimentally could be driven by heating rates far away from quasi-static conditions or could be due to heterogeneities caused by defects. The thermogravimetry of the FePyTCN sample in a hermetic pan with pinhole was run to rule out the existence of heterogeneities caused by defects in the structure (Fig. 4b). An advantage of using the hermetic pan with pinhole was a better resolution of the peaks corresponding to pyridine losses and layer decomposition in the DTG curve (Figure S16). Moreover, under these conditions it could be observed that all pyridines evolve together at 611 K in agreement with the crystallographic data. Careful attention should be paid to the event at 737 K in Fig. 4b, which can only be explained by the fact that some pyridine molecules are trapped in the interlayer after it collapses due to lack of pillars. The sum of the areas under this event and under the peak assigned to the pyridine evolution, correspond to the mass loss of the two pyridines per molecular formula. The cyano groups also evolve together (Fig. 4b). This suggests that pyridine pillars can be removed without destroying the layers. This is a notorious difference with FePyNP, in which it is not possible to separate the evolution of pyridines and nitrosyl groups. The layers stability is useful if we want to replace the pillars with other molecules or increase the microporosity of the material.

Analysis of pyridine evolution by isoconversional methods

According to the void volume analysis, performed above, FePyNP and FePyTCN crystal structures are compact enough to limit the access of molecules to interlaminar region. This prevents the use of these compounds in switching or sensing devices. Besides, the pyridine molecules complete the coordination of the metallic atoms or nitrosyl groups. This limits the detection of molecules through changes in their electronic configuration. It is thus important to remove some pyridine molecules in a controlled way to provide access to the interlaminar region and metals. To achieve this, it is necessary to deepen the kinetic description of the thermal evolution of the pyridine molecules.

In the previous section, it was shown that the thermal evolution of pyridines in FePyNP and FePyTCN is a multi-step process. Moreover, in the case of FePyNP there is a strong overlap between the losses of pyridine molecules and nitrosyl groups. For both FePyNP and FePyTCN, it was convenient to use MDA to describe the thermal evolution of pyridines. The isoconversional methods can be used as a reasonable approximation to analyze multi-step reactions [29]. So, the convolution of Fraser–Suzuki functions assigned to pyridine in the MDA can be analyzed by isoconversional methods and thus approach a quantitative description of the kinetics of the pyridine molecules loss.

The activation energy of the events associated with the evolution of pyridine molecules in the FePyNP has, in general, a negative correlation with conversion (Fig. 5 and S19). The activation energy is about 110 kJ mol−1 at low conversions, while it decreases to about 80 kJ mol−1 at high conversions. The FePyTCN has a similar behavior (Fig. 5 and S19). In this case, the activation energy decreases from around 90 kJ mol−1 to around 70 kJ mol−1. The average activation energy for FePyNP is 94 kJ mol−1 while for FePyTCN it decreases to 84 kJ mol−1. Bond distances cannot explain the difference of 10 kJ mol−1 in the average activation energies. According to crystallographic data, the distance between the iron in the layer and the pyridine nitrogen atom in FePyNP is: 2.3358 Å, in parallel displaced configuration of pyridine and 2.3321 Å in face-to-face configuration [10]. For FePyTCN, the distance between iron and pyridine nitrogen is 2.2703 Å [11]. In the latter case, all pyridine molecules are in face-to-face configuration. According to the bond lengths, the activation energy of pyridine in FePyTCN should be higher. However, the calculated activation energies are higher for FePyNP, suggesting that there is another contribution. In this case, it is the diffusion activation energy. The void volume of FePyNP is bigger than void volume of FePyTCN. This suggests that the diffusive barrier should be higher for FePyTCN, which also fails to explain the experimental results shown in Fig. 5. A possible explanation for the higher activation energy of FePyNP can be found by considering the average crystallite sizes in the direction of sheet stacking and the structural transformation of the gate-opening type, induced by guest. Guest-induced gate-opening effect has been observed, by Sakaida et al. [6], in the FePyTCN isostructural platinum compound Fe(Pyridine)2[Pt(CN)4]. Here, the structural transformation of the gate-opening type could be induced by temperature and pressure generated during thermal loss of pyridines. Since the crystallite size is larger in the case of FePyNP, this compound will have a higher barrier to the transformation and thus to the diffusion of pyridine molecules out of the solid. Thus, pyridine molecules would have a higher diffusive barrier in FePyNP, which would explain a higher value of the activation energy throughout the conversion domain.

Fig. 5
figure 5

Activation energy plot for the convolution of Fraser–Suzuki functions assigned to pyridine in FePyNP and FePyTCN solids

Returning to the negative correlation of activation energy with conversion, let us first analyze the effect of changes in electronic configuration. There is a significant charge transfer from the pyridine ligands lone pairs to the iron cations. This charge transfer is largely responsible for the decrease in the effective positive charge iron cations coordinated to pyridine. The thermal evolution of pyridine molecules causes an increase in the effective charge of iron cation, which favors a greater charge donation towards it from equatorial cyano groups (Fig. 2). In general, this effect is propagated throughout the entire sheet, causing a charge transfer from the iron atoms that remain coordinated to pyridine molecules to those that are not. Such charge transfer causes a progressive strengthening of the iron-pyridine bonds with increasing conversion due to a decrease in the occupation of the anti-bonding eg orbitals of iron-pyridine bond. Consequently, the enthalpy to carry a mole of pyridines from the interlayer to the gas phase increase with conversion. This should be expressed as an increase in activation energy with conversion, contrary to the observed behavior. Therefore, changes in electronic configuration should not be the predominant factor in the dependence of activation energy on conversion. Apparently, the negative correlation of activation energy and conversion is also associated with the diffusive barriers and hence, the gate-opening transformation. The partial loss of pyridine molecules reduces the tortuosity of the paths during diffusion. In addition, the combination of the temperature increases and the partial loss of pyridines, reduces the intensity of the interaction between the layers. This decreases the chemical potential needed by the pyridine molecules to trigger the gate-opening transformation. The combination of the above effects would explain the experimentally observed decrease in activation energy with conversion.

So far, we have compared the evolution of pyridines with temperature in FePyNP and FePyTCN samples thanks to MDA. This allowed us to suggest the occurrence of a gate-opening structural transformation. The simulation of the convolutions of Frazer-Suzuki functions describing the loss of pyridines supported the reliability of the estimated effective activation energy (Figures S29 and S32). The next step would be to predict the kinetics to remove pyridines in a controlled manner, in order to design sensors and switches. However, the strong overlap of pyridine and nitrosyl group loss events in FePyNP sample, makes any attempt of controlled pyridine removal, a major challenge. That is why, we will focus our efforts on FePyTCN sample.

The FePyTCN have atomic packing that allow diffusion of pyridine molecules between the layers but prevent it in perpendicular direction (Fig. 1). Because of this, the integral form of 2-D diffusion model is the one that most closely matches the experimentally estimated model for pyridine evolution (Fig. 6). However, the agreement of the experimental data and the model is not sufficient to claim that the 2-D model describes the data. There are multiple factors that prevent this. One of them is that the experimental data do not correspond to single-step processes with constant activation energy. Other factors are associated with the assumptions of the two-dimensional diffusion model [32]. These include the constancy of the diffusion coefficient, which in this case should not be fulfilled due to the gate-opening transformation and the changes that occur in the interlaminar region due to the evolution of pyridines. The function g(α) in Fig. 6 was calculated using equation S6. This equation required the estimation of the pre-exponential parameter by the compensation method (Figure S20).

Fig. 6
figure 6

Numerical reconstruction of the FePyCN kinetic model (left) and kinetic prediction of the evolution of the same sample when heated from room temperature to 475 K at 15 K min.−1 and then kept isothermal for 40 min (right)

The simplest way to treat the FePyTCN polymer to partially remove pyridine molecules from the interlaminar region is to use a temperature program in which the sample is heated at a constant rate up to a certain temperature and then kept isothermal for a given time interval as shown in Fig. 6. The same figure compares the experimental data with the model-free predictions obtained using condition S12. Predictions are reasonably good up to conversions of 0.5. At higher conversions, the predictions diverge significantly from the experimental data. Two solid–solid phase transitions can occur at ∝  > 0.5: the collapse of the interlaminar region due to an insufficient number of pyridine pillars and pyridine-induced gate-opening. The kinetic parameters may change significantly due to solid–solid phase transitions [13]. The solid–solid phase transitions cause the kinetics of the thermal event to change as the temperature program changes, which would explain the divergence of the prediction from the experimental data for ∝  > 0.5.

Analysis of spin crossover by isoconversional methods

The temperature-induced spin transition occurs when the zero-point energy difference, between spin states, has the same order of magnitude as the thermal energy: \(\Delta E = \Delta E_{0}^{{{\text{HS}}}} - \Delta E_{0}^{{{\text{LS}}}} \approx k_{{\text{B}}} T\) [33]. Moreover, the temperature induced SCO in solid state is an entropy driven phenomenon in which, the coupling between electronic states and phonon system plays a fundamental role [34]. The entropy change during the spin transition depends on the electronic configuration of the metal where it takes place. Both FePyNP and FePyTCN are Fe(II) complexes. Experimentally determined values of the entropy change of previous studied Fe(II) complexes to the complete LS to HS transition per mole of iron atom, range from 35 J mol−1 K−1 to 80 J mol−1 K−1 [35,36,37].

Thermal SCO in FePyNP and FePyTCN was previously reported and qualitatively described [10, 11]. The LS to HS transitions were reported from 50 to 130 K for FePyNP [10] and from 180 to 240 K for FePyTCN [11]. The transition temperature difference between the compounds was explained by the electron density of the nitrogen atoms of the equatorial cyano ligands. The higher the electron density of the nitrogen atoms, the stronger the Fe—N bond and higher the temperature for the spin transition. As we discussed in previous sections, the electron density on the nitrogen atoms of the equatorial cyano groups of FePyTCN is higher than in FePyNP and thus, the transition temperature [38]. The transition temperature of FePyTCN allows the SCO to be studied using a conventional DSC instrument. However, the transition temperature of FePyNP is below the operating temperature of conventional calorimeter. In this case, it was necessary to use a SQUID magnetometer with helium refrigerator.

Tunning of transition temperatures and hysteresis loop shape, position and width is necessary for design of sensors and switches, based on the SCO phenomenon. Some control of the hysteresis loop can be achieved by parametrizing the experimentally measured process rate as a function of temperature and extent of conversion. In the following subsections we will take a step forward in the quantitative description of the SCO in FePyNP and FePyTCN. For this purpose, we will use model-free methods based on isoconversional principle to determine the behavior of the activation energies as a function of conversion and to simulate SCO temperature evolution.

Calorimetric experiment with FePyTCN

Thermal stimulated spin crossover includes magnetic switching, induced by a temperature change, coupled with a structural transformation [33]. This suggests that the spin crossover can be described as a solid–solid transition that occur by the nucleation mechanism. In addition, the existing isoconversional treatment for solid–solid transition [13] can be used for spin crossover. In solid–solid transition that occur by the nucleation mechanism, the transition on heating involves superheating and transition on cooling involves supercooling. As a result, there is a significant gap between the temperatures, at which the transition on heating and on cooling becomes detectable. Such behavior was observed in the DSC curves of FePyTCN (Figure S17). This reinforces the hypothesis that the spin transition can be treated as a solid–solid transition that occurs by the nucleation mechanism.

The effective activation energy of the LS to HS transition in the FePyTCN compound has a value of 89 kJ mol−1 for a conversion of 0.05 and decreases to 75 kJ mol−1 when the conversion increases to 0.3 (Fig. 7 and S21). For conversions from 0.3 to 0.76 the effective activation energy remains practically constant and then increases to 92 kJ mol−1 at 0.94 conversion. For the HS to LS transition, the effective activation energy reaches a value of − 100 kJ mol−1 at 0.05 conversion and begins to increase to approximately − 40 kJ mol−1 at 0.5 conversion. Above 0.5 conversion, the effective activation energy remains practically constant at − 40 kJ mol−1.

Fig. 7
figure 7

Activation energy as a function of the conversion for FePyTCN sample

To understand the behavior of the effective activation energy shown in Fig. 7, we must follow the reasoning used to explain phase transitions that proceed by nucleation. Around spin transition temperature, the rate of the transition is close to zero. Heating a solid above transition temperature, accelerates the transition from LS phase to HS phase. The temperature dependence of the rate is positive above transition temperature and if it is fitted to the Arrhenius equation, it would yield positive activation energy. Squares in Fig. 7 shows the positive values of the effective activation energies of LS to HS transition. When cooled below spin transition temperature, the HS phase transforms to LS phase. The rate of the transition increases with decreasing temperature. Below transition point, the temperature dependence of the rate is negative. Fitting it to the Arrhenius equation would result in negative activation energy, as shown in Fig. 7 (triangles) for the transition.

The effective activation energy of the HS to LS transition has the monotonically increasing dependence with conversion commonly observed in solid–solid transitions [13]. The effective activation energy of LS to HS transition should decrease monotonically with the conversion. However, this is only valid up to a conversion of 0.76 and then increases. The increase of the effective activation energy at high conversions was also observed in FePyNTP and will be explained in the next section.

The FePyTCN experimental calorimetric curve and model-free simulations, obtained using the (S12) condition and the calculated activation energies, show no significant differences (Figures S33 and S34). This suggests the possibility of tuning properties, from predictions under different conditions, by means of the described parameterization and the (S12) condition.

SQUID magnetometric experiments with FePyNP

Transition states in minimum energy paths for solid–solid phase transformations have zero stress and zero force on the nuclei [39]. The activation energy, i.e. the free energy difference between the transition and the initial states, have an enthalpic and an entropic contributions (\(E = \Delta H - T\Delta S\)). In thermoinduced SCO phenomena, the enthalpy has two contributions: the electronic (ΔHel) and the vibrational (ΔHvib). The former is due to the change in the electronic configuration because the spin transition, while the last one increase with decreasing bond lengths. Interactions between charged species in the interlayer region of FePyNP also contribute to the total enthalpy [40, 41]. Electrostatic interactions decrease with the expansion of the solid because the distance between the charged species increases. Therefore, electrostatic interactions and enthalpy have an inverse correlation. The entropy has the same contributions as enthalpy in solid state. Electronic contribution (ΔSel), favors the LS configuration when the temperature is below the transition temperature and HS configuration above it. The vibrational contribution (ΔSvib) is related to electron–phonon coupling and elastic properties of the crystal lattice.

The LS to HS transition in iron atom of (Fe(Pyridine)2(NC)4)2+ moiety produces stress in FePyNP unit cell. The stress arises due to the charge accumulation at the 5σ orbital of the nitrogen atom in the axial cyanide functional group and π* orbitals of the oxygen in the nitrosyl group. In addition, for short pilar molecules as pyridine, such electron density is responsible for the appearance of a repulsive force between adjacent layers [42]. The unit cells in the transition state have zero stress, as hypothesized in previous paragraph. The difference between the stressed and transition-state cell explains why the effective activation energy is initially about 600 kJ mol−1 at conversion values smaller than 0.42 (Fig. 8). As the conversion rises, the LS to HS transition is accompanied by entropic gain of \(\Delta S_{{{\text{el}}}} = R\log \left[ {\left( {2S + 1} \right)_{{{\text{HS}}}} /\left( {2S + 1} \right)_{{{\text{LS}}}} } \right] = 13.4\,{\text{J}}/\left( {{\text{mol}}\,{\text{K}}} \right)\), due to change in spin multiplicity at \(e_{{\text{g}}}^{2} t_{{2{\text{g}}}}^{4}\) electronic configuration of Fe(II). The activation of new vibrational modes all over the solid framework due to the volume change also increases entropy (ΔSvib). This strong entropic contribution causes a decrease in the effective activation energy, as observed from a conversion degree of 0.45 to 0.83 (Fig. 8). Up to a conversion of 0.83, entropic effects predominate over enthalpic ones. However, the LS to HS transition finds in the repulsive interaction between charge centers a driving force because it contributes to the separation of adjacent layers. The formation of the high-temperature structure increases the interatomic distance between de axial cyano and nitro groups from adjacent layers weakening the repulsive interaction. The expansion process of the unit cells favors the enthalpic contribution (ΔHvib) to the activation energy. The predominance of this contribution explains the increase in effective activation energy from a conversion of 0.83 and above.

Fig. 8
figure 8

Activation energy as a function of the conversion for FePyNP material

During the HS to LS transition while cooling the sample (Fig. 8), the opposite behavior is observed. Through the first half of the process, the effective activation energy is around 60 kJ mol−1 indicating that the system has less stress in the HS configuration. Around a conversion degree of 0.49, the effective activation energy begins to increase to a maximum value of 120 kJ mol−1 around a conversion of 0.59. In this range of conversions, the contraction of bond distances ensures that enthalpic contributions (\(\Delta H_{{{\text{el}}}} + \Delta H_{{{\text{vib}}}}\)) exceed entropic ones (− TΔS). At conversions higher than 0.59, the effective activation energy begins to decrease again due to the increase in the − TΔS component.

In the transition from HS to LS, the energy maximum is located at 116 K while in the transition from LS to HS the energy minimum is located around 130 K, showing a hysteresis of around 15 K. The existence of a hysteresis loop reveals that the observed spin transition is a cooperative process (Figure S18). Both, the HS to LS and LS to HS transitions, involve a solid-state nucleation process of the phase to be formed and the growth of these nuclei. These two concomitant events take a certain time in a dynamic process where the temperature changes continuously. This explains the nature of the observed hysteresis.

Model-free simulations from (S12) condition and the estimated activation energies, were effective in describing the FePyNP experimental magnetic curves when cooling and heating (Figures S30 and S31, respectively). Prediction of the magnetic curve on cooling (HS to LS) shows small deviations at conversions very close to zero and one (Figures S30). These degrees of conversion are not of practical interest since intermediate values of conversion degree are usually used in device design.

Conclusions

There is some overlap between the thermal events associated with the losses of pyridine molecules and nitrosyl groups of FePyNP that could not be resolved experimentally. Therefore, it is not possible to remove pyridine molecules in this compound without compromising the stability of the layers. Consequently, it is not recommended to remove pyridine molecules, by thermal treatments, to provide access to host molecules in the interlaminar region.

The thermal events of pyridine loss and layer decomposition are completely resolved in FePyTCN sample. Such behavior makes FePyTCN with partial pyridine losses a potentially useful material for molecular detection.

The analysis of the activation energy associated with the loss of pyridine molecules in FePyNP and FePyTCN suggests that the thermal evolution of these molecules is determined by the particle size due to the occurrence of a structural transformation of the gate-opening type.

Calorimetric and SQUID magnetometry experiments, combined with the isoconversional methods to analyze the thermograms, revealed details of the coupling of the spin transition with the phonon system. In particular, SQUID magnetometry made it possible to identify the conversion domains in which the spin transition predominated over phonon effects and vice versa.