๐ค AI Summary
This work addresses the challenge of balancing automation and intelligent intervention in long-timescale molecular simulations, where traditional rule-based systems struggle with complex anomalies and fully LLM-driven approaches suffer from inefficiency and irreproducibility. To overcome these limitations, we propose Agent-MD, a hybrid framework that integrates a rule engine with an event-driven, large language model (LLM) for selective intervention: deterministic agents handle routine tasks, while the LLM is invoked only upon critical events to perform controlled reasoning and decision-making. Structured evidence logging and state recording ensure reproducibility and auditability. The framework successfully executed 120 rounds of GCMC-MD hybrid simulations across 15 systemโhumidity combinations, triggering LLM review just once. It revealed that Ca-montmorillonite retains more interlayer water and exhibits a larger basal spacing under low humidity, demonstrating both scientific validity and technical superiority.
๐ Abstract
Long-running molecular simulation campaigns require repeated continuation from saved states, provenance-aware progression, adaptive assessment, and occasional interpretation of workflow conditions that cannot be resolved safely by fixed rules. Here, we present Agent-MD, a framework that places large language model (LLM) reasoning selectively at campaign construction and event-triggered review, while routine simulation, analysis, continuation, archiving, and state progression are handled by a persistent rule-based campaign agent using approved policies and explicit state records. Agent-MD was demonstrated in a grand canonical Monte Carlo-molecular dynamics (GCMC-MD) water-vapor desorption campaign comprising five montmorillonite systems and three sequential relative-humidity states (RH = 0.9-0.3-0.1). Across 15 system-RH states, the workflow completed 120 segmented simulation cycles with state-specific sampling lengths and provenance-aware restart inheritance. Routine production required no live reasoning-agent invocation, while one state reached a review boundary; two preserved incidents were subsequently evaluated through blinded reasoning-agent replay, which identified the underlying workflow problems and recommended appropriate follow-up actions. The simulations also revealed distinct composition-dependent low-RH responses, with Ca-bearing montmorillonite retaining more interlayer water and maintaining a larger basal spacing than the Na- and K-bearing systems, while the highest-charge Na system retained more residual water under dry conditions. These results demonstrate that long-running scientific workflows need not place every operation inside an LLM reasoning loop: selective reasoning can instead be combined with deterministic execution, structured evidence, and validated control handoffs to provide reproducible and auditable agent-assisted molecular simulation.