MDAgent2: Large Language Model for Code Generation and Knowledge Q&A in Molecular Dynamics
Not on the map. Why?
Abstract (arXiv)
Molecular dynamics (MD) simulations are essential for understanding atomic-scale behaviors in materials science, yet writing LAMMPS scripts remains highly specialized and time-consuming tasks. Although LLMs show promise in code generation and domain-specific question answering, their performance in MD scenarios is limited by scarce domain data, the high deployment cost of state-of-the-art LLMs, and low code executability. Building upon our prior MDAgent, we present MDAgent2, the first end-to-end framework capable of performing both knowledge Q&A and code generation within the MD domain. We construct a domain-specific data-construction pipeline that yields three high-quality datasets spanning MD knowledge, question answering, and code generation. Based on these datasets, we adopt a three stage post-training strategy--continued pre-training (CPT), supervised fine-tuning (SFT), and reinforcement learning (RL)--to train two domain-adapted models, MD-Instruct and MD-Code. Furthermore, we introduce MD-GRPO, a closed-loop RL method that leverages simulation outcomes as reward signals and recycles low-reward trajectories for continual refinement. We further build MDAgent2-RUNTIME, a deployable multi-agent system that integrates code generation, execution, evaluation, and self-correction. Together with MD-EvalBench proposed in this work, the first benchmark for LAMMPS code generation and question answering, our models and system achieve performance surpassing several strong baselines.This work systematically demonstrates the adaptability and generalization capability of large language models in industrial simulation tasks, laying a methodological foundation for automatic code generation in AI for Science and industrial-scale simulations. URL: https://github.com/FredericVAN/PKU_MDAgent2
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 21 of its 39 references that are in the map. First posted on arXiv 5 Jan 2026.
Builds on
21 of 39 references.
References · 21
- 2023GPT-4 Technical Reportcited by 18,132
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Deduplicating Training Data Makes Language Models Bettercited by 705
- 2023ChemCrow: Augmenting large-language models with chemistry toolscited by 609
- 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 475
- 2025A Survey of Reinforcement Learning for Large Reasoning Modelscited by 175
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
- 2025Med-R1: Reinforcement Learning for Generalizable Medical Reasoning in Vision-Language Modelscited by 144
- 2019Machine learning for molecular simulationcited by 109
- 2023MatterGen: a generative model for inorganic materials designcited by 98
- 202314 Examples of How LLMs Can Transform Materials Science and Chemistry: A Reflection on a Large Language Model Hackathoncited by 85
9 more
- 2024Enhancing Code LLMs with Reinforcement Learning in Code Generation: A Surveycited by 82
- 2024Fine-tuning large language models for domain adaptation: Exploration of training strategies, scaling, model merging and synergistic capabilitiescited by 67
- 2024HoneyComb: A Flexible LLM-Based Agent System for Materials Sciencecited by 56
- 2025QoQ-Med: Building Multimodal Clinical Foundation Models with Domain-Aware GRPO Trainingcited by 38
- 2023Efficient Continual Pre-training for Building Domain Specific Large Language Modelscited by 33
- 2025MDCrow: Automating Molecular Dynamics Workflows with Large Language Modelscited by 22
- 2025Fine-tuning a Large Language Model for Automating Computational Fluid Dynamics Simulationscited by 18
- 2022DiSCoMaT: Distantly Supervised Composition Extraction from Tables in Materials Science Articlescited by 17
- 2025Assessing the Chemical Intelligence of Large Language Modelscited by 14
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026QUASAR: A Universal Autonomous System for Atomistic Simulation and a Benchmark of Its Capabilitiescited by 6
- 2026MDGYM: Benchmarking AI Agents on Molecular Simulationscited by 3
- 2026MDForge: Agentic Molecular Dynamics Pipeline Design under Sparse Simulator Feedbackcited by 2
- 2026MDArena: Evaluating Coding Agents on Realistic Molecular Dynamics Workflowscited by 2
- 2026Auto-Configuring Scientific Simulators with Lightweight Coding-Agent Adapterscited by 1
- 2026Molecular LLM Agents: From Architectural Design to Scientific Autonomycited by 0
- 2026Molecular LLM Agents: From Architectural Design to Scientific Autonomy24 Aug 2026
- 2026MDArena: Evaluating Coding Agents on Realistic Molecular Dynamics Workflows31 Jul 2026
- 2026MDForge: Agentic Molecular Dynamics Pipeline Design under Sparse Simulator Feedback11 Jun 2026
- 2026Auto-Configuring Scientific Simulators with Lightweight Coding-Agent Adapters8 Jun 2026
- 2026MDGYM: Benchmarking AI Agents on Molecular Simulations9 May 2026
- 2026QUASAR: A Universal Autonomous System for Atomistic Simulation and a Benchmark of Its Capabilities30 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2026Evaluating LLM-generated code for domain-specific languages: molecular dynamics with LAMMPS
- 2026Agent-MD: Selective LLM Intervention with Event-Driven Escalation for Stateful GCMC--MD Campaigns
- 2025MarS-FM: Generative Modeling of Molecular Dynamics via Markov State Models
- 2026EvoMD-LLM: Learning the Language of Species Evolution in Reactive Molecular Dynamics
- 2025Reasoning-Enhanced Large Language Models for Molecular Property Prediction
- 2025Chain-of-Generation: Progressive Latent Diffusion for Text-Guided Molecular Design
- 2025ChemATP: A Training-Free Chemical Reasoning Framework for Large Language Models
- 2024LLaMP: Large Language Model Made Powerful for High-fidelity Materials Knowledge Retrieval and Distillation