This is the implementation for MatLLMSearch: Large Language Models Are Innate Crystal Structure Generators. This code implements an evolutionary search pipeline for crystal structure generation (CSG) and crystal structure prediction (CSP) with Large Language Models (LLMs) without fine-tuning.
install key packages in requirements.txt
conda create -n matllmsearch python=3.10
conda activate matllmsearch
conda install -c conda-forge mamba
mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install -r requirements.txt-
Meta-Llama 3.1
-
MatBench Dataset
matbench_v0.1 matbench_expt_gapDownload known stable structures with decomposition energy: Seed Structures
-
mp_patched_phase_diagram:PatchedPhaseDiagramconstructed from all MPpymatgenComputedStructureEntries. -
CHGNet model
python main.py --task csg --opt_goal e_hull_distance --max_iter 10For crystal structure prediction of Na3AlCl6:
python main.py --task csp --opt_goal e_hull_distance --max_iter 10For crystal structure prediction of Ag6O2:
python main.py --task csp --opt_goal e_hull_distance --max_iter 10 --csp_compound "Ag6O2"If you use MatLLMSearch, please cite our paper:
@article{gan2025matllmsearch,
title={Large Language Models Are Innate Crystal Structure Generators},
author={Gan, Jingru and Zhong, Peichen and Du, Yuanqi and Zhu, Yanqiao and
Duan, Chenru and Wang, Haorui and Gomes, Carla P. and Persson, Kristin and
Schwalbe-Koda, Daniel and Wang, Wei},
journal={arXiv preprint arXiv:},
year={2025}
}







