TL;DR
MOF-LLM is the first Large Language Model framework designed for block-level structure prediction of Metal-Organic Frameworks (MOFs). By combining spatial-aware pre-training, structural fine-tuning, and matching-driven reinforcement learning, it achieves state-of-the-art accuracy while generating stable 3D structures in just 0.04 seconds per structure. This approach effectively bypasses the scalability bottlenecks of traditional atomistic modeling, opening up new avenues for high-throughput materials discovery.
What Problem Does This Paper Address?
Metal-Organic Frameworks (MOFs) are highly porous crystalline materials with massive potential in fields like carbon capture, hydrogen storage, and drug delivery. Their versatility comes from their modular architecture: inorganic metal nodes and organic linkers assemble into periodic 3D networks. Because scientists can swap out these components in millions of combinations, finding the optimal structure via traditional laboratory trial-and-error is practically impossible.
While computational Crystal Structure Prediction (CSP) helps accelerate this process, traditional deep learning models and recent atom-level Large Language Models (LLMs) hit a wall when applied to MOFs. A single MOF unit cell can contain hundreds of atoms. Representing these systems atom-by-atom results in excessively long text strings that overwhelm an LLM's context window. Furthermore, LLMs inherently struggle with precise 3D spatial reasoning—particularly spatial rotations—frequently predicting physically impossible structures with overlapping atoms or disconnected components.
Methods
To overcome the complexity of atomistic representations, the authors adopt a block-wise generation paradigm, treating MOFs like microscopic LEGO sets. Instead of predicting individual atomic coordinates, the model predicts the placement and orientation of rigid building blocks.
The authors developed MOF-LLM, built on a Qwen-3 8B backbone, utilizing a unique three-stage training pipeline:
- Spatial-aware Continual Pre-training (CPT): To bridge the semantic gap between 1D text and 3D space, the authors augment the text descriptions of building blocks with explicit geometric descriptors. These include molecular weights, topology codes, principal component analysis (PCA) spans (acting as bounding boxes), and vectors representing the principal axes before and after rotation.
- Structural Supervised Fine-Tuning (SFT): The model is trained to autoregressively predict the global lattice parameters and the block-wise roto-translations. Blocks are represented by canonical SMILES strings, translations by fractional coordinates, and 3D rotations by LLM-friendly Euler angles (roll, pitch, yaw).
- Matching-driven Reinforcement Learning (RL): Standard SFT cross-entropy loss only evaluates token-level accuracy, failing to ensure global physical plausibility. The authors introduce an RL stage using Soft Adaptive Policy Optimization (SAPO). The model generates candidate structures, which are evaluated against stable reference structures using
pymatgen's structure matching tool. High-precision generations receive a bonus reward, while physically unstable structures (like those with block collisions) are penalized.
Datasets
The framework was trained and evaluated on a massive dataset of 324,426 computationally generated hypothetical MOFs originally introduced by Boyd et al. (2019) for carbon capture screening. The authors utilized a preprocessed version from Kim et al. (2024), where the structures were converted into block-level representations using the metal-oxo algorithm. Structures containing more than 200 blocks were filtered out, and the remaining data was split into an 8:1:1 ratio for training, validation, and testing.
Key Insights and Ideas
- Modular Assembly Beats Atomistic Generation: Shifting the problem from predicting individual atoms to assembling pre-defined rigid blocks dramatically reduces the dimensionality of the design space, making complex crystal generation feasible for LLMs.
- Euler Angles are LLM-Friendly: While 3D rotations are often represented via axis-angle vectors or rotation matrices in deep learning, the authors discovered that Euler angles are significantly easier for text-based LLMs to learn and generate accurately.
- RL Enforces Physical Constraints: Token-by-token text prediction cannot inherently understand physical boundaries. Introducing a global structural reward via reinforcement learning acts as a vital guardrail, successfully teaching the LLM to avoid block collisions and structural disconnections.
Key Results
- State-of-the-Art Accuracy: MOF-LLM achieved a 35.78% match rate under a strict site tolerance (stol = 0.5) and 93.25% under a more lenient tolerance (stol = 1.0), outperforming top denoising diffusion models (like MOF-BFN and MOFFlow) and crushing atom-level LLM baselines (PLaID++), which scored near 0% on strict matching.
- Blazing Fast Inference: Unlike diffusion models that require iterative denoising steps, MOF-LLM generates structures autoregressively in a single pass, taking just 0.04 seconds per structure.
- Superior Scalability: As the size of the MOF systems grew (>800 atoms or >7 building blocks), the performance gap between MOF-LLM and traditional baselines widened significantly, demonstrating its robustness for complex, real-world materials.
Limitations and Future Work
Despite its strong performance, the authors note a few key limitations:
- Rigid Body Assumption: The framework treats all building blocks as perfectly rigid entities, ignoring the conformational flexibility that organic molecules exhibit in reality.
- Geometric Information Loss: Flattening complex 3D molecular geometries into 1D SMILES strings inherently discards fine-grained spatial details. Developing native 3D tokenization methods remains an open challenge.
- Lack of Explicit Reasoning: The model directly outputs the final structure coordinates. Integrating explicit Chain-of-Thought (CoT) reasoning could improve the model's interpretability and complex spatial planning capabilities.
Summary updated