Overview of MOFGen

Our approach consists of a modular system of AI and computational agents, each defined as an entity capable of taking actions based on its environment to accelerate MOF discovery. The architecture of our system, shown in Fig. 1, is composed as follows. First, the main LLM agent, MOFMaster, serving as a model–user interface, provides three generation options: (1) generate a specified number of MOF structures without chemical information, (2) generate MOF structures containing a specific metal secondary building unit (SBU), and (3) generate MOF structures with a given chemical composition. Second, these instructions are then passed to LinkerGen (see ‘Chemical formula generation with LinkerGen’ section), an LLM chemical-composition generator leveraging in-context learning and chain of thought42 on all experimental MOF organic linkers reported, and which produces MOF chemical formulae based on the constraints provided by MOFMaster.

Fig. 1: Overview of MOFGen.Fig. 1: Overview of MOFGen.

(1) MOFMaster: manages the overall system and serves as a user interface. (2) LinkerGen: an in-context learning LLM agent that proposes chemical compositions. (3) CrystalGen: a denoising-diffusion probabilistic model conditioned on chemical compositions that generates crystal structures. (4) QForge: a sequence of geometry optimization and Monte Carlo sampling to filter nonporous structures. (5) SynthABLE: decomposes the diffusion-generated MOFs into their building blocks and assesses synthesizability using multifidelity rules and machine learning-based predictors. (6) QHarden: a sequence of medium-to-high-level quantum mechanical geometry optimization and formation-energy evaluation, from PBE-D4 to r2SCAN-D4. (7) SynthGen: a high-throughput synthesis platform to synthesize MOF, combined with an LLM synthesis planning system, the crystals are then passed through SCXRD or PXRD for charaterization and added to the pool of experimental structures.

Third, the generated formulae are served as inputs to CrystalGen (see ‘Crystal structure generation with CrystalGen’ section), which is a chemical composition-conditioned, all-atom, denoising-diffusion probabilistic model for crystal structure generation, trained on both all experimentally reported MOF crystal structures and a curated set of computational structures selected based on chemical and topological diversity. Fourth, the diffusion-generated structures are subjected to a series of geometry optimization and filtering steps through a low-level quantum mechanical agent, QForge (see ‘Prescreening and filtering with QForge’ section). Fifth, SynthABLE decomposes each MOF into its building blocks and evaluates their synthesizability using multilevel fidelity synthetic rules and machine learning synthesizability predictors (see ‘Synthesizability assessment with SynthABLE’ section). Sixth, the remaining candidates are further refined by a high-level quantum mechanical agent, QHarden (see ‘Final optimization with QHarden’ section), which performs successive geometry optimizations ranging from PBE-D4 to the higher-level r2SCAN-D4 levels. Seventh, SynthGen ranks the most likely-to-be-synthesized MOF candidates, which are subsequently validated through our high-throughput synthesis platform, powered by LLM-guided synthesis planning and characterized using single-crystal X-ray diffraction (SCXRD) or powder X-ray diffraction (PXRD) (see ‘Experimental validation with SynthGen’ section).

Chemical formula generation with LinkerGen

A dedicated LLM agent, LinkerGen, is used to generate organic linker chemical formulae. The agent is prompted with chemical representations, such as the simplified molecular-input line-entry system (SMILES)43,44, extracted from the experimental databases through an in-context learning strategy using chemical constraints with desired metal SBU formula. We tested several strategies: (1) chemical formula → SMILES and (2) SMILES → SMILES. Our analysis shows that the SMILES-to-SMILES strategy exhibits the highest success rate of generating valid linkers (Supplementary Information, section 2). We used chain-of-thought prompting strategies to impose constraints on chemical formula generation, ensuring correct stoichiometric ratios as well as metal SBUs. A zero-shot generation strategy without linker context resulted in chemical formulae heavily biased toward commonly reported linkers, with Synthetic Complexity Score (SCScore) analysis exhibiting a narrow peak at 1.84, lower than the broader experimental distribution centered around 2.47. In comparison, when our in-context learning approach combined with chain-of-thought prompts was used, the resulting SCScore distribution was similar to experimental data, with an average value of 2.47. Once generated, the organic linker formulae are then concatenated with metal SBU formulae, using the correct stoichiometric ratios. To enhance structural complexity, supercell formulations are also generated by scaling the number of total atoms, linkers and metal SBUs, with a maximum of 256 atoms, the upper atom limit that CrystalGen can target. The resulting database of chemical formulae serves as the input for downstream diffusion-based structure generation for CrystalGen.

Crystal structure generation with CrystalGen

Owing to their large size and complex three-dimensional frameworks, MOFs present a substantially greater challenge for diffusion models compared to typical inorganic crystals, which usually contain fewer than a dozen atoms per unit cell. Currently, because diffusion models can scale only to tens of atoms, their use to MOFs has relied either on coarse graining the structure into its building blocks or on performing diffusion on the organic linkers, thus missing local atomic information17,27,45. In addition, while our strategy may impose practical constraints on system size compared to coarse-grained approaches, it does not require any predefined coarse-graining scheme, hyperparameter tuning or structure-specific preprocessing as it relies solely on atomic coordinates. This provides greater flexibility and enables broader exploration of chemical space. To effectively manage this complexity and enable all-atom diffusion-based generation, we represent each MOF structure as a point cloud (Supplementary Information, section 3). Specifically, a MOF containing A atoms is encoded into a matrix of shape [A, 4], where the first three columns represent the fractional coordinates and the fourth column encodes the atomic number. CrystalGen initializes the structure using 256 atoms with random atomic number and random locations. During the denoising-diffusion process, CrystalGen removes irrelevant atoms and moves relevant atoms to probable locations, under the formulae guidance through classifier-free guidance. CrystalGen was trained from the combined experimental and computational databases discussed in the ‘Database curation and training set formation’. This enables the generation of crystal structures with almost all synthetically-accessible metal SBUs and organic linkers chemical compositions. In this study, we focused on zinc-based frameworks owing to their widespread application and proven suitability for large-scale production46,47. However, their popularity makes the discovery of structures even more challenging. Given a chemical formula proposed by LinkerGen using zinc SBUs (Zn4O), CrystalGen generates ten candidate structures per formula, resulting in a database of 259,559 predicted MOF structures. The size of this database is comparable to other state-of-the-art generative databases for inorganic materials15,16,24,29, underscoring the effectiveness of point-cloud-based approaches in capturing the geometric and chemical diversity inherent to MOFs.

Prescreening and filtering with QForge

Given that structures generated by diffusion models deviate from equilibrium, a low-level quantum mechanical agent, QForge, is used for prescreening (Methods).

As MACE-MP-0 has so far been validated primarily for static properties, its direct application to MOF structure optimization is nontrivial. Nevertheless, it successfully optimized 251,118 candidate structures, defined as structures that converged within the specified optimization criteria (Supplementary Information, section 4). This step quickly brings most structures close to equilibrium, effectively eliminating chemically unreasonable structures. An additional screening step with Zeo++, using identical criteria, retains 72% of these structures. Neither MACE-MP-0 nor GFN1-xTB has previously been applied at large scale for MOF relaxation, notably MACE-MP-0 has been mainly used for static or small-scale dynamical computations48,49. Here, we demonstrate that the sequential application of both methods yields reliable geometrical structures that could be used in tandem with diffusion models or high-throughput screening for MOFs.

Synthesizability assessment with SynthABLE

Predicting the synthesizability of a MOF is inherently challenging and lacks a universal solution. Indeed, the synthesizability of a given compound strongly depend on the synthesis conditions (for example, solvent, temperature and concentration) and a MOF that is accessible under a set of conditions may not be attainable under another50,51. One approach is to assess the synthesizability of individual components, such as organic linkers. After structures pass QForge, each MOF is decomposed into its building blocks, which are subsequently fed to SynthABLE. This process results in approximately 180,000 unique organic linkers, with only 73 previously experimentally reported. A large fraction of the linkers possess two carboxylate groups, a common feature in zinc-based MOF due to the strong coordination preference of zinc for bidentate carboxylates. In addition, most linkers are aromatic and do not contain pyridine, consistent with experimental trends. Initially, our agent leverages machine learning-driven predictions from the Allchemy software52,53,54, indicating that 92.7% of a randomly selected batch of 26,561 linkers are synthesizable or at least synthesizable with moderate difficulty (Fig. 2b). To evaluate this prediction, we implement a human-in-the-loop approach through a blind survey involving experimentalists (Supplementary Information, section 8). Each experimentalist independently evaluated a set of linkers predicted by the machine learning algorithm to be either synthesizable or nonsynthesizable.

Fig. 2: Analysis of MOF organic linkers with SynthABLE.Fig. 2: Analysis of MOF organic linkers with SynthABLE.

Analysis of the 80,968 organic linkers extracted from the diffusion-generated MOF crystal structures using MOFid10 after optimization and filtering through QForge. a, The t-distributed stochastic neighbor embedding (t-SNE) projection88 of diffusion-generated MOF linkers. For each molecule, the mean and standard deviation of atomic descriptors from the MACE-OMAT-0 model were computed to form a unified representation, which served as input to the t-SNE algorithm. b, Synthesizability assessment of the 26,561 organic linkers with the machine learning-powered Allchemy software. c, SCScore40, SA score89 and BR-SAScore score distributions of the diffusion-generated organic linkers (diffusion model + LLM), compared to the curated experimental database (see ‘Database curation and training set formation’ section) and the initial LLM-generated linkers chemical formula used as input to the diffusion model.

Source data

We found that the experimentalists consistently identified the nonsynthesizable linkers with high accuracy (67–100%), while being more conservative toward synthesizable linkers with a substantially lower recall (21–64%, mean of ~40%) (Supplementary Tables 1 and 2 and Supplementary Fig. 2).

Assuming the experimentalist assessments provide a more reliable estimate of true synthesizability, these results indicate that the machine learning model could be overly optimistic regarding the synthesizability of linkers. Nonetheless, even under a conservative assumption that only 40% of the generated linkers are truly synthesizable, there would still be approximately 50,000 viable linkers, a number that greatly surpasses the number of reported linkers so far55. Furthermore, we focused on zinc-based MOFs with reported SBUs (for example, paddlewheel and tetrahedral motifs) for ease of synthesis, narrowing the candidate set to 80,000 linkers. Synthesizability is further quantified using scoring functions, including SA scores, SCScore, SMILES length and the developed BR-SAScore56 (Fig. 2c) that show that the generated linkers exhibit synthesizability scores comparable to experimental. Compared to organic linkers generated by LLM-based methods (Fig. 2a), our diffusion-based approach yields chemical distribution that not overlap experimental data but also span a much broader chemical space, while preserving synthesizability through synthesis scores. Further analysis about the length of MOFGen-generated organic linkers compared to experimental and purely LLM generated can be found in Supplementary Fig. 6.

Final optimization with QHarden

The top MOF candidates possessing synthesizable linkers are then refined by the high-level quantum mechanical agent, QHarden. A multistep cleaning process first verifies that interatomic distances match experimental values. Floating atoms, molecular fragments and other artifacts are removed from the crystal structures. The structures then undergo a two-stage DFT optimization using the Vienna ab initio simulation package: an initial coarse geometry optimization using the PBE functional with D4 dispersion correction, followed by a tight optimization with r2SCAN-D4. Although r2SCAN has not been applied to MOF systems owing to computational cost, our workflow produces a final database of 3,000 DFT-optimized MOF structures, accumulated over 30,000 DFT ionic relaxation steps. This constitutes one of the largest and most accurate MOF databases, thus enabling further use in the development of the next generation of MLIP for MOFs. We further assessed the mechanical and thermal stability of our DFT-optimized MOFs using machine learning predictors for decomposition temperature and solvent-removal stability41. As shown in Fig. 3a, our structures exhibit a sharp decomposition temperature peak around 341 K with a small standard deviation, closely matching (or slightly improved) experimental averages. The stability upon solvent removal is similarly enhanced (average value of 0.88 compared to 0.65 in the QMOF database; Fig. 3b).

Fig. 3: Analysis of MOF crystal structures selected by QHarden.Fig. 3: Analysis of MOF crystal structures selected by QHarden.

a–c, Predicted decomposition temperature distribution (Td) (a), MACE-MP-0b computed bulk modulus distributions (b) and stability upon solvent removal41 (c) for the experimental MOF structures (QMOF database10) (blue), the QMOF subset with chemical compositions matching diffusion-generated MOFs as well as pcu topology (pink) and the diffusion-generated MOFs, denoted diffusion model + LLM (orange). d, Formation energy computed at the r2SCAN-D4 level for diffusion-generated MOFs compared to the Materials Project data. e, Representative samples of the ‘AI-dreamt’ MOFs as well as their corresponding name and topologies.

Source data

To further assess the mechanical stability we computed the bulk moduli with the MACE-MP-0 model (Fig. 3c). This represents an early large-scale application of MACE-MP-0 for bulk modulus evaluation, providing a computationally efficient alternative to DFT computations (Supplementary Information, section 7). Our analysis reveals that the model has tendency to generates structures with small bulk moduli, indicative of enhanced dynamical flexibility or ‘breathing’ behavior57,58,59. This dynamic pore adjustment can optimize guest–host interactions, improving selectivity in gas storage and separation (for example, CO2, CH2 and H2), catalysis, sensing (pressure sensors and actuators) and controlled drug release60. Furthermore, formation-energy calculations show that diffusion-generated zinc-based MOFs have close distribution with the Materials Project data (Fig. 3d), while having different chemical composition. To evaluate the predictive capability and generalizability of MOFGen, we also compared it with diffusion-generated MOF but with other metal SBUs (Supplementary Information, section 6). Most of the generated MOFs exhibit negative formation energies, suggesting physical stability. In summary, all of these criteria—thermal, chemical, physical and mechanical metrics—underscore the efficacy of our agent-based architecture in generating stable, synthesizable MOF structures with various topologies and chemistry (Fig. 3d).

Experimental validation with SynthGen

To reduce our set of organic linkers to those with high confidence in synthetic accessibility, we retained only MOFs containing a single type of linker, excluded linkers not previously reported in experimental databases, selected linkers containing at least two carboxylate groups and partially or fully aromatic backbones, and finally restricted to MOFs incorporating only known and already synthesized metal SBUs. Then, we ranked them by their likely-to-be-synthesized basis, which reduces the set to 349 high-confidence organic linkers, which are subsequently selected by experimentalists for high-throughput synthesis. From this set of linkers predicted by our system, we experimentally validated four of ‘AI-dreamt’ MOFs, referred to as the AI-MOF series (Methods), following a three conceptual synthesis strategies: (1) crossover mutation synthesis, where previously synthesized organic linkers are combined with different metal SBUs (for example, from aluminum to zinc) to explore geometries and applications; (2) reimagination synthesis, analogous to creative arts and image generation, in which organic linkers serve as inspiration and undergo subtle modifications by expert to enhance synthesizability or target performance; and (3) de novo synthesis, directly synthesizing MOF with ‘AI-dreamt’ linker designs (Fig. 4). The synthesis conditions were systematically screened and optimized using an automated robotic platform, enabling efficient high-throughput experimentation by optimizing parameters such as the metal-to-linker ratio, concentration of starting materials and temperature.

Fig. 4: Synthesis strategies and crystal structures of MOFs.Fig. 4: Synthesis strategies and crystal structures of MOFs.

Overview of the synthesized MOFs, alongside the crystal structures, PXRD patterns with experimental (red), simulated (black) and organic linkers. After filtering the crystal structures with QHarden, the organic linkers of top MOF candidates were extracted and synthesized.

Source data

Crossover mutation synthesis

We find that MOFGen rediscovered organic linkers that are already reported in the MOF literature. For example, trans,trans-munconic acid, one of the linkers generated by our model, has been used in a reported aluminum MOF61. Here, we sought to explore whether the same linker could produce structures when combined with a different metal node. To demonstrate this, we attempted the synthesis of zinc-based MOFs using trans,trans-muconic acid. Through a solvothermal method where the linker and zinc nitrate hexahydrate were reacted in N,N-dimethylformamide (DMF) at 100 °C for 24 h, we obtained crystals of AI-MOF-1 (Methods). The PXRD of AI-MOF-1 was measured to confirm that AI-MOF-1 was successfully synthesized (Fig. 4). AI-MOF-1 is an isoreticular expansion of MOF-5.

Reimagination synthesis

Inspired by art and image generation, we introduce a strategy termed reimagination synthesis, in which AI-generated organic linkers serve as inspiration, then are refined by chemists through slight structural modifications, like a sketch. For example, one of the diffusion-generated linkers (Fig. 4), chrysene—a polycyclic aromatic hydrocarbon (PAH) that is challenging to synthesize—was modified from four to five-ring PAH to form commercially available perylene. AI-MOF-2 was synthesized by reacting perylene-3,9-dicarboxylic acid and zinc nitrate hexahydrate in N,N-diethylformamide (DEF) at 120 °C (Methods). Red, block-shaped crystals precipitate after 16 h. Experimental PXRD patterns matched well with the simulated structure. Notably, this represents a MOF incorporating this particular PAH, not targeted previously, probably because the linker has low solubility due to π–π stacking aggregation. AI-MOF-2 exhibits the same topology as MOF-5.

De novo synthesis

To further demonstrate the predictive and discovery capabilities of MOFGen, we used a de novo synthesis strategy, synthesizing MOFs from synthetically unreported organic linkers (Methods). The linker 2,3-dimethyl-2-butenedioic acid was chosen for its high synthesizability and its frequent generation by our models. Using microwave-assisted synthesis, the linker and zinc nitrate hexahydrate were dissolved in DEF in a sealed microwave vial and heated to 100 °C for 1 h. The reaction successfully yielded a colorless crystalline product (AI-MOF-3), whose experimental PXRD patterns match with the simulated one.

We also performed an additional experiment with the sample linker and metal salt but using DMF as the solvent. Specifically, 2,3-dimethylfumaric acid and zinc nitrate hexahydrate were dissolved in DMF and heated at 120 °C for 16 h (Methods). The reaction resulted in single crystals of AI-MOF-4. SCXRD revealed that two DMF molecules coordinate to the zinc SBUs distorting the symmetry from cubic to orthorhombic. This coordination mode is unique as it has not been reported for zinc SBUs. This coordination flexbility around the Zn2+ ions has been investigated in MOF-5 using different spectroscopic techniques62. However, it has not been observed in the SCXRD structure. In addition, removing the coordinated DMF could create open metal sites beneficial for hydrogen storage, CO2 capture and catalytic applications63,64.

The successful synthesis of the MOF containing the deprotonated form of 2,3-dimethyl-2-butenedioic acid under two different experimental conditions correlates with the frequent generation of this linker by the model. Furthermore, each of these experimentally validated crystal obtained closely matched the diffusion-generated structure with MOF-5 topology. It is worth noting that the previous AI-MOFs exhibit MOF-5 topologies due to the filtering rules on reported zinc SBUs. However, as shown in Fig. 3, MOFGen is able to generate a variety of topology that could be used for future experiments.

To further illustrate the versatility of diffusion-generated linkers with different metals, we synthesized an aluminum-based framework (AI-MOF-5) with 2,3-dimethyl-2-butenedioic acid. The organic linker and aluminum chloride hexahydrate were reacted in a DMF–water mixture heated at 100 °C for 24 h to obtain solid white powders. The PXRD has a well-defined peak at 7.58° (Methods), suggesting a large unit cell of a typical aluminum MOF65,66. Although we were not able to simulate its crystal structure, the combination of aluminum–metal SBUs with hydrophobic dimethyl functional groups on the linker may allow the adjustment of the position of the onset in water sorption isotherms, potentially broadening the use of AI-MOFs in water harvesting65,66.

Finally, we also attempted to use the linker suggested by our diffusion model to synthesize mixed-linker MOFs in combination with 1,2,4-triazole by taking inspiration from the CALF-20 (ref. 1). AI-MOF-6 was synthesized by reacting 1,2,4-triazole with aminomalonic acid and zinc nitrate hexahydrate in a mixture of ethanol and water, yielding white crystals. The PXRD patterns of AI-MOF-6 and exhibited primary peaks below 2θ = 10°, suggesting that the crystalline products possess large unit cells and could be MOFs (Supplementary Figs. 21 and 22). Similarly, AI-MOF-7 was synthesized by reacting 1,2,4-triazole, tartronic acid and zinc nitrate hexahydrate in ethanol and water, also resulting in white crystals. The structure of AI-MOF-7 was able to be solved by SCXRD. The structure is a three-dimensional network composed of zinc ion and tartronate (Supplementary Figs. 23 and 24). This shows how MOFGen can be used for a mixed-linker combination to further enhance the combinatorial possibility of our MOF database.