Utilizing machine learning to optimize metal – organic framework-derived polymer membranes for gas separation †

* a Metal – organic frameworks (MOFs) have gained substantial attention as promising materials for gas separation membranes due to their exceptional porosity, tailorability, and functionalizability. In this study, we present a novel approach to further enhance the properties of porous polymer membranes emerging from MOFs through crosslinking of the organic linker molecules and subsequent metal-atom removal. To ensure reproducibility of the multi-step synthesis process and high quality of the resulting polymeric membranes, we automated the process and followed a machine learning optimization approach. The high-quality MOF-thin ﬁ lms (SURMOFs) were prepared in a layer-by-layer fashion directly on gold-coated porous alumina substrates. This direct synthesis proved crucial to preserve the structural integrity of the membranes and thus avoiding defect formation caused by a substrate-transfer process, which is usually required when advanced materials are used to fabricate a membrane. The initial SURMOF membrane exhibits moderate gas separation performance, once crosslinked, its gas selectivity could be signi ﬁ cantly enhanced although with the compromise of lower gas permeance. Interestingly, once we removed the metal centers and thereby converted the SURMOF into a purely organic polymeric membrane, the membrane gas permeance could be restored almost to its initial condition while preserving the enhanced selectivities. In particular, the resulting polymeric membrane outperforms most commercially available polymer membranes for H 2 /CO 2 gas separation. This research outlines a promising approach to employ MOFs as template in the generation of advanced polymer membranes for various gas and liquid phase separation applications.


Introduction
Since its rst industrial application in 1980 for hydrogen separation in an ammonia synthesis purge gas, a number of gas separation processes, such as hydrogen purication, biogas purication and air separation, became a promising area to expand the applicability of a gas separation membranes. 1,2Up to now, a gas separation membrane is usually fabricated using polymeric materials, since they are easy to process and generally inexpensive in comparison to other materials. 3However, polymeric membranes always suffer from the inverse relationship between the membrane permeability and selectivity as usually depicted through a Robeson upper bound. 4Therefore, a membrane with high gas permeability usually has low gas selectivity and vice versa.
Addressing the above issues, various new materials such as covalent organic frameworks (COFs), 5 graphene-based materials, 6 MXenes, 7 polymers of intrinsic microporosity (PIM), 8 and thermally-rearranged polymers 9 have been developed in the last few years to fabricate gas separation membranes including metal-organic frameworks (MOF). 10,11][14][15][16] MOFs are porous-hybrid materials, built from metal clusters connected by organic linkers, offering a host of benets, distinguished by their heightened porosity, adaptable customizability, and the potential for framework functionalization. 17,180][21][22] Therefore, the use of these particular materials to improve the performance of a gas separation membrane has been widely investigated during the last few years. 23n general, there are two main approaches to fabricate a MOF-based membrane for gas separation. 2,24][27][28] In this case, the MOF nanoparticles are incorporated as the discrete phase inside a polymeric matrix acting as the continuous phase.Differing from the rst approach, the second method does not involve the utilization of a polymer matrix and the MOF is the only constituent of the membrane selective layer. 29,30n this study, we aim to develop a novel polymeric membrane material, called SURGEL, whose structural framework is inherited from the structure of a MOF and therefore can neither be classied as MMM nor MOF membrane.We develop this new SURGEL membrane by comprehensively investigating its development process consisting of SURMOF fabrication, crosslinking and metal atom removal.In this case, the foundation of the SURGEL membrane originates from a thoroughly craed SURMOF (surface-anchored MOF) structure, meticulously built layer-by-layer through structured cycles.2][33] This SURMOF grown on a porous substrate is then subjected to crosslinking and metal atom removal process, respectively, before becoming a SURGEL membrane. 34,357][38] Within our context, the direct synthesis of the SURMOF membrane on a porous substrate before transforming it into the SURGEL is particularly crucial since this step obviates the necessity to employ a substrate-transfer process.For new and advanced membrane materials, this substrate-transfer process is sometimes necessary since the synthesis of these materials could be very delicate and thus requiring well-established substrate conditions that cannot be fullled by porous substrates, such as observed in MOF and COF membranes. 39,40By eliminating this substrate-transfer process, it is expected that the structural integrity of this new membrane material can be well preserved and thus yielding a new polymeric membrane material showcasing the satisfactory separation performance inherently owned to the MOF membranes.
In order to realize this objective, the rational design and optimization of the MOF synthesis condition becomes crucial to ensure the quality and reproducibility of the MOF as a starting material.2][43][44] Notably, an additional avenue for optimizing SURGEL's performance lies in the realm of high throughput computational screening. 45Given the widespread success of machine learning methods in optimizing parameters and conditions, our study employed a machine learning-based approach known as SynthesisConditionFinder, which was developed by Moosavi et al. in 2019. 46The primary objective was to optimize the synthesis conditions of a SURMOF based on the pillar-layered SURMOF-2 structure, utilizing a modied linker.As depicted in the Fig. 1, the goal of this optimization was to improve the stability and crystallinity of the SURMOF, as these are critical features, especially if the MOF is intended for use in gas separation processes.To overcome these obstacles, we also employed a synthesis robot to carefully control the synthesis parameters to minimize uncontrolled variations that could potentially impact the optimization process.
The optimization process involved simultaneously varying ve key synthesis parameters using a genetic algorithm provided by the SynthesisConditionFinder.Previous approaches to optimizing MOF thin lm properties have primarily focused on varying a single parameter due to the complexity of multiparameter optimizations.However, this method does not fully capture the intricate relationship between synthesis conditions and lm properties in the complex SURMOF synthesis process.Considering the multitude of parameters inuencing MOF growth, it becomes imperative to simultaneously vary multiple parameters to achieve comprehensive optimization.Therefore machine learning methods appear very promising to address this challenge. 47he SyCoFinder tool consists of three consecutive steps aimed at optimizing synthesis parameters.In the initial step, known as the "Diverse Set," the parameter space is dened along with the allowable intervals for parameter variation.To ensure a diverse range of parameter combinations, the MinMax method is employed.This method randomly selects a data point within the dened parameter space and then proceeds to choose subsequent points based on their maximum distance from each other.This approach guarantees comprehensive coverage of the parameter space with minimal samples.Experimental syntheses are then conducted based on the diverse parameter set, and the resulting outcomes are characterized.A tness value, calculated through mathematical means using a tness formula, is determined on a scale of 0 to 1 to assess the effectiveness of the parameter combinations.
In the second step, a new set of synthesis parameters is computed using a genetic algorithm, leveraging the information from the diverse set.The genetic algorithm facilitates the evolution and optimization of parameter sets across generations by considering the tness values of parental chromosomes (i.e., different parameter sets) and recombining those that perform well.For a more comprehensive understanding of the genetic algorithm and the selection process through the MinMax procedure, we refer interested readers to the work of Moosavi and co-workers. 46pon successful synthesis and characterization of the further developed parameter sets, along with calculating new tness values, a new optimization cycle begins.The process continues until the characterization results meet the user-dened optimization criteria.In Fig. S8 in the ESI the entire workow of the machine learning optimization is illustrated.† In the nal step, once the optimization process concludes, all generated data are analyzed to determine the importance of variables.By following this iterative approach, the SyCoFinder tool enables the systematic exploration and optimization of synthesis parameters.It offers a comprehensive understanding of the parameter space and facilitates the identication of key factors inuencing the desired outcomes.
By employing gold-coated silicon wafers as substrates, we rstly aimed to promote uniform nucleation and growth of the MOF crystals and comprehensively study the impact of various parameters on the quality of the MOF thin lms.This approach not only facilitates the reproducibility of results but also enables the subsequent knowledge transfer when using different substrates such as the later employed gold coated alumina substrates as illustrated in Fig. 1.By leveraging the optimized synthesis conditions, high-quality MOF thin-lms were also successfully synthesized on gold-coated alumina substrates, which are known for their exceptional porosity.The SURMOF growth on these substrates exhibits excellent compatibility with the optimized synthesis conditions initially employed for silicon wafers, conrming the robustness and versatility of our approach.
Upon the successful synthesis of a high quality SURMOF as the basis material, the study could then be safely followed by the crosslinking process and transformation into a SURGEL membrane, as a new polymeric membrane material.Since all the processes involved in the gas separation study were carried out exclusively on gold-coated alumina substrates, the delicate membrane transfer process from one substrate to another could be avoided. 39,48Such a direct conversion strategy is crucial to preserve the structural integrity of the membrane and prevent the emergence of defects that could be caused by a transfer process that would eventually negatively impact the membrane's performance.
In summary, this study highlights the successful optimization of synthesis conditions for a pillar layered SURMOF-2 system using a machine learning approach.The integration of a synthesis robot, gold-coated silicon wafers, and gold-coated alumina substrates enables the direct growth of MOFs and their subsequent processing into a new membrane material for gas separation membranes.The outcomes of this research contributes to the development of robust and efficient MOFbased membrane materials for various applications, particularly in gas separation technologies.

Materials
The silicon wafers were purchased from Siegert Wafer, pre-cut by MaTecK and coated with gold by Georg Albert -PVD-Beschichtungen, Silz.The nished silicon wafer pieces then measure 1 × 3 cm 2 in area and 525 nm in thickness with 100 nm gold coating on top.Meanwhile, the alumina substrates were purchased from Fraunhofer-Institut für Keramische Technologien und Systeme (IKTS).The diameter and thickness of the substrate is 18 mm and 1 mm, respectively, with average pore size of 70 nm.The linker 3-azido-4-[2-(2-azido-4-carboxyphenyl)ethenyl] benzoic acid and the crosslinker trimethylolethane tripropiolate were synthesized according to the literature. 49ll other chemicals were obtained from commercial sources and used without further purication.Copperacetate dihydrate and 1,4-diazabicyclo[2.2.2]octane (DABCO) were used for synthesis and purchased from ACROS ORGANICS and Merck KGaA, respectively.Phenylbis(2,4,6-trimethylbenzoyl) phosphine oxide and 4-phenyldiazenylbenzene-1,3-diol (Sudan Orange G) which were used as initiator and as dye respectively in the 3D-printing process and purchased from Sigma Aldrich.FLUOROLINK® MD 700 was also used in for 3D-printing and purchased from Solvay.The solvents ethanol, methanol and toluene as well as acetone were used for synthesis and purication and purchased from AnalaR NORMAPUR and Merck KGaA respectively.
2.2 Fabrication of SURMOF 2.2.1 Substrates.In order to optimize the synthesis conditions, gold-coated silicon wafer pieces measuring 1 × 3 cm 2 were initially employed.Subsequently, the most suitable synthesis conditions were applied to porous gold-coated alumina substrates as drawn in Fig. 1.To accommodate the round alumina substrates within the robot setup, a specialized sample holder was designed to meet specic requirements for subsequent gas separation applications, particularly to ensure complete coverage of the substrate with a thin lm.Consequently, the round substrate cannot be simply clamped in a gripper holder, but rather needs to be held laterally with minimal surface contact.Hence, a novel sample holder was created using 3D-printing technology, utilizing a exible material to satisfy the clamping and surface contact criteria, while also maintaining chemical inertness when exposed to ethanol.The latter aspect is crucial to prevent any leaching of the material into solvents or potential brittleness when immersed in liquids.
The chosen material for the sample holder is a viscous liquid based on a uorinated methacrylate monomer, which undergoes solidication via UV curing during the printing process.The specic printing technique employed is referred to as Digital Light Processing (DLP), utilizing an Asiga Max UV DLP Printer.An image of CAD sketch as well as of the produced 3Dprinted sample holder can be found in the ESI (see Fig. S7).† All substrates were treated 72 h with a SAM-solution prior to the synthesis, containing 1.4 mg 16-mercaptohexadecanoic acid dissolved in 25 mL acetic acid (glacial) and 225 mL ethanol (99.8%).
2.2.2 Synthesis.The synthesis of the pillar-layered SUR-MOF was performed utilizing an industrial six-axis robot from Stäubli carrying out a xed sequence of dipping steps under inert conditions.Aer preceding 72 h hours of treating the gold-coated substrate with the MHDA-SAM solution the robot immerses the substrate into different solutions of metal salt, organic linker and several rinsing solutions only containing the corresponding reaction-solvent.In this manner the SUR-MOF is grown layer-by-layer using the following sequence representing one cycle (see Fig. S6 in the ESI †): metal solution (10 minutes) -3 times dip-rinsing (each 2 minutes)linker solution (15 minutes) -3 times dip-rinsing (each 2 minutes).It is to be noted, that the rst 3 dip-rinsing solutions differ from the second 3 dip-rinsing solutions to ensure the complete removal of unreacted molecules on the surface of the substrate and avoid a subsequent mixture of metal and linker solution in their respective vessels.The metalsolutions consisted of copper(II) acetate dissolved in various ratios of ethanol and methanol.The linker-solution was composed of the linker 2,2 ′ -diazido-4,4 ′ -stilbenedicarboxylic acid, 1,4-diazabicyclo[2.2.2]octane (DABCO) in various equivalents of the linker and water as a modulator all likewise dissolved in the same ratio of ethanol to methanol as the metal solution.The amount of cycles was kept to 40 for every experiment throughout the whole optimization as well as for the transferred synthesis conditions for the production of samples for gas separation.In Table 1 the variable parameters and their corresponding varying-ranges are summarized.The exact synthesis-conditions for each experiment are to be found in the ESI (see Tables S1-S3).† 2.2.3 Machine learning method.The computational part of the optimization process followed the procedure outlined by the SyCoFinder web application.First, the variables were dened, their ranges established, and the number of experiments determined.Utilizing this information, SyCoFinder generated a Diverse Set consisting of ten sets of parameter combinations.
According to these parameter sets the synthesis were carried out, characterized, and the resulting tness was determined.The same parameter sets, along with their corresponding tness values, were fed back into the web application, generating a new generation of parameter combinations to be synthesized, characterized, and ranked.This evolution of generations was repeated twice, resulting in thirty experiments in total, until satisfactory results were obtained.
The optimization process aer the starting Diverse Set employed a genetic algorithm, involving recombination and mutation of the ranked parameter sets with the goal to achieve pure and highly crystalline DASBDC-SURMOF-thin lms.
In the realm of machine learning optimizations, a signicant volume of data is generated, much of which holds relevance for subsequent endeavors.When it comes to machine learning, it becomes crucial to retain data in machine-readable formats and even publish experiments that may not have yielded successful outcomes.This necessity underscores the importance of adopting a Research Data Management System.In the context Table 1 Definition of variables and their respective ranges in which they are to be varied

<
: The tness function tness (phase identity), assesses the attainment of the desired compound by comparing the positions of measured diffraction peaks with a simulated diffractogram.A match between the patterns yields a tness value of 1, indicating successful phase identication of two samples f 1 and f 2 .Conversely, a lack of correspondence in either one or both samples f 1 and f 2 results in a tness value of 0, causing the overall equation to evaluate to zero.

Amorphous ½% ¼
global area À reduced area global area Â 100 (3) The tness (crystallinity) parameter was determined by evaluating the overall and reduced areas of the diffractograms corresponding to the crystalline and amorphous regions.This assessment involved integrating the uncorrected and nonbackground-subtracted data to calculate the respective areas.
Returning to eqn (1), the initial tness criterion (tness (phase identity)) serves as a binary indicator, determining whether an experiment is included in the evaluation.The second criterion (tness (crystallinity)) then assigns the numerical rating between 0 and 1, representing the actual quality of the experiment.

Fabrication of crosslinked-SURMOF (SURMOF-CL)
The crosslinking of the MOF structure was achieved using a solvothermal method based on the literature. 49Therefore, the thin lm samples were immersed in a crosslinker solution containing 1 mg mL −1 trimethylolethane tripropiolate in toluene and heated to 80 °C for one week.For purication, the samples underwent rinsing with both ethanol and acetone, aer which they were stored under ambient conditions until further processing.To ensure no crystallinity was lost during this process all samples were analyzed via XRD.

Fabrication of SURGEL
For the conversion of the crosslinked samples on gold coated silicon substrates into a SURGEL the metal-knodes were removed by treatment with 1 mg/10 mL EDTA (ethylene diaminetetraacetic acid disodium salt) in a 1 : 1 mixture of ethanol and water for 3 hours.
The same procedure was applied for the samples on goldcoated alumina substrates except for the ratio of EDTA was set to 1 mg/5 mL.Also the immersion time was set to one week due to the high porosity and therefore slower diffusion rate through the alumina substrates.
To conrm the complete conversion by verifying the entire absence of crystallinity, all samples were analyzed via XRD.
2.5 Materials characterizations 2.5.1 X-ray diffraction (XRD).The diffractograms were obtained using a Bruker D8 Advance diffractometer in q-q geometry, equipped with a LYNXEYE position sensitive detector containing 192 active stripes.The measurements covered a range from 2q = 3°to 2q = 20°.An additional range from 2q = 37°to 2q = 40°was recorded specically to identify the characteristic substrate gold diffraction peak, which served as a reference.Each step of the measurement took 2 seconds, resulting in a total measurement time of 384 seconds per step.
To ensure comparability, each measurement underwent height error correction and background correction using DIF-FRAC.EVA soware version 5.2.0.3 provided by Bruker AXS.The evaluation of crystallinity was performed using a built-in routine by Bruker.For assessing phase identity, the obtained diffractograms were compared to a simulated powder diffractogram.
2.5.2Scanning electron microscopy (SEM).The micrograph of SURMOF, SURMOF-CL and SURGEL membranes were obtained by employing TESCAN VEGA III.Before the micrographs of the samples were taken, all the samples were rstly coated with platinum using Sputter Coater MED 020.The sample coating thickness was set to be 6 nm.

Measurement of the gas separation performance
The gas separation performance of the SURMOF, SURMOF-CL and SURGEL was evaluated using a Wicke-Kallenbach setup.Before the gas permeation experiment was performed, the sample was pre-conditioned by mounting it inside the membrane permeation cell rst where the nitrogen and helium (50 mL min −1 ) were continuously introduced on the feed and permeate side, respectively, for at least 18 hours.This ensured that the samples were dried under controlled conditions with minimal exposure to the surrounding atmosphere.Aerwards, the gas permeation was measured by feeding the pure gases of H 2 , CH 4 , N 2 , and CO 2 was fed to the membrane at the ow rate of 50 mL min −1 .Meanwhile, argon was used as the sweep gas on the retentate side with the ow rate of 10 mL min −1 .The gas permeance of the membranes was evaluated by Varian micro gas chromatograph (GC) CP-4900.The micro GC used argon as the carrier gas and was equipped with molsieve and PPQ columns.The gas permeance was measured at least 5 times until a stable reading was obtained.

Results and discussions
3.1 Fabrication of SURMOF, crosslinked-SURMOF and SURGEL 3.1.1Development of machine learning optimization on SURMOF.Aiming for a highly stable system and therefore focusing on the crystallinity the SyCoFinder has been applied as machine learning method with great success.
The rst step, the "Diverse Set", mainly produces parameter combinations from the limit values chosen as minimum and maximum, respectively, to delineate the boundaries of the dened parameter space.Taking this into account the main machine learning part is performed within the two generations of genetic algorithm (GA1 and GA2), taking the data produced in the diverse set as starting data set.This is also directly re-ected in the data points in Fig. 2a visualizing the development over the different generations: the rst generation (Diverse Set) resulted in six diversely spread but low ranging experiments, the second generation (Genetic Algorithm 1) led to three and the third generation (Genetic Algorithm 2) again to six successful experiments.The tness of the successful experiments, however, increases strongly with the second generation (GA1), showing the high effectiveness of the genetic algorithm, but the successful rated experiments are still very few.Accordingly, the increase to the third generation is no longer as strong, but the number of successful experiments with very good performance or tness increases.In addition, there are no more experiments with a tness value below 83%.Thus, the optimization is evaluated as successful, also in consideration of several very good experiments with tness values up to 94% in the best experiment.
The evaluation of the tness has been performed via analysis of X-ray diffractograms.First, the formation of the correct structure is determined by comparing the measured signals to the position of signals in a simulated diffractogram.This simple binary criterion, named phase identity results either in the exclusion or consideration for further evaluation.From the robotic synthesis set-up always two samples per synthesis are produced in one experiment providing system inherent information about the reproducibility of a set of parameters.Each sample f 1 and f 2 is analyzed and rated with the value one for a positive match with the simulation and zero if either no crystalline structure or the wrong structure was built, including multiple phases identied by doubled and shied signals.If both samples of a parameter combination perform similar in terms of signal-positions the tness (phase identity) equals one as indicated in eqn (2).If none or only one of two XRD measurements matches the simulation the whole criterion is rated zero, to ensure only reproducible samples are included.In the most recent generation (GA2) however, X-ray diffraction measurements were conducted on only one sample per synthesis.The second sample was reserved for subsequent investigations.
Since the syntheses are performed under controlled conditions, such as humidity and atmosphere (nitrogen/ethanol), and executed by an industrial six-axis robot, both samples of a parameter combination always showed either the same or no crystalline signals, which indicates the high reproducibility of the applied synthesis method.Fig. 2b shows an example of the comparison of a measured X-ray diffractogram and the simulation, which in this case agree very well.Over the whole optimization 15 experiments were agreed to show the correct signals and therefore considered for further investigation on crystallinity.
The tness (crystallinity) evolves also from the X-ray diffractograms as a percentage value providing the actual rating of the experiments.The calculation of this tness value is shown in eqn (3) and ( 4) and all diffractograms are to be found in the ESI (see Fig. S1-S5 †) as well as the crystallinity values according to every experiment and their corresponding tness values (see Tables S4-S6).† In the rst generation there are six successful experiments but only ranging between 33% and 63% crystallinity and therefore averaging only 47%.With the second generation (GA1) the crystallinity rises up to values between 72% and 93% averaging 85% but with only three of ten experiments being successful at all.The third generation, however, reaches six successful experiments averaging 89% with no value below 83% and up to 94% crystallinity.With this the machine learning optimization is considered successful.
3.1.2Importance of variables.The last method provided by the synthesis-condition nder is the determination of the importance of variables, rating the chosen variables relatively and according to the tness-values respectively to the dened goal, in this case the crystallinity and phase identity.Fig. 3a shows the distribution for all data in this machine learning optimization.This is intended to be used for further optimization to weight the variables for a similar system and possibly to reach the goal faster, which is possible during the step of creating the parameter space when the variables are dened.
However, it is also helpful to gain some insights about the system by studying the graph along with the tness values and parameters of the successful experiments.In Table 2 all successful parameter sets are shown, ordered by decreasing tness.
Taking a closer look at the variables and their importance, the rst thing that becomes noticeable is that all variables except for the percentage of ethanol as reaction solvent inherit an importance of more than 0.6, indicating a high impact on the successful outcome.The remarkably high values for the importance of linker and metal salt are intrinsic to the system, since they are generally required for structure formation and therefore crystallinity.
However, looking at the concentration values for each variable individually, it becomes clear that the "importance" of the linker requires using a rather high concentration, as almost all experiments with a tness above 0.5 show a concentration of more than 0.5 mM L −1 , mostly even more than 0.7 mM L −1 , with 1 mM L −1 being the maximum (see Table 1).
Although in terms of the metal salt the concentration values seem to be distributed without accumulation in a certain value range, but they correlate strongly and approximately linear with the percentage of ethanol for all experiments with a high tness.However, since the experiments appear to be successful at different amounts of ethanol/methanol mixture, as indicated by the low signicance of this variable in Fig. 3a, it stands to reason that the values for the metal salt may also vary widely.
In almost all cases the modulator water is added with more than 20 mL mostly even more than 30 mL, with 40 mL being the maximum and 0 mL the minimum.Only one experiment without water was successful at all, reaching a tness of only 0.33.The importance in this case is therefore referring to a high amount of modulator.
Regarding the additive DABCO the importance is relatively speaking less than the ones of the concentrations and the modulator, but still more than 0.6.It is again quite clear, that importance in this case means adding amounts in the upper ranges of the variables borders (see Table 1), since only three experiments appear with very low values of 0.1 equivalents of the linker and those achieve only tness values in the lower ranges.Almost all high rated experiments contain more than one and up to two equivalents.
3.1.3Transfer of conditions to alumina-substrates and further processing.Aer successful optimization by machine learning on gold-coated silicon substrates, several different parameter combinations were obtained leading to highly crystalline and stable SURMOF-2 structures with DASBDC as linker.This was now to be applied on porous gold coated alumina substrates for further processing towards a separation membrane.The direct growth method via layer-by-layer procedure should avoid cracks and breaks in the membrane, which is likely to happen during a manual transfer from one substrate to another.Moreover, in addition to the SURGEL membranes, the rst-forming SURMOF and the intercrosslinked SURMOF should also be investigated for their permeability.
So far the sample holder for the robotic synthesis system was made of Teon, which is chemically inert and therefore suitable for a broad range of solvents.With this the rectangular silicon substrates were mounted into a gripper with one end which was therefore not covered with the reaction solutions during the synthesis.To produce a defect-free membrane however, it was necessary to cover the whole surface of the alumina substrates which are in addition round to t into the gas separation device.Therefore a new sample holder with complex requirements was designed.The shape was chosen to touch as little of the surface as possible, and the material had to be exible to ensure damage-free clamping, but still securely x the sample for the synthesis process and should be as inert as possible to the reaction solutions.Due to this complex task and also for environmental reasons, methanol was no longer used.Moreover, our previous assessments of variable importance have highlighted that, among the chosen factors, the ratio of methanol to ethanol as solvent mixture exerts the least inuence on attaining stable and highly crystalline SURMOF structures, making it readily adjustable.Therefore, among the best syntheses, the one containing only ethanol was selected to apply the optimized parameters to the porous alumina substrates, still achieving a tness of 91%.
The X-ray diffraction pattern of the SURMOF in Fig. 3b demonstrates the successful transfer of the chosen synthesis conditions from the silicon to the alumina substrate, achieving a very similar crystallinity of 93%.The subsequent crosslinking procedure with trimethylolethane tripropiolate was likewise successful.In Fig. 3b it is evident that the crystallinity remains stable (see SURMOF-CL), which is also proven by the calculation according to eqn ( 3) and ( 4), providing a crystallinity value of 88%.With the transformation to the SURGEL however, the crystallinity is then completely removed, since the metal knodes are etched away by EDTA and the intercrosslinked polymeric structure remains.All three stages as well as the bare gold coated substrates surface are recorded by SEM images which are to be found in the ESI (see Fig. S9).†

Gas separation performance of SURMOF, crosslinked-SURMOF and SURGEL
Having successfully fabricated the SURMOF, crosslinked-SURMOF (SURMOF-CL) and SURGEL on a gold-coated porous alumina substrate, the gas separation performance of these membranes were investigated.Before proceeding with the measurement, rst the gas permeance of the gold-coated alumina substrate was examined.As can be seen in Table S7 in the ESI, † the gas selectivities of the gold-coated alumina substrate is almost 1 in all cases and thus indicating nonselective gas permeation behavior.Meanwhile, a contrasting situation can be observed once the substrate is coated with either SURMOF, SURMOF-CL or SURGEL membrane, whose gas separation performance results are presented in Fig. 4a.
As demonstrated by the results, the gas permeance of all membranes follows the same trend with H 2 as the fastest permeating gas in all cases due to its comparably smaller size regarding the other gases.Aerwards, the gas permeance of the membranes follows the order of CH 4 , N 2 and CO 2 .This then indicates that the gas permeance in SURMOF, crosslinked-SURMOF and SURGEL is governed by the molecular weight (MW) of the permeating gas, namely gas with higher MW permeates slower than gas with lower MW.
The gas transport through a membrane could actually be described by various mechanisms. 2,52In a dense-polymeric membrane, the gas transport is usually described by a solution-diffusion model. 52,53In this case, the gas is assumed to be condensed at the feed side of the membrane, get dissolved and diffuses across the membrane to the permeate side.Meanwhile, in a porous membrane, the gas transport can be governed by at least three different mechanisms: convective ow, Knudsen diffusion and molecular sieving.When a gas separation membrane contains a signicant number of defective sites, whose pore size is more than 50 nm, its gas transport is dictated by convective ow mechanism.In contrast, the gas transport in a least-defective membrane can be governed either by Knudsen diffusion or molecular sieving, depending upon the pore size of the porous membrane.A molecular-sieving membrane can be obtained when the porous membrane has a very tight pore size which can effectively discriminate the permeating gases based on their molecular size.Meanwhile, when the pore size of the membrane is slightly bigger than the molecular sieving scenario, the gas transport is governed by the Knudsen diffusion where the gas permeance follows the order of the MW of the gases.Therefore, it can be safely inferred that the gas transport in all cases of our membranes follows the Knudsen diffusion model rather than a molecular sieving since the rate of the gas permeance follows the order of the MW of the gases rather than their kinetic diameter.Since the gas transport follows the Knudsen diffusion model, we can also evaluate the performance of the membranes with the ideal scenario where the pinholes are absent in the membrane.In the Knudsen diffusion model, the ideal gas selectivity of H 2 against CH 4 , N 2 and CO 2 is 2.82; 3.74 and 4.7, respectively.
In this cases, as can be seen from the inset of Fig. 4a, the selectivity of the membranes follows the order of SURMOF-CL, SURGEL and SURMOF.The selectivity of H 2 against CH 4 , N 2 and CO 2 of the SURMOF membrane is found to be around 2.4; 2.6 and 3, respectively.Based on these results, it can be seen that a non-ideal Knudsen diffusion scenario occurs in the SURMOF membrane.This can then be associated with two main reasons.First, the pore size of the SURMOF membrane is not adequate to perform such a sieving effect.According to the computational calculation that was previously performed, 49 the pore size of the SURMOF membrane is around 1 nm.This is signicantly larger than the gases used in this study and also around 10% larger than the pore size of HKUST-1, where Knudsen diffusion selectivity can not also be achieved. 54,55,59Therefore, it is safe to assume that the relatively large pore size of the SURMOF membrane plays a crucial role to the emergence of the non-ideal gas diffusion scenario.The second reason might also be associated with the presence of a few pinholes within the SURMOF membrane.Even though the surface of the SURMOF membrane looks homogeneous, the presence of tiny defects could not be completely eliminated which also contributes in amplifying the impacts coming from the convective ow.Therefore, together with the big pore size of the SURMOF membrane, both conditions then lead to the non-ideal scenario of gas diffusion occurring inside the SURMOF membrane.
Once the SURMOF membrane was inter-crosslinked, a signicant improvement in the gas selectivities is observed and the selectivity of H 2 against CH 4 , N 2 and CO 2 now approaches the Knudsen ideal values, namely 2.9; 3.9 and 4.2, respectively.This corresponds to the performance improvement of around 21%, 50% and 40%, respectively, in comparison to the SURMOF membrane.Such a remarkable performance improvement could then be associated with two main phenomena.First, the crosslinking process might contribute in tightening the pore aperture of the SURMOF membrane.As illustrated in Fig. 5b, this phenomenon occurs due to the reactive groups of the crosslinkers connecting the SURMOF ligands to each other by reacting with the azide group of the ligands and thus resulting in membranes with smaller pore size.Second, this crosslinking process might not also exclusively occur within the SURMOF's pores but also between the MOF crystallites.In this case, the crosslinking process might contribute in reducing the defect densities in the membrane.Therefore, it is assumed that both the SURMOFs pore tightening and defect density reduction contribute in signicantly enhancing the gas selectivity of the SURMOF-CL membrane and thus can achieve an almost ideal Knudsen diffusion scenario.However, such an improvement must also be accompanied with lower gas permeance since the diffusion of the gases is now more obstructed by the presence of the crosslinkers in the pores.As can be seen from Fig. 4a, the H 2 gas permeance of the SURMOF-CL membrane is around 4.1 × 10 −7 mol m −2 s −1 Pa −1 , which is around three times lower than the SURMOF membrane.
Finally, when the crosslinked SURMOF (SURMOF-CL) was transformed into the SURGEL membrane, the selectivity of H 2 against CH 4 , N 2 and CO 2 decreased slightly and was now found to be about 2.6; 3.3 and 3.9, respectively.This corresponds to the membrane selectivity decrease around 10%, 15% and 7%, respectively, from the SURMOF-CL membrane.Despite this decrease in performance, the gas selectivity of the SURGEL membrane is even higher than the SURMOF membrane.In particular, the H 2 selectivity against N 2 and CO 2 of the SURGEL membrane is around 30% higher than the SURMOF membrane.Interestingly, such a slight decrease in the gas selectivity from the SURMOF-CL membrane is also accompanied by signicantly higher gas permeance observed in the SURGEL membrane.As shown in Fig. 4b, the H 2 gas permeance of the SURGEL membrane is found to be around 12.8 × 10 −7 mol m −2 s −1 Pa −1 , which is only around 10% lower than the H 2 permeance of the SURMOF membrane.
The relatively high gas permeance of the SURGEL membrane with better gas selectivity compared to the SURMOF membrane could be associated with a number of phenomena.As has been previously explained, the transformation process of a SURMOF-CL membrane into a SURGEL membrane is accompanied by the loss of the crystallinity and thus resulting in an amorphous material.Because of this transformation, it rstly can be argued that the gas transport is now governed by the solution-diffusion phenomenon as it is the case for most polymeric membranes.However, it should also be noted that the SURGEL membrane has different characteristics than a conventional polymeric membrane, since the fabrication of a SURGEL membrane is initialized by a SURMOF membrane fabrication.Therefore, to some extent, its structure is still determined by the SURMOF structure.With respect to this, it can be hypothesized that the porous structure possessed by both SURMOF and SURMOF-CL membranes is also be inherited once the membrane is transformed into a SURGEL membrane.As illustrated in Fig. 5c, upon the removal of the copper metal from the SURMOF-CL, the porous structure of the SURMOF-CL can still be maintained.This is due to the crosslinker having three reactive groups being able to not only binding the SURMOF ligands located in the same layer, but also those located in different layers (inter-layer binding).Therefore, once the copper ion is removed from the SURMOF-CL, the SURGEL membrane can still maintain its porous-3D structure, where the crosslinker acts as the scaffold.Secondly, the removal of copper atoms from the SURMOF-CL also leaves additional gaps in the SURGEL membrane.Maintaining the porous structure in the SURGEL membrane with additional gaps remaining aer removal of the copper ion could then help improve gas permeability compared to the SURMOF-CL membrane.Meanwhile, the decrease in the gas selectivity in the SURGEL membrane, in contrast to the SURMOF-CL membrane, might be associated with the presence of some bigger pore aperture in the SURGEL.When the copper ion is removed from the SURMOF-CL membrane, the coordination bonding between the aromatic ring of the linker and the copper atom is also removed.As a consequence, the aromatic rings have now more rotational degrees of freedom and thus resulting in larger gaps within the SURGEL membrane that do not previously exist in the SURMOF-CL membrane.Despite this, such a rotation might also be limited because the linker molecules are already crosslinked with each other.As a result, no striking decrease in the gas selectivity does occur and the SURGEL membrane can still maintain a satisfactory performance.
Lastly, to give a broader perspective on the gas separation performance of the SURMOF, SURMOF-CL and SURGEL membranes, their performance against some selected MOF and polymeric membranes is given in Fig. 4b-d.In this case, the gas permeability of SURMOF, SURMOF-CL and SURGEL membranes was estimated based on around 2 mm membrane thickness (see Fig. S10 in the ESI †).From the result, it can rstly be seen that the performance of the SURMOF membrane could be considered moderate in our case if its performance is compared with other MOF membranes, in particular for H 2 /N 2 separation.As can be seen, the performance of the SURMOF cannot surpass the Robeson upper bound as in the case for various well-known MOF membranes such as HKUST-1, 54,55 UiO-66 (ref.58) and ZIF-8. 57Meanwhile, the performance of the SURMOF membrane applied for H 2 /CH 4 and H 2 /CO 2 separations are slightly better since it can now surpass the upper bound, in particular for the latter case.However, with only around 9000 barrer H 2 permeability, the performance of our SURMOF membrane is still not as high as in the case of, for example, HKUST-1, 54,55 ZIF-8 (ref.57) and ZIF-22, 56 whose H 2 permeability could reach more than 10 000 barrer and thus placing them at almost the upper right for region for H 2 /CO 2 separation process.
Once crosslinked, the performance of the SURMOF-CL moves to the upper le direction of the graph and thus indicating the decrease in the membrane permeability with an increase in the selectivity.Despite such separation performance increase, the performance of the SURMOF-CL is still relatively moderate.For example, as can be seen in the Fig. 4b and c, the performance of the SURMOF-CL for H 2 /CH 4 and H 2 /N 2 separation has moved further from the upper bound even though its selectivity has been signicantly improved from the SURMOF membrane.Meanwhile, in the case of H 2 /CO 2 separation process, even though the separation performance of the SURMOF-CL is still above the upper bound, the performance of most MOF membranes are still better than the SURMOF-CL.Therefore, from this comparison study, it could be safely inferred that the performance of both the SURMOF and SURMOF-CL membranes could not really outperform the current gas separation performance obtained in various wellknown MOF membranes.Even though both membranes have shown high gas permeability, the relatively big pore aperture of this particular MOF could not really promote the molecular sieving effect observed in other MOFs whose pore size are below 1 nm.
However, a contrasting situation can be observed once we compare the performance of the SURGEL with some well-known polymeric membranes.As can be seen from Fig. 4b-d, once the SURMOF-CL has been transformed into a SURGEL membrane, the H 2 permeability of the membrane moves again to the righthand side direction and gets close to the initial SURMOF H 2 permeability.Although the selectivity of the SURGEL membrane is slightly less than the SURMOF-CL membrane, the overall performance of the SURGEL membrane looks more promising most of the commercially-available and recently-developed polymers such as Matrimid, 68 polyetherimide (PEI), 69 poly(methyl methacrylate) (PMMA), 70 and polymer of intrinsic microporosity 1 (PIM-1). 71In this respect, PTMSP is one example of the polymers whose performance is quite close to the SURGEL membrane, even though this particular polymer has suffered from relatively low gas selectivity (around 1 for all the cases). 79s discussed above, such a high gas permeability and moderate gas selectivity could be mostly contributed from the highly porous structure of the SURGEL membrane because it is developed based on the SURMOF membrane with relatively large pore size.Therefore, differing from the cases observed in dense polymeric membranes, the gas molecules in the SURGEL membrane could diffuse faster with less resistance through the interconnected pores of the SURGEL membrane.In this case, the gas permeability of the SURGEL membrane resembles more the behavior as observed in rubbery polymers where higher diffusivity usually occurs. 89However, differing from the most common rubbery polymers whose selectivity is usually determined by the gas solubility rather than diffusivity, 90 the diffusion process in the SURGEL membrane also contributes in determining its selectivity, namely through the Knudsen diffusion process.As a result, it has better separation performance in comparison to other rubbery polymers such as PTMSP and more selectivity towards H 2 . 79Such a good combination between the high H 2 gas permeability and satisfactory gas selectivity in a polymeric membrane can be particularly useful when a H 2 selective membrane is required.In this case, it can be seen from the result that the SURGEL membrane could be particularly promising when it is deployed for H 2 /CO 2 separation process since its performance signicantly surpasses the 2008 Robeson upper bound.In comparison to other polymeric membranes that also have surpassed the upper bound for the same purpose, such as in the case of cross-linked 6FDAdurene, [86][87][88] the SURGEL membrane could offer up to around one order of magnitude higher gas permeability with satisfactory selectivity without the requirement to operate the membrane at elevated temperature as previously conducted in PBI-based polymeric membranes to surpass the upper bound. 91inally, it is also worth to mention that, in comparison to MOF membranes, a transformation process from the SURMOF into the SURGEL membrane could greatly improve the material stability since the SURMOF has now been converted into a covalently-bound polymeric network. 37Such an improvement in the material stability could then be considered as an alternative and promising way to fully exploit the potential application of advanced materials developed from MOFs.In this case, combined with high gas permeance/permeability and satisfactory gas selectivity, the use of the SURGEL membrane in real situations is indeed preferable since the capital cost could also be signicantly reduced by having membrane systems of smaller sizes. 90

Conclusions
In this study we have successfully developed a new polymeric membrane material called SURGEL by rstly fabricating a SURMOF membrane followed by crosslinking and atom removal process.We employed an automated synthesis process combined with machine learning optimization to ensure reproducibility and high quality throughout the complete process.The optimization was performed within thirty experiments or two generations of machine learning, respectively, revealing important insights and a comprehensive understanding of the synthesis dependencies in the layer-by-layer SURMOF synthesis.The subsequent crosslinking process yielded SURMOF-CL membranes with preserved crystallinity of the templating SURMOF.Finally, the transformation of SURMOF- CL membranes into SURGEL membranes resulted in an purely organic polymeric network structure.The direct growth of the membranes on porous substrates not only circumvented the risk of damage that may occur during the substrate transfer process but also ensured full substrate coverage.
The successful direct synthesis of SURMOF, SURMOF-CL and SURGEL membranes on porous substrates enabled the systematic study of their gas separation performance.In the case of the SURMOF membrane, its gas separation performance is comparable with other MOF membranes of comparable pore aperture such as HKUST-1.The gas separation performance of the SURMOF membrane can then be substantially enhanced aer the cross-linking process, likely caused by the reduced pore size.However, this enhanced selectivity was accompanied by reduced permeability.In contrast, the transformation of the SURMOF-CL into the polymeric (SURGEL) membrane can combine both high gas permeability and good selectivity with performance well above most of the commercially available polymeric membranes.The relatively high gas permeability of the SURGEL membrane resembles similarities with rubbery polymers.The gases could diffuse relatively fast through the SURGEL membrane because of the presence of the additional void spaces within the SURGEL structure aer the removal of the metal ions.However, differing from the rubbery polymers, the gas selectivity in the SURGEL membrane still follows the Knudsen behaviour since the SURGEL membrane could maintain, to some extent, the well-dened pores of the original SURMOF membrane.In particular, the performance of the SURGEL membrane for H 2 /CO 2 separation is considerably better than other polymeric membranes since it can well surpass the 2008 Robeson upper bound limit.Even though the fabrication process of a SURGEL membrane looks more complicated than the fabrication of a MOF membrane or a MOF-MMM, there are two advantages offered by this approach.First, the gas separation performance exhibited by the SURGEL membrane looks more promising than most polymeric membranes because of its the retainment of the well-dened structure from the SURMOF.Second, the transformation of the SURMOF into SURGEL could improve the material stability since the SURMOF has now been converted into a more stable polymeric network.Both advantages could then be considered as the merit for its further development.In particular, this study has successfully shown how automation and machine learning can be used to optimize the production of this new, advanced and high-performance polymeric membrane for gas separations.

Fig. 1
Fig.1Schematic overview of the development of membranes for gas separation.First the SURMOF is optimized via machine learning on gold coated silicon wafers, then the optimized conditions are transferred on gold coated alumina substrates to fabricate a SURMOF, a crosslinked SURMOF and a SURGEL for gas separation investigation.

Fig. 2
Fig. 2 (a) Fitness development over three generations; the data points represent the fitness value for each experiment with green rhombuses for the diverse set, purple triangles for the first genetic algorithm (GA1) and blue squares for the second genetic algorithm (GA2); the bars show the average fitness of the successful experiments per generation in the same color code.(b) Exemplary X-ray diffractograms showing the comparison of a measured sample (03-GA2) with a simulated diffractogram.

Fig. 5
Fig. 5 Illustration of the unit cell and the membrane performance of the SURMOF (a), SURMOF-CL (b) and SURGEL (c).

Table 2
Parameter sets and according fitness values of all successfully rated experiments ordered by decreasing fitness values