ChemGraph-XANES: An Agentic Framework for XANES Simulation and Curation
Authors: Vitor F. Grizzi, Thang Duc Pham, Luke N. Pretzie, Jiayi Xu, Murat Keceli, Cong Liu
Organizations: Chemical Sciences and Engineering Division Argonne National Laboratory, Lemont, IL 60439, USA · Computational Science Division Argonne National Laboratory, Lemont, IL 60439, USA
Abstract
Computational X-ray absorption near-edge structure (XANES) is widely used to interpret local coordination environments, oxidation states, and electronic structure in chemically complex systems. In practice, routine computational XANES at scale is often constrained by workflow complexity rather than by the simulation method. We present ChemGraph-XANES, a large-language-model (LLM)-based agentic framework for XANES simulation and analysis that combines retrieval-augmented generation (RAG)-assisted parameter selection from documentation, schema-constrained tool execution, deterministic FDMNES input generation, and provenance-aware data curation. The framework supports both direct scripted execution and natural-language orchestration, with both modes routed through a deterministic backend for structure handling, absorber and edge specification, input generation, execution, spectral extraction, and post-processing. We demonstrate three proof-of-capability use cases: RAG-assisted selection and propagation of FDMNES input parameters, structure-file-based execution, and chemistry-level natural-language specification of absorber and composition requests. In a recorded trace, a simulation parameter is retrieved from the FDMNES manual by the RAG-enabled agent and propagated into a schema-validated tool call, illustrating traceable parameter selection. We further show that the same execution pathway supports both explicit local structures and chemistry-level user inputs. Because XANES calculations are independent once inputs are defined, ChemGraph-XANES is designed to support task-parallel execution and the creation of structure-linked XANES collections. ChemGraph-XANES therefore serves as a practical agentic framework for computational spectroscopy and data generation, emphasizing constrained orchestration, reproducibility, and traceable outputs.
Large Language Models (LLMs) are increasingly embedded in agentic frameworks for scientific discovery. First-principles materials computation imposes a demanding standard for autonomy: successful execution depends on internally consistent inputs, supervision of long-running calculations, and verified outputs. Here we present VASP Agent, a coding-agent-centered system that combines reusable domain skills, deterministic tools, workspace-state inspection, runtime evidence, and scientific guardrails to execute multi-step VASP calculations. The system is evaluated across multiple tasks including structural relaxation, bandgap calculation, equilibrium lattice constant determination, and CO/Pt(111) adsorption. VASP Agent completes all evaluated cases, and its computed numerical results are compared with those obtained using pymatgen and other agentic tools. When large deviations occur, the calculation parameters produced by VASP Agent are more appropriate than those produced by LLM-based workflows. Failure analysis shows that errors that terminate fixed pipelines can be diagnosed and recovered under agentic control.
Foundational machine-learning interatomic potentials (MLIPs) are transforming atomistic simulations by achieving near-ab initio accuracy across large chemical spaces at a fraction of the computational cost. A central challenge in using these tools for high-throughput property calculations is translating high-level scientific intent into adaptive simulation campaigns without compromising workflow rigour. We introduce El Agente Potente, an agentic system that combines typed execution graphs with a complementary coding mode for MLIPs-driven atomistic simulations. Typed execution graphs provide structured and provenance-aware execution for standardized workflows, with large language models (LLMs) restricted to planning and routing while deterministic Python components perform scientific computation and validation. Complementing this structured execution, a coding agent constructs customized workflows for tasks requiring greater procedural flexibility while invoking existing Potente functions for supported calculations. We demonstrate El Agente Potente across computational materials discovery, molecular energy-landscape exploration, adsorption, and catalytic reaction workflows, together with systematic benchmarks of reproducibility and LLM token cost. These results establish typed execution graphs and code-based workflow construction as complementary mechanisms for agentic scientific computing, combining controlled, auditable execution with the flexibility required for customized atomistic simulations
Spectroscopic structure elucidation is central to molecular analysis, but recent Large Language Model (LLM)-based methods mostly formulate it as direct spectrum-to-SMILES generation. Although this paradigm can leverage paired spectral data, it does not explicitly model the analytical workflow used by spectroscopists, such as diagnostic peak interpretation, fragment reasoning, formula constraints, and chemical consistency checking. In this paper, we introduce S3C-LLM, a skill-guided and code-grounded agentic LLM for spectrum-to-structure elucidation. Rather than directly predicting a molecule, S3C-LLM retrieves modality-specific spectroscopy skills, executes analysis code to instantiate these skills on the input spectra, and integrates the resulting peak-level evidence and formula constraints before generating SMILES. Specifically, we contribute a self-evolving spectroscopy skill library, a thinking-augmented skill-code trajectory construction pipeline, and a two-stage training strategy that teaches Qwen3-4B through supervised fine-tuning (SFT) followed by our proposed step-level reinforcement learning (RL). Experiments on diverse benchmarks show that S3C-LLM consistently outperforms current general LLMs and spectrum-specific models across spectra, while using less than 1/10th of SpectraLLM's training corpus.