Enhancement of gas storage and separation properties of microporous polymers by simple chemical modifications

Owing to their large surface area and good solvent processability, polymers of intrinsic microporosity (PIMs) have been widely investigated for gas storage and separation processes. In this article, we show how chemically modifying the polymers can fine-tune their properties for specific, targeted applications. We find that converting the archetypal microporous polymer PIM-1 into a polycarboxylate salt enhances its separation capabilities for H2/CO2 mixtures (relevant to hydrogen production), whereas appending multiple amine groups significantly improves gas separation properties for N2/CO2 mixtures (relevant to flue gas treatment). Adsorption-based separation processes have received less attention than size-sieving processes in porous polymeric materials, however they could provide a suitable alternative technology to energy-intensive separation processes such as cryogenic distillation. We also report the hydrogen storage properties of the modified polymers, which we find to depend on the chemical modification carried out. By coupling the simplicity of the proposed chemical modifications with the scalability and porous properties of PIMs, we provide a blueprint to create new multifunctional materials with adapted properties for targeted applications.


Introduction
Porous materials promise vast technological progress in numerous areas as diverse as gas storage or separation [1,2], filtration processes [3][4][5][6], catalysis [7] and drug delivery [8]. The useful properties of such materials largely stem from a large accessible surface area, and from the chemical properties and composition of that surface. Polymers of intrinsic microporosity (PIMs) stand apart among other microporous materials (defined as materials of pore size below 2 nm) thanks to their combination of high surface area and solvent processability [9,10]. The first comes from a rigid, kinked backbone unable to pack efficiently in the solid state, whereas the latter enables applications where the material is cast as a membrane, thin film or three-dimensional monolith. Owing to these properties, numerous PIMs and PIM-based composites incorporating other porous materials such as metal-organic frameworks (MOFs) [11][12][13], covalent-organic frameworks (COFs) [14], porous carbons and porous aromatic frameworks (PAFs) [15,16] have been reported for hydrogen storage [13,15], or for important separation processes such as CO 2 from N 2 (e.g. in flue gas) [11,14], CO 2 from CH 4 [11,14], O 2 from N 2 [12], or H 2 from N 2 [16].

Experimental section 2.1. General
Raw materials were sourced from commercial suppliers and used without additional purification unless indicated. Schlenk techniques and oven-or flame-dried glassware was used to handle air-or moisture-sensitive chemicals and reactions, which were maintained in an atmosphere of dry dinitrogen. Attenuated total reflectance infrared spectra were collected on a Perkin-Elmer Frontier FTIR instrument. Nuclear magnetic resonance (NMR) spectra were acquired at room temperature with an Agilent ProPulse 500 MHz spectrometer, and residual non-deuterated solvent peaks were used as internal references. Gel permeation chromatography (GPC) was performed with an Agilent Technologies 1260 Infinity instrument. Samples were prepared in tetrahydrofuran (THF) at a dilution of 1 mg ml −1 , and were run at 1 ml min −1 and 35 • C. The instrument was calibrated against polystyrene standards and equipped with three detectors (refractive index, light scattering, and viscosity). The triple-detection mode of the Agilent GPC/SEC software (version A.02.01) was used to determine molar masses and polydispersities. Thermogravimetric analyses (TGAs) were carried out with a Setaram Setsys Evolution 16 TGA instrument with air as carrier gas and a temperature ramping rate of 10 K min −1 . Blank traces acquired under the same conditions were used to correct the results for buoyancy effects. Inductively coupled plasma mass spectrometry (ICP-MS) analyses were carried out by Mr Simon Waller at the University of Cardiff (School of Chemistry) on an Agilent ICPMS 7900. The samples were acid-digested before analysis (concentrated HNO 3 , 100 • C) and measured against a series of standards (made from 1000 mg L −1 Li + in 2% nitric acid, Sigma-Aldrich); elemental analyses were performed at London Metropolitan University by Mr Stephen Boyer on a ThermoFlash 2000 analyser from Thermo Scientific using helium as carrier gas; the elemental analysis of PIM-1-COOLi was performed under contract by Elemental Microanalysis Ltd (Okehampton, UK) using Dumas combustion method. Nitrogen adsorption isotherms at 77 K were recorded using a 3Flex instrument from Micromeritics and a liquid nitrogen bath to maintain sample temperatures at 77 K. Nitrogen sorption isotherms measured at 77 K were used to determine BET surface areas using pressure ranges determined based on the consistency criteria recommended by Rouquerol et al [33]. CO 2 and N 2 adsorption experiments were performed on an Intelligent Gravimetric Analyser (IGA-2) from Hiden Analytical at pressures up to 2 MPa, using an ice water bath or a circulating water system to maintain the temperature at 273 K or 298 K, respectively. Pore size distributions (PDSs) were determined from the CO 2 isotherms measured at 273 K, using the non-local density functional theory (NLDFT) routine provided with the MicroActive data analysis software of Micromeritics (slit pore model for CO 2 at 273 K). Hydrogen uptake experiments (up to 11 MPa) were performed with a Sieverts-type volumetric gas dosing analyser (HTP-1) from Hiden Isochema. High-purity, 99.99996% hydrogen was used (Air Products). The temperature was controlled by a cryostat using liquid nitrogen as coolant, and each change in hydrogen pressure was followed by an equilibration time of at least 20 min. Water adsorption experiments were performed on an Autosorb iQ instrument from Quantachrome in vapour sorption mode. Each sample subjected to adsorption experiments was first degassed for a minimum of 10 h at 80 • C. Fitting procedures for all isotherms, calculations of isosteric enthalpies of adsorption and of gas separation performance are described in the ESI.

PIM-1-COOH
A literature procedure [34] was adapted to convert PIM-1 into PIM-1-COOH: PIM-1 powder (2.50 g) was thoroughly ground in a pestle and mortar. The resulting fine powder was added to a solution of concentrated sulfuric acid (62.5 ml, puriss. grade, Merck), glacial acetic acid (18.75 ml puriss. grade, Merck) and water (37.5 ml). The resulting mixture was heated, with stirring, at 140 • C for 11 d under a nitrogen blanket. The reaction was then cooled to room temperature, and water (600 ml) was added. The green precipitate was collected by vacuum filtration, washed with several portions of water and methanol, and dried overnight in a vacuum oven at 80 • C (2.58 g, 95%). 1

PIM-1-NH 2
Following a published procedure [35], PIM-1 powder (1.00 g) was added to anhydrous THF (65 ml, extra pure, Fisher Chemical, dried with a solvent purification system from Innovative Technology) and stirred under an atmosphere of dry dinitrogen. After ca. 20 min, the polymer dissolved to form a yellow solution. The solution was cooled to 0 • C using an ice bath and 1.0 M borane-THF complex (12.25 ml, 12.25 mmol, Sigma-Aldrich) was added dropwise to the mixture. The reaction mixture was refluxed overnight (75 • C) with stirring, during which time an orange precipitate formed. The mixture was left to cool to room temperature, following which excess borane was quenched via slow addition of ethanol (40 ml, puriss. grade, Merck). The solid was collected using vacuum filtration and stirred overnight in a solution of HCl in methanol (60 ml, 1.0 M, Supelco), collected again via filtration and stirred for 3 h in a 5% solution of aqueous NaOH (⩾97%, Sigma-Aldrich). The solution was washed with several portions of water until neutral and dried overnight at 120 • C in a vacuum oven (0.815 g, 80%). Analytically calculated for (C 29

Results and discussion
PIM-1 was synthesised according to a previously published procedure [15], to afford a bright yellow solid of M n = 48.6 kDa and polydispersity index PDI = 1.66, which fall slightly below the range of typically reported values [9,15]. Simple post-synthetic modifications were performed with adapted published procedures to afford modified PIMs (scheme 1).
To convert the nitrile groups into carboxylic acids, PIM-1 was stirred in sulfuric acid/water/acetic acid (3:3:1 volumetric ratio) for 11 d at 140 • C. Although a prior report indicates a shorter reaction time of 48 h [34], we found by analysing the product of reactions carried out for 2 and 4 d that significant amounts of unreacted CN, and reaction intermediate CONH 2 groups were present. We used an extended reaction time to ensure a complete conversion of the CN groups into COOH, which was confirmed by FTIR (figure S1 (available online at stacks.iop.org/MFM/4/025002/mmedia)) and elemental analysis. In contrast to PIM-1 which is soluble in chloroform and in THF, PIM-1-COOH was found to be sparsely soluble only in DMSO and THF. This low solubility prevented a determination of the polymer molecular weight by GPC. However, Figure 1. Nitrogen adsorption-desorption isotherms of the four investigated PIMs at 77 K. Filled and empty symbols represent adsorption and desorption, respectively. Inset: Pore size distributions in the micropore region, calculated using NLDFT on CO2 isotherms measured at 273 K. the solubility of PIM-1-COOH is sufficient to allow the preparation of free-standing thin films, which are more brittle than those made of PIM-1, probably as a result of additional interchain interactions [34].
PIM-1-COOH was subsequently converted into a lithium salt by adding an aqueous solution of LiOH to a solution of PIM-1-COOH in THF (1.04 equivalent LiOH per COOH group). The obtained PIM-1-COOLi was found to be soluble in water, methanol, and ethanol. 1 H NMR showed that the polymeric structure was maintained (figure S2), and ICP-AES analysis confirmed the presence of 3.2 (±0.1) wt% Li in the material, which is slightly higher than the expected value of 2.7 wt% calculated for the idealised polymer structure.
The conversion of PIM-1 into PIM-1-NH 2 NH 2 was performed according to a published procedure [35] where PIM-1 was reacted with an excess of borane-THF. PIM-1-NH 2 was found to be completely insoluble and its characterisation relies on FTIR spectroscopy, which confirms the near complete conversion of the nitrile groups and the appearance of peaks that are attributed to N-H bonds (figure S1). Elemental analysis also supports the proposed conversion, although the results deviate from the numbers expected based on an idealised polymer structure. This discrepancy was also found by Mason et al [35] and it may be due to the hydrophilicity of the polymer and water uptake during sample preparation and transport.
Nitrogen adsorption measurements at 77 K were performed (figure 1) to compare the surface and pore structure of the polymers. All four investigated PIMs possess significant microporosity, as indicated by typical type-I isotherm profiles. PIM-1 and to some extent, PIM-1-NH 2 possess mesopores as reflected by the type-IV characteristics of their respective isotherms in the medium pressure range. The isotherms of PIM-1 and PIM-1-NH 2 also display significant hysteresis that are attributed to the complex interconnections between micro-and meso-pores. From these N 2 sorption isotherms, BET surface areas were calculated to be 751, 476, 435, and 547 m 2 g −1 for PIM-1, PIM-1-COOH, PIM-1-COOLi and PIM-1-NH 2 , respectively, and total pore volumes of 0.48, 0.25, 0.20, and 0.30 cm 3 g −1 were determined. These values are consistent with prior reports about PIM-1 [15] and PIM-1-COOH [34], whereas values for PIM-1-NH 2 [35] have not been reported before, and those of PIM-1-COOLi are close to those of PIM-1-COOH. As expected, based on prior literature reports, the surface area decreased upon polymer modification, especially once groups capable of forming hydrogen bonds are incorporated. Pore size distribution (PSD) calculations performed using CO 2 isotherms measured at 273 K (figure 1, inset) further confirmed the persistence of the microporosity of PIM-1 in its derivatives. All four polymers maintain porosity in the ultramicropore range with PSDs centred around 2 to 3 Å and 4-7 Å in all cases.
Water vapour adsorption experiments were performed to estimate the wettability of the porous surfaces ( figure S3). Very little water vapour is adsorbed by PIM-1 (1.4 wt% water at p/p 0 = 0.85), as expected based on its hydrophobicity. PIM-1-COOH and PIM-1-NH 2 were found to be able to adsorb up to 8.3 wt% water at p/p 0 = 0.90; whereas PIM-1-COOLi, as a result of its higher polarity, can adsorb 28 wt% water under the same conditions. As adsorption-based separation processes often take place with non-dry gases, the wettability of porous materials is an important parameter to take into account. Here, it is clear that PIM-1 adsorbs only very small amounts of humidity, whereas its three derivatives are much more prone to capture water vapour, especially the ionic PIM-1-COOLi. Depending on the targeted application, this can be an advantage or an inconvenience, as tuning hydrophilicity can enhance the adsorption or separation of gases (or vapours) based on their polarity.
The thermal stability of the polymers was analysed by thermogravimetric analysis, which revealed significant changes compared to the stability of PIM-1 ( figure S4). In air, the onset degradation of PIM-1 is 703 K, whereas those of PIM-1-COOH and PIM-1-NH 2 are 596 K and 620 K, respectively, whereas PIM-1-COOLi shows an earlier degradation onset at 481 K. Overall, the four polymers are stable well above potential operating temperatures of systems using sorption properties for gas storage or separation.
To evaluate the hydrogen storage properties of the four polymers, hydrogen adsorption experiments were performed at 77 K, in a pressure range reaching 11 MPa. Following the trend observed for the determined BET surface areas, the hydrogen storage capacity measured at 77 K of the four polymers decreased in order PIM-1 > PIM-1-NH 2 > PIM-1-COOH > PIM-1-COOLi. The same trend was observed for hydrogen adsorption experiments performed with incremental increases of the analysis temperature up to 298 K. Figure 2 shows the absolute hydrogen uptakes of the four polymers at 77 K, 90 K, 150 K and 298 K, which are calculated from the experimentally measured excess uptakes and best represent the amount of hydrogen present in the adsorbed layer at the surface of the materials (see ESI and figure S5 for details) [15,21,36]. As summarised in table 1, PIM-1 and PIM-1-NH 2 , which possess the highest surface areas, have similar absolute uptakes approaching 2 wt% at 77 K and 10 MPa, and decreasing uptakes as temperature increases. The only minor exception to PIM-1 having a superior absolute uptake was observed at 90 K, where PIM-1-NH 2 was found to have a slightly higher absolute uptake than PIM-1. While this difference could be attributed to experimental and fitting errors, it is noteworthy to observe that PIM-1-NH 2 has generally higher excess H 2 uptakes than PIM-1 (figure S5), which we attribute to slightly larger surface area in the microporous range (see figure 1, inset). The fitting procedure that accounts for hydrogen that is present at the centre of the pores then contributes to cancelling these differences, and the ultimate hydrogen uptakes for PIM-1 and PIM-1-NH 2 are calculated to be very close (2.4 ± 0.2 wt% and 2.8 ± 0.4 wt%, respectively). PIM-1-COOH and PIM-1-COOLi, which have lower but similar surface areas to each other, display lower H 2 uptakes. The total uptakes, also shown in table 1, which comprise adsorbed phase and gaseous hydrogen at the centre of the pores, reflect similar trends: PIM-1 and PIM-1-NH 2 have total uptakes (10 MPa) of 2.16 wt% and 2.12 wt%, respectively, whereas PIM-1-COOH and PIM-1-COOLi have lower uptakes of 1.58 wt % and 1.48 wt%.
In order to determine the effect of molecular-level changes on the hydrogen adsorption capabilities of the four polymers, we determined their isosteric enthalpies of adsorption, which reflect the strength of molecular adsorption and is an important parameter in the evaluation of the hydrogen storage capacity of porous materials [21], as well as their gas separation properties. In practice, isosteric enthalpies of adsorption are determined based on the adsorption isotherms measured at various temperatures (figure 2), from which isosteres can be modelled [15,25,36,37], leading to isosteric enthalpies of adsorption. To facilitate comparisons, adsorption values are generally plotted as a function of fractional pore filling, typically in the range 0.05-0.75 (∆H H2 av values in table 1) [21]. The enthalpies determined here fall between 2.7 and 8.3 kJ mol −1 , which is the typical range for physisorption, and their value decreases with increasing pore filling ( figure S6). This decrease results from the heterogeneity of the surfaces, where high-enthalpy adsorption sites are filled first followed by lower-enthalpy sites.
Among the four investigated materials, PIM-1-COOH shows the highest enthalpy of adsorption, starting at 8.3 kJ mol −1 (at 7.5% filling) and decreasing linearly to reach 3.4 kJ mol −1 at 75% filling. PIM-1 and PIM-1-NH 2 show very similar trends and parallel PIM-1-COOH, with adsorption enthalpies going from 7.0 to 7.5 kJ mol −1 , respectively, at low filling, to 3.4-4.1 kJ mol −1 at higher fillings. These linear trends in enthalpies as pore filling increases indicate that all adsorption sites in this range possess similar binding strengths. PIM-1-COOLi shows a different trend, as its adsorption enthalpy starts at a relatively high value (8.1 kJ mol −1 at 8% filling) and sharply decreases to reach 2.7 kJ mol −1 at 77% filling, with a marked step around 45% filling, which seems to indicate the saturation of higher-affinity binding sites at this point. On the same graph (figure S6) and in table 1, we also report characteristic adsorption energies ∆H H2 0 which provide estimates for adsorption enthalpies at zero coverage [37][38][39]. Their calculation differs from that of  enthalpies where coverage >0, and as such and ∆H H2 av values should not be compared directly. However, they follow similar trends, and it is interesting to observe PIM-1-COOLi has a largely superior ∆H H2 0 value (12.7 kJ mol −1 ) compared to the other polymers, which confirms the presence of a small number of high-affinity binding sites potentially due to the presence of lithium ions. PIM-1-COOH and PIM-1-NH 2 have similar ∆H H2 0 values (9.3 and 9.7 kJ mol −1 , respectively), slightly higher than that of PIM-1 (8.7 kJ mol −1 ). Overall, the three modified PIMs have slightly higher adsorption enthalpies than the original PIM-1, indicating more favourable interactions with H 2 molecules. The largest differences were observed at zero coverage, where PIM-1-COOLi was found to have a characteristic adsorption energy ∆H H2 0 is 46% higher than PIM-1, indicating the presence of additional beneficial binding sites for hydrogen. As coverage increases the differences between the polymers tend to decrease as the most active sites become saturated. Taking storage capacities into account, comparing PIM-1 with PIM-1-COOLi reveals that post-polymerisation modifications enhance the binding energy at the price of a decreased storage capacity.
To evaluate and compare the gas separation properties of the four polymers, adsorption/desorption isotherms of CO 2 and N 2 were recorded at 273 K and 298 K, in addition to the H 2 isotherms analysed earlier. As shown in figure 3 and table 2, N 2 uptakes appear to be dictated mainly by the relative surface areas of the materials. PIM-1, which possess the largest surface area, displays the highest N 2 uptake, followed by PIM-1-NH 2 , PIM-1-COOH and PIM-1-COOLi which have decreasing surface areas. The trend for CO 2 uptake is similar, however the uptakes of PIM-1 and PIM-1-NH 2 are very close. In this case, the lowest surface area of PIM-1-NH 2 appears to be compensated by the extra affinity for CO 2 provided by the amine groups [40] which enhance its CO 2 adsorption capacity. At 273 K and 1 bar, both PIM-1 and PIM-1-NH 2 adsorb significant amounts of CO 2 (2.61 and 2.99 mmol g −1 , respectively, corresponding to 115 and 132 mg g −1 ) and the uptake keeps increasing over the accessible pressure range ( figure 3). PIM-1-COOH and PIM-1-COOLi show lower CO 2 uptakes under the same conditions (2.03 and 1.56 mmol g −1 ). The enthalpies of adsorption were calculated from CO 2 and N 2 adsorption isotherms measured at 273 K and 298 K, using the Clausius-Clapeyron equation (figure 4, table 2 and ESI for details). The calculated enthalpy values show that at low coverage, all studied PIMs have strong interactions with CO 2 resulting in ∆H CO2 values comprised between 33.1 and 45.2 kJ mol −1 . We found good agreement with existing published values for PIM-1 [24], whereas PIM-1-COOH and PIM-1-NH 2 were found to possess superior enthalpy values in agreement with observations by Dawson et al on a different class of organic polymers [23]. In all cases ∆H steadily decreases upon increasing pore filling (figure 4), which indicates the presence of preferred binding sites resulting from a combination of ideal micropore sizes and surface functionalisation, that become gradually saturated upon increasing CO 2 loading. As expected, PIM-1-NH 2 has the strongest affinity for CO 2 (∆H CO2 = 45.2 kJ mol −1 ), owing to the presence of the amine groups. PIM-1-COOH also possesses a superior adsorption enthalpy compared to PIM-1 at low CO 2 uptake, consistently with prior reports [24]. PIM-1-COOLi displays lower enthalpy values, however the fitting procedures related to the isotherms  measured with PIM-1-COOLi gave poor results, and the determined ∆H CO2 suffers from significant uncertainty. In all cases, CO 2 was found to have stronger interactions with the polymers than N 2 , which was expected owing to the superior polarisability and quadrupole moment of CO 2 , which leads to more favourable interactions with heteroatomic functionalities in the pores.
Having established uptakes and binding affinities, we investigated the potential of the four polymers to perform CO 2 /N 2 and CO 2 /H 2 separations based on their adsorptive properties. Selectivities were estimated using the IAST [42] and from Henry's Law constants from the isotherms in the linear low-pressure range. At 273 K, the Henry's selectivity value determined with PIM-1 for CO 2 :N 2 separation (36) was found consistent with prior reports [32], and below the selectivities of PIM-1-COOLi (45) and PIM-1-NH 2 (53), whereas PIM-1-COOH has an inferior selectivity (30). The trend is slightly different when the analysis is performed for 298 K (PIM-1-NH 2 > PIM-1-COOH ∼ = PIM-1-COOLi > PIM-1, see table 2) but in general, it is clear that PIM-1-NH 2 is the best material for CO 2 /N 2 separations among the four polymers. A similar study performed on the isotherms measured at 298 K for H 2 and CO 2 adsorption reveals that, in this case, PIM-1-COOLi outperforms the other polymers (gradient ratio of 511), followed by PIM-1-NH 2 (387), PIM-1-COOH (265) and PIM-1 (187). The best performance of PIM-1-COOLi seems contradictory with the fact that it also has the highest ∆H H2 . However, considering that hydrogen adsorption at 298 K is much smaller than that of CO 2 in all cases, and that PIM-1-COOLi has a significantly lower surface area in the microporous range (figure 1, inset) which is known for being particularly favourable for H 2 uptake [26], we conclude that the observed trend results from a subtle combination between these properties. As in the case of CO 2 /N 2 mixtures, modifying PIM-1 post-synthetically proves beneficial to adsorption-based CO 2 /H 2 separation properties.
IAST has been widely used to investigate separation properties of porous polymers, and relies on single component adsorption isotherms, in our case on isotherms measured at 273 K and 298 K for N 2 and CO 2 , and at 298 K for H 2 . To determine the IAST selectivity of the materials, the single-component adsorption isotherms were fitted to different models (see ESI); the fitted isotherms were then used to calculate adsorption selectivity as a function of pressure, considering molar feed ratios of 85:15 N 2 /CO 2 and 80:20 H 2 /CO 2 . These ratios are typical of pre-dried flue gas and syngas, respectively, and used here to illustrate potential applications of microporous polymers in adsorption-based gas separation processes. The IAST selectivity results reflect data obtained from initial slope calculations (Henry's law). In particular, for CO 2 /N 2 mixtures, PIM-1-NH 2 and PIM-1-COOLi display higher selectivities (84 and 75 at 1 bar, respectively) compared to PIM-1-COOH (47) and PIM-1 (37), see figure 4(d). The selectivities decrease with increasing pressure and with increasing temperatures. At 298 K, PIM-1-COOLi performs significantly better than PIM-1-NH 2 in the low-pressure regime whereas all polymers display a slowly decreasing separating efficiency as pressure increases (figure S7). As expected, the CO 2 /N 2 selectivities at 298 K are below those calculated at 273 K. Reflecting the very low affinity of the polymers for H 2 and their high CO 2 adsorption capacity under ambient conditions, the IAST selectivities for CO 2 /H 2 mixtures indicate a very high selectivity for CO 2 (figure 4(d)) as in all cases, a feed containing 20 mol% CO 2 at 1 bar results in an adsorbed phase containing >98.2 mol% CO 2 . In the low-pressure range (<0.7 MPa) PIM-1-COOLi performs significantly better than PIM-1-COOH, whereas the latter performs better at pressures >0.7 MPa. PIM-1 and PIM-1-NH 2 display similar, lower selectivities. Comparisons with other porous materials where IAST selectivities have been reported (supplementary table S2 in ESI) indicate that for CO 2 /N 2 separations, post-synthetically modified PIMs, especially PIM-1-COOLi and PIM-1-NH 2 , compete with the best performing MOFs and COFs. The H 2 /CO 2 separation properties of PIM-1 and modified PIMs appear superior to numerous MOFs and activated carbons, and competitive with frequently used zeolites (supplementary table S2). Rationalising adsorption selectivities in microporous polymers is difficult due to the heterogeneity of their porous systems, and by the difficulty in accurately representing them. For example, electrostatic interactions between CO 2 and the polymer matrix is expected to enhance the selectivity for CO 2 (e.g. in the case of PIM-1-COOLi), whereas confinement effects in sub-nanometer size pores is expected to favour hydrogen adsorption [26]. Deconvoluting these effects remains challenging for amorphous materials, and crystalline materials such as MOFs or COFs are easier to study in this regard [43]. Henry's method and IAST theory give consistent predictions about the best-and worst-performing materials in CO 2 /N 2 and CO 2 /H 2 separation at low pressures, whereas IAST is expected to be more reliable for predictions at higher pressures as it uses full isotherms in its calculations instead of adsorption onsets used in Henry's method. Overall, these results demonstrate the utility of post-synthetic modifications to tune the gas storage and separation properties of PIMs and derived polymers.

Conclusions
In conclusion, we show how to easily modify the surface properties of PIM-1 using simple post-polymerisation modifications. These modifications affect the surface interactions of the polymer with gases such as H 2 , N 2 or CO 2 , while also decreasing the accessible surface area. The methods we present facilitate tuning of the properties of the polymer towards specific requirements: while PIM-1 has the largest hydrogen storage capacity (2.16 wt% at 10 MPa and 77 K), PIM-1-COOLi has enhanced separation properties for CO 2 /H 2 mixtures (competitive with best reported materials) and PIM-1-NH 2 , owing to its larger adsorption enthalpy of CO 2 , performs better to separate CO 2 /N 2 mixtures. These properties result from a complex combination of adsorption enthalpies and microporous structures and can be controlled by simple post-synthetic modifications performed on the well-known polymer PIM-1. Owing to the scalability of the syntheses, the processability of the polymers, and their high surface areas, such materials combine multiple useful properties that make them promising for numerous applications in gas storage and separation, and in water purification. Processes involving H 2 or CO 2 storage and separation are particularly relevant and topical owing to the current private and public efforts aiming at mitigating the effects of climate change, which include carbon capture and storage, and hydrogen-based energy systems. Furthermore, prior research has shown that composites made of PIM-1 possess enhanced properties [13,15], and we suggest creating composites based on PIM-1-COOH, PIM-1-COOLi and PIM-1-NH 2 will lead to new multifunctional materials with tailored properties.

Data availability statement
The data that support the findings of this study are available upon reasonable request from the authors.