Open Access Article
Lijie
Ding
*a,
Jan-Michael
Carrillo
b and
Changwoo
Do
*a
aNeutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN 37831, USA. E-mail: dingl1@ornl.gov; doc1@ornl.gov
bCenter for Nanophase Materials Sciences, Oak Ridge National Laboratory, Oak Ridge, TN 37831, USA
First published on 27th January 2026
We introduce ToPolyAgent, a multi-agent AI framework for performing coarse-grained molecular dynamics (MD) simulations of topological polymers through natural language instructions. By integrating large language models (LLMs) with domain-specific computational tools, ToPolyAgent supports both interactive and autonomous simulation workflows across diverse polymer architectures, including linear, ring, brush, and star polymers, as well as dendrimers. The system consists of four LLM-powered agents: a Config Agent for generating initial polymer–solvent configurations, a Simulation Agent for executing LAMMPS-based MD simulations and conformational analyses, a Report Agent for compiling markdown reports, and a Workflow Agent for streamlined autonomous operations. Interactive mode incorporates user feedback loops for iterative refinements, while autonomous mode enables end-to-end task execution from detailed prompts. We demonstrate ToPolyAgent's versatility through case studies involving diverse polymer architectures under varying solvent conditions, thermostats, and simulation lengths. Furthermore, we highlight its potential as a research assistant by directing it to investigate the effect of interaction parameters on the linear polymer conformation, and the influence of grafting density on the persistence length of the brush polymer. By coupling natural language interfaces with rigorous simulation tools, ToPolyAgent lowers barriers to complex computational workflows and advances AI-driven materials discovery in polymer science. It lays the foundation for autonomous and extensible multi-agent scientific research ecosystems.
Recent advances in large language models (LLMs)39–41 and agentic AI42,43 have opened new avenues for automating and simplifying complex scientific workflows.44 LLMs, with their ability to process and generate natural language, can interpret user instructions, orchestrate tasks, and integrate domain-specific tools to perform specialized computations.45,46 Agentic AI systems, composed of multiple AI agents with distinct roles, further enhance this capability by enabling collaborative and autonomous task execution. These developments have the potential to transform computational materials science by making advanced simulations more intuitive and efficient, while greatly lowering the barrier to using professional computational tools like MD software. The application of AI agent started with software development,47,48 and has been quickly expanding to various areas of scientific research.49–51 Recent efforts have begun to apply AI agents to molecular dynamics workflows. For example, LUNAR52 automates LAMMPS input generation and post-processing for reactive simulations using traditional scripting tools, while fine-tuned large language models53 are used for iterative script generation and refinement, primarily targeting thermodynamic parameter exploration in all-atom and coarse-grained systems. These approaches significantly reduce the effort required to produce valid simulation inputs. However, they focus predominantly on code and script generation and do not provide fully autonomous or interactive execution of the complete workflow—from topology-specific initial configuration generation, through simulation running and trajectory analysis, to final reporting.
In this work, we address the aforementioned challenges by introducing ToPolyAgent, a multi-agent AI framework designed to perform coarse-grained molecular dynamics (MD) simulations of topological polymers through natural language interfaces. The coarse-grained MD simulation workflow is based on a tutorial supported by the U.S. National Science Foundation (NSF).54,55 ToPolyAgent integrates large language models (LLMs) with domain-specific computational tools to support simulations of diverse polymer architectures under varying solvent conditions and simulation parameters. The system operates in two modes: an interactive mode, which incorporates user feedback for iterative refinement, and an autonomous mode, which performs end-to-end simulations from detailed prompts.
We demonstrate ToPolyAgent's capabilities through case studies that highlight its potential as a research assistant, including investigations of the effect of solvent quality on linear polymer conformation and the influence of grafting density on the persistence length of brush polymer backbones. By bridging natural language processing with rigorous computational methods, ToPolyAgent lowers the barrier to performing complex polymer simulations and establishes a foundation for scalable, AI-driven materials research.
The rest of this paper is organized as follows: in Section 2, we describe the system design of ToPolyAgent, and provide details on the tools been used and technical detail on the MD simulation. Section 3 presents a series of examples and use cases of the ToPolyAgent simulating different types of topological polymer under various conditions, while demonstrating the capability of ToPolyAgent as a research assistant. Finally, we summarize this work and discuss potential future directions in Section 4.
In the interactive mode, the first agent to interact with the user is the Config Agent, whose task is to generate the initial configuration data file containing the positions and connectivities of all polymer beads, as well as the initial positions of all solvent particles. The Config Agent employs six different tools to perform its tasks. Five of these tools are dedicated to generating five types of topological polymers—linear, ring, brush, star, and dendrimer—each with specific input parameters that control properties such as size, shape, and solvent concentration. The remaining tool, known as the human tool, prompts the user for additional feedback so that the Config Agent can iteratively modify the system configuration until the user is satisfied and agrees to proceed to the next phase.
The second phase of the interactive mode is handled by the Simulation Agent, which interprets user prompts and runs molecular dynamics (MD) simulations for the previously generated polymer configurations using appropriate parameters. In addition, the Simulation Agent performs data analysis on the simulation output and presents figures for user evaluation. Similar to the Config Agent, the Simulation Agent also has access to the human tool and will request user feedback to adjust and rerun simulations as needed.
Once the user approves the simulation results, the interactive mode proceeds to the third phase, in which all results—including simulation data, parameters, and interaction logs—are compiled by the Report Agent. The Report Agent uses tools to read logs and files, then generates a comprehensive simulation report in markdown format.
In the autonomous mode, the agents expect the user to provide more detailed prompts so that the simulations can be carried out with greater specificity. The main difference between the autonomous and interactive modes is the absence of a human feedback loop in the former. In this mode, the Workflow Agent is responsible for generating the initial system configuration, performing the MD simulation of the polymer–solvent system, and conducting data analysis. The resulting outputs are then passed to the same Report Agent, which compiles them into a final report.
In practice, we use CrewAI to orchastrate the multi-agent system and facilitate agent-to-agent collaboration, as well as to maintain the agents' memory systems. The LLM is powered by OpenRouter's API, which enables flexible selection of the underlying model. And without loss of generality, we use OpenAI's GPT-4o-mini56 for the results presented in this study.
For system configuration generation, five tools were developed, each corresponding to a specific type of topological polymer. These tools read predefined input parameters from docstrings, generate the polymer configurations based on user instructions, add solvent to the simulation box, save the resulting LAMMPS data file, and visualize the configurations. All tools require the simulation box size B and solvent density ns as inputs, with additional topology-specific parameters. GenerateLinearPolymer and GenerateRingPolymer require the chain length N. GenerateBrushPolymer requires the backbone length Nb, grafting density σg, and side chain length Ns. GenerateStarPolymer requires the arm length Na and number of arms m. GenerateDendrimer requires the number of generations G, branching factor b, and spacer length Ns.
For the simulation tools set, the runLAMMPS tool executes the MD simulation using the LAMMPS data file generated by the Config Agent. It takes as input the interaction parameters: polymer–polymer εpp, solvent–solvent εss, and polymer–solvent εsp, along with the thermostat type (Langevin or Nose–Hoover) and the number of simulation steps. Details of the MD simulations are provided in the following subsection. Additionally, the ComformationAnalysis tool analyzes the dump files produced by the LAMMPS simulations.
The following characteristic variables of polymer conformation are calculated:57,58 the square of the radius of gyration, Rg2 = 〈(ri − rc)2〉i, where 〈…〉i denotes the average over all beads on the polymer, and rc = 〈ri〉i is the center of mass of the polymer. The mean square displacement (MSD) curve is given by MSD(Δt) = 〉|rc(t + Δt) − rc(t)|2〈t, where 〉…〈t denotes the time average, and the diffusion coefficient D is obtained from the relation MSD = 6DΔt.
We also calculate the end-to-end distance, Ree = |rN − r1|, defined as the distance between the first and last beads on the polymer chain, and the persistence length lp, obtained from the bond–bond correlation function 〉cos
θ(s)〈 = e−s/lp, where θ(s) is the angle between tangent vectors of the chain separated by contour length s. The persistence length and end-to-end distance are not calculated for dendrimers, as these quantities are not well defined, and are evaluated only for the backbone in brush polymers and for a single arm in star polymers. The end-to-end distance is also not calculated for ring polymers.
Additionally, we calculate the polymer form factor and the radial distribution function. The form factor is given by the isotropic intra-polymer structure factor:59,60
![]() | (1) |
| g(r) = 〈δ(|ri − rj| − r)〉i,j | (2) |
Finally, the human tool and report tool set are straightforward: the human tool allows the agent to receive natural-language feedback from the user, while the report tool reads and writes markdown files to the local directory.
![]() | (3) |
We use the finite extensible nonlinear elastic (FENE) bond potential for the connected beads on the polymer, given by:61
![]() | (4) |
We implement both the Langevin and Nosé–Hoover thermostats in the simulations. The equation of motion for the Langevin thermostat is given by:62,63
![]() | (5) |
The Nosé–Hoover thermostat maintains a constant temperature by introducing a fictitious degree of freedom that couples the system to a heat bath, thereby generating an NVT ensemble. The equations of motion are given by:64,65
![]() | (6) |
Fig. 2 illustrates the workflow of the dialogue between the user and ToPolyAgent during the simulation of a brush polymer in solvent. Beginning with the generation of the brush polymer configuration and solvent packing shown in Fig. 2(a), the Config Agent first produces a brush polymer using default settings. The user then provides feedback requesting an increase in grafting density. The Config Agent interprets this feedback, retrieves the previously used parameters for brush polymer generation from memory, and re-runs the configuration tool to adjust only the grafting density while keeping other parameters unchanged.
After the user approves the generated system configuration, the Simulation Agent takes over, as shown in Fig. 2(b). It begins by asking the user for additional specifications of the simulation parameters, then performs the MD simulation and corresponding polymer conformation analysis using the simulation tools, presenting the final system configuration and analysis results to the user. Subsequently, as shown in Fig. 2(c), the user requests the Simulation Agent to extend the simulation to a longer run, which the agent executes accordingly. Upon final approval from the user, the Report Agent compiles a comprehensive report containing the simulation context, parameters, and conformation analysis results, with plots embedded in a markdown file.
The final simulation corresponds to a brush polymer with backbone length Nb = 20, grafting density σg = 0.6, and side chain length Ns = 5, within a simulation box of size B = 20 and solvent number density ns = 0.3. The interaction parameters are εpp = εss = 0.3 and εsp = 1.5. The system is simulated using a Langevin thermostat for 90
000 steps with a time step of dt = 0.01. The complete conformation analysis results for the final run are shown in Fig. 3.
Finally, in Fig. 4, we present an example of agent–user communication in which the user does not request any revisions during the process. The Config Agent selects its own parameters according to the system prompt defined in the tool's docstring and generates a system consisting of a star polymer with arm length Na and number of arms m = 6 in a simulation box of size B = 20, filled with solvent at a number density of ns = 0.2. The Simulation Agent then takes over and runs the simulation using user-specified parameters, including εpp = 0.5, εss = 0.7, and εsp = 1.0, for 40
000 steps under a Langevin thermostat. Finally, the Report Agent compiles the results and generates a markdown report.
Fig. 5 shows three examples of ToPolyAgent operating in autonomous mode, demonstrating simulations of a linear polymer, a ring polymer, and a dendrimer. In Fig. 5(a), the user instructs ToPolyAgent to simulate a linear polymer, specifying the polymer length, thermostat type (Nosé–Hoover), and a run length of 50
000 steps. ToPolyAgent correctly applies the user-specified parameters, performs the simulation, and provides the corresponding analysis results. In Fig. 5(b), the user requests a ring polymer simulation, specifying the polymer size, solvent density, three interaction parameters for polymer–solvent interactions, and the total number of simulation steps. The agent accurately assigns these parameters and executes the simulation. The conformation analysis excludes the end-to-end distance, as it is not defined for ring polymers. Finally, in Fig. 5(c), the agent receives detailed instructions for generating a dendrimer configuration, including solvent properties, simulation box size, and simulation length, and successfully performs the simulation using the correct parameter values. For dendrimers, since both the end-to-end distance Ree and persistence length lp are not well defined, only the other conformational characteristics are presented.
With the autonomous mode, ToPolyAgent can serve as a self-contained module within a larger system in which individual components communicate with one another through natural language, similar to human interaction. Despite relying on language-based inputs and outputs, ToPolyAgent employs rigorous scientific tools internally, producing more reliable and reproducible results than commercially available, general-purpose AI chatbots.
![]() | ||
| Fig. 6 Illustration of ToPolyAgent acting as a research assistant specialized in coarse-grained simulations of topological polymers. The instructor can be either a human or another AI agent. | ||
For the linear polymer, we use ToPolyAgent to study the effect of solvent quality on conformational changes, particularly on the polymer's radius of gyration. Although the simulation module supports explicit solvent particles, we simplify the study by using an implicit solvent model, where solvent effects are represented by the polymer–polymer interaction parameter εpp, and the explicit solvent particle density is set to zero. We then provide ToPolyAgent with a series of prompt variations to perform simulations of linear polymers with different values of εpp.
Prompt:
Simulate a linear polymer consisting of 40 beads without solvent, using a polymer–polymer interaction parameter pp = {epsilon_pp}. Set the box size to 40, apply a Langevin thermostat, and run the simulation for 100
000 steps.
We then compile all simulation results to investigate the effect of solvent quality—quantified by the polymer–polymer interaction parameter εpp—on the size of the polymer chain. As shown in Fig. 7, the polymer chain collapses as the interaction strength increases. Fig. 7(a) shows the squared radius of gyration Rg2 as a function of εpp. As expected, increasing attractive interactions lead to a reduction in overall chain size, resulting in smaller Rg2 values. Moreover, Fig. 7(b) characterizes the chain conformation through the slope of the form factor P(q). The slope of P(q) versus q in the log–log scale increases with εpp, indicating a transition from a self-avoiding walk at low εpp, to an ideal random walk at intermediate εpp, and finally to a collapsed globule at high εpp, resembling a fuzzy sphere. A small-angle neutron scattering (SANS) data for polystyrene solution is added for comparison. The SANS data is normalized using contour length 32.3 nm based on flexible cylinder model fitting. The SANS data is representative for good solvent with low εpp.
For the brush polymer, we use ToPolyAgent to study the effect of grafting density on the bending stiffness, characterized by the persistence length of the backbone. Similar to the linear polymer study, we provide ToPolyAgent with a series of variations of the following prompt to simulate brush polymers in a solvent bath with different grafting densities:
Prompt:
Simulate a brush polymer with 20 beads on the backbone, grafting density {grafting_density}, and side chain length 5, in a good solvent with number density 0.2. Use a box size of 30, apply a Langevin thermostat, and run the simulation for 100
000 steps.
Fig. 8 shows the effect of grafting density σg on the conformation of the brush polymer. As the grafting density increases, the region near the backbone becomes increasingly crowded, resulting in reduced backbone flexibility. As shown in Fig. 8(a), the persistence length lp of the backbone chain increases with σg. Meanwhile, the form factor of the entire polymer, shown in Fig. 8(b), decreases more rapidly at higher grafting densities, indicating a transition from an extended polymer-like structure to a more compact, sphere-like morphology due to the dense side chains. This conformational transformation is illustrated by the snapshots of polymers with different grafting densities shown at the top of Fig. 8.
ToPolyAgent operates in two modes: interactive and autonomous. In the interactive mode, the Config Agent, Simulation Agent, and Report Agent are activated, with the Config and Simulation Agents equipped with a human-interaction tool that enables real-time communication with the user for revision and clarification. In the autonomous mode, the Workflow Agent and Report Agent automatically produce the final report directly from the user's initial prompt, providing a more streamlined simulation process.
We present examples of both interactive and autonomous modes, covering five common types of topological polymers: linear polymers, ring polymers, brush polymers, star polymers, and dendrimers. Finally, we demonstrate the potential of ToPolyAgent as a research assistant capable of handling more complex research tasks and automating parts of the scientific discovery process.
Building on the results demonstrated in this work, ToPolyAgent represents a new direction in computational materials science by seamlessly integrating LLM-enabled agentic AI systems with rigorous simulation tools. This integration not only extends the capabilities of existing AI frameworks but also enhances the practical utility of the simulation tools developed. By enabling researchers to interact with the system through natural language, ToPolyAgent significantly lowers the technical barriers to configuring and executing complex polymer simulations, thereby making advanced computational tools accessible to a broader range of users.
More importantly, ToPolyAgent's potential as a research assistant paves the way for autonomous scientific research in computational materials science. By combining ToPolyAgent with other specialized research agents, it becomes possible to construct a virtual research group composed entirely of AI agents with complementary expertise. For example, a discovery agent could identify research gaps addressable through topological polymer simulations by reviewing relevant literature; a planning agent could design a research plan involving specific sets of simulations, which are then executed by ToPolyAgent; and a writing agent could compile a well-structured research paper based on the simulation results. Human researchers would oversee and refine this process, analogous to ToPolyAgent's interactive mode, ensuring alignment with scientific objectives. By enabling scalable, collaborative, and automated research workflows, ToPolyAgent has the potential to accelerate discovery in polymer science and beyond, constrained only by available computational resources.
Looking forward, the development of ToPolyAgent opens several promising avenues for advancing computational materials science and AI-driven research. First, the modular design enables straightforward extensions to more complex polymer systems, including support for multiple chains in dense melts (e.g., pure polymer systems without solvent), multiple bead types with diverse interaction parameters for copolymers, and alternative potential forms (e.g., 10–12 Lennard-Jones potentials suitable for protein modeling). Integrating additional molecular simulation tools such as CHARMM66 and CHARMM-GUI,67 which also support coarse-grained modeling, could further broaden its applicability to real-world materials design challenges. These improvements will greatly increase the capability of the ToPolyAgent. Additionally, incorporating advanced input-generation capabilities from frameworks such as LUNAR52 and fine-tuned LLM53 could further enhance flexibility of the simulation workflow. Second, incorporating advanced analysis methods, such as machine learning models for interpreting polymer properties from simulation data via simulation-based inference,68–75 as well as adding simulation diagnosis tool to determine whether a system is sufficiently equilibrated could further streamline the research process by providing predictive insights alongside simulation results. Third, integrating LLM-based AI agents with simulation frameworks supporting Monte Carlo methods such as GOMC,76 SPARKS77 and HOOMD-blue,78 would further enhance the system's versatility. Finally, expanding ToPolyAgent's interoperability within a modular AI research ecosystem represents an important future direction. For example, coupling ToPolyAgent with agents specialized in experimental data analysis could enable direct comparison between simulated and experimental results, fostering deeper integration between computation and experiment.
| This journal is © The Royal Society of Chemistry 2026 |