C hat M ol Copilot: An Agent for Molecular Modeling and Computation Powered by LLM s (2024)

Abstract: Large Language Models (LLMs) like ChatGPT excel at diverse tasks when given explicit instructions, yet they often struggle with specialized domains such as molecular science, lacking in-depth reasoning and sophisticated planning capabilities. To address these limitations, we introduce ChatMol Copilot, a chatbot-like agent specifically engineered for protein design and small molecule computations. ChatMol Copilot employs a multi-level abstraction framework to expand the LLM‘s capability. At the basic level, it integrates external computational tools through function calls, thus offloading complex tasks and enabling a focus on strategic decision-making. The second level is data abstraction. Large data sets (such as a large number of molecules created by a generative model) are stored in Redis cache, and the redis keys are referenced by LLMs for data sources involved in computation. The third level of abstraction allows the LLM to orchestrate these tools, either directly or via dynamically generated Python executables. Our evaluations demonstrate that ChatMol Copilot can adeptly manage molecular modeling tasks, effectively utilizing a variety of tools as directed. By simplifying access to sophisticated molecular modeling resources, ChatMol Copilot stands to significantly accelerate drug discovery and biotechnological innovation, empowering biochemists with advanced, user-friendly AI capabilities. The open-sourced code is available at https://github.com/ChatMol/ChatMol

## introduction large language models (llms) equipped with specialized tools are catalyzing significant advancements across various scientific fields. in chemistry research, platforms like coscientist @xcite and chemcrow (m. @xcite have revolutionized lab automation and computational tasks. furthermore, the novel codeact approach, which utilizes "code as action," leverages the coding prowess of llms to automate complex processes @xcite . similarly, tools such as alphafold 3 @xcite have achieved remarkable success in predicting protein interactions and structures, underscoring the potential of computational methods in molecular biology. despite these strides, significant challenges persist in the molecular engineering field, particularly regarding the execution of complex modeling tasks and the interpretation of their outcomes @xcite . these challenges stem from a need for greater automation and a more intuitive interaction with computational tools. in response, we introduce chatmol copilot, a dedicated platform that enhances molecular modeling computations. chatmol copilot is designed with a multi-level abstraction framework to maximize automation and user-friendliness. at its foundation, it integrates external computational tools via function calls, simplifying the interface to show only inputs, outputs, and functional descriptions, thereby isolating the llm from complex computational details. the advanced layer of this framework allows the llm to either orchestrate these tools directly or through dynamically generated python executables. this paper demonstrates how chatmol copilot effectively manages molecular modeling tasks and delivers precise, actionable responses to user inquiries, significantly streamlining the computational workflow in molecular science. ## chatmol copilot architecture the chatmol copilot is designed around the capabilities of large language models (llms). the system architecture aims to optimize workflow efficiency and precision in molecular modeling tasks. workflow overview (figure 1 ): the process begins with user instructions, which are interpreted by the llm. this interpretation step determines whether the user's request can be directly answered or if it necessitates the use of specialized tools. chatmol copilot supports a broad range of molecular modeling applications, encompassing both small molecules (such as pharmaceuticals) and macromolecules (such as proteins and their interactions). in addition to pre-defined tools, the system can create new tools by writing and executing python code. this significantly expands its capabilities beyond the predefined action space. data abstraction is employed to alleviate the burden of data processing from llms. besides internal data usage, the system has access to significant biological databases, enabling it to retrieve and utilize publicly available data as needed. as conversations progress, the integration of user demands with the computational capabilities of chatmol copilot facilitates the completion of increasingly complex tasks.