MoleCode unlocks structural intelligence in large language models

英文原文与中文译文逐段对照 · English original with Chinese translation

PEKING UNIVERSITY

北京大学

MoleCode unlocks structural intelligence in large language models

MoleCode在大语言模型中解锁结构智能

Zhiyuan Yan ${}^{1,2, * }$ , Chen Liu ${}^{2, * }$ , Boxuan Zhao ${}^{1,2, * }$ , Kaiqing Lin ${}^{2}$ , Jixiang Zhao ${}^{2}$ , Yimi Wang ${\text{}}^{1,2}$ , Liuzhenghao Lv ${}^{1}$ , Hao Li ${}^{1}$ , Shanzhuo Zhang ${}^{2}$ , Li Yuan ${}^{{1}^{ \dagger }}$ , Fanyang Mo ${}^{{1}^{ \dagger }}$

晏志远${}^{1,2, * }$ ,刘晨${}^{2, * }$ ,赵博轩${}^{1,2, * }$ ,林凯晴${}^{2}$ ,赵继祥${}^{2}$ ,王一米${}^{1,2}$ ,吕留政浩${}^{1}$ ,李昊${}^{1}$ ,张善卓${}^{2}$ ,袁粒${}^{{1}^{ \dagger }}$ ,莫凡洋${}^{{1}^{ \dagger }}$

${}^{1}$ Peking University Shenzhen Graduage School, ${}^{2}$ AtomFlow, ${}^{ * }$ Equal Contribution, ${}^{ \dagger }$ Correspondence.

${}^{1}$ 北京大学深圳研究生院,${}^{2}$ AtomFlow,${}^{ * }$ 共同贡献,${}^{ \dagger }$ 通信作者.

Abstract

摘要

Molecules are graphs, but large language models (LLMs) are usually asked to reason about them through linear strings. The most popular molecular representation, SMILES, compresses atoms, bonds, branches and rings into a compact sequence in which topology is implicit, forcing LLMs to reconstruct molecular structure before performing the requested chemical operation. Here we introduce MoleCode, an LLM-native, training-free, graph-explicit molecular language in which all molecular components are represented as typed entities with persistent identifiers and explicit relations. MoleCode makes molecular topology directly readable, editable and auditable within the language context, allowing an LLM to operate on structure rather than recover it from syntax. Across molecular reasoning, editing, generation and analysis tasks, this representational shift improves frontier LLMs most strongly when structural access is limiting: unfamiliar molecules, topology-sensitive operations, larger structures and repetitive polymers. It also changes how inference is allocated, replacing long reasoning traces devoted to implicit structural reconstruction with shorter, more chemically directed reasoning over explicit atoms and bonds. In molecular optimization, this enables localized, property-aligned edits that preserve structural similarity to the starting compounds. The same Subgraph-Node-Edge grammar extends beyond small molecules to polymers, Markush structures, mechanism-style transformations and interleaved scientific documents, including research articles and patent disclosures in which chemical information is distributed across text and images. These results suggest that the interface between scientific objects and LLMs should not treat structure as something to be decoded from text. When the object of reasoning is relational, the structure itself should be part of the language.

分子是图结构,但大语言模型(LLMs)通常被要求通过线性字符串对其进行推理。最流行的分子表示法SMILES,将原子、键、支链和环压缩成一个紧凑序列,其中拓扑结构是隐含的,这迫使大语言模型在执行所需的化学操作之前先重建分子结构。在这里,我们引入了MoleCode,一种原生大语言模型、无需训练、图结构显式的分子语言,其中所有分子组件都表示为具有持久标识符和显式关系的类型化实体。MoleCode使分子拓扑结构在语言上下文中直接可读、可编辑和可审计,允许大语言模型在结构上进行操作,而不是从语法中恢复结构。在分子推理、编辑、生成和分析任务中,当结构访问受到限制时,这种表示方式的转变对前沿大语言模型的提升最为显著:不熟悉的分子、对拓扑结构敏感的操作、更大的结构和重复聚合物。它还改变了推理的分配方式,用对显式原子和键的更短、更具化学导向性的推理取代了用于隐含结构重建的长推理轨迹。在分子优化中,这使得能够进行局部的、与性质对齐的编辑,同时保持与起始化合物的结构相似性。相同的子图-节点-边语法不仅适用于小分子,还扩展到聚合物、马库什结构、机理式转换和交错的科学文档,包括研究文章和专利披露,其中化学信息分布在文本和图像中。这些结果表明,科学对象与大语言模型之间的接口不应将结构视为要从文本中解码的内容。当推理对象是关系型时,结构本身应该是语言的一部分。

Project Page: https://atomflow-ai.com

项目页面:https://atomflow-ai.com

Main

主要内容

Large language models (LLMs) are emerging as general-purpose interfaces for molecular science [1-3]. Beyond predicting molecular properties, they can interpret natural-language instructions, answer chemical questions, propose molecular edits, reason over design constraints and coordinate external tools in multi-step workflows [4-13]. This shift changes the role of molecular representation: a molecule is no longer only an input to a specialized predictor [14], but rather becomes an object that the model must read, inspect, modify and communicate about through language [9, 10].

大语言模型(LLMs)正逐渐成为分子科学的通用接口[1-3]。除了预测分子性质外,它们还能解释自然语言指令、回答化学问题、提出分子编辑建议、基于设计约束进行推理,并在多步工作流程中协调外部工具[4-13]。这种转变改变了分子表示的作用:分子不再仅仅是专门预测器的输入[14],而是成为模型必须通过语言进行读取、检查、修改和交流的对象[9, 10]。

This creates a fundamental interface problem. Molecules are graphs: atoms are nodes, bonds are edges, and chemical behaviour depends on topology [15, 16]. However, the dominant text-based molecular representation, Simplified Molecular Input Line Entry System (SMILES) [17], presents this graph as a one-dimensional string [18]. In SMILES, connectivity is implicit, branches are encoded through syntax and ring closures are represented by positional indices [4, 19-21]. Thus, when an LLM is asked to predict the molecular formula, recognize a functional group, make a local edit or satisfy a structural constraint, it must first internally reconstruct the molecular graph before it can reason about the requested operation [22-25].

这就产生了一个基本的接口问题。分子是图:原子是节点,键是边,化学行为取决于拓扑结构[15, 16]。然而,占主导地位的基于文本的分子表示法,即简化分子输入线性输入系统(SMILES)[17],将这个图表示为一维字符串[18]。在SMILES中,连接性是隐含的,分支通过语法编码,环闭合由位置索引表示[4, 19-21]。因此,当要求大语言模型预测分子式、识别官能团、进行局部编辑或满足结构约束时,它必须首先在内部重建分子图,然后才能对请求的操作进行推理[22-25]。

1_202_223_1398_601_0.jpg

Figure 1 MoleCode makes structure explicit, editable, and operable for LLMs. a, Implicit and explicit representations of the same molecule. Conventional molecular strings such as SMILES flatten molecular graphs into semantically arbitrary token sequences in which topology is implicit and must be reconstructed during reasoning. MoleCode instead encodes atoms and bonds as explicit graph representations with persistent identifiers and readable structural semantics. b, MoleCode abstract grammar. MoleCode is built mainly from three primitives: Subgraph, Node, and Edge. Subgraphs define structural scopes, nodes encode typed entities with persistent identifiers, and edges encode explicit relations between nodes. c, Implementation examples of MoleCode. A complex molecule can be represented either as a single graph or as multiple subgraphs while preserving exact topology and deterministic equivalence. d, Deterministic bidirectional conversion between domain formats and MoleCode. Existing molecular representations, including MOL files and SMILES, can be converted to and from MoleCode in a deterministic manner without loss of structural information. e, Structure-aware molecular manipulation through explicit graph operations. A frontier LLM edits a molecule directly in MoleCode space by performing localized graph modifications. f, Standardized LLM workflows using MoleCode. MoleCode supports molecular editing, generation, understanding, and analysis within a unified graph-language interface, enabling frontier LLMs to operate over explicit topology. g, Agentic long-task workflow enabled by MoleCode. For multi-step molecular tasks, an LLM-based coding agent can iteratively reason over a MoleCode graph and perform explicit graph-level actions.

图1 MoleCode使大语言模型能够明确、可编辑和可操作地处理结构。a,同一分子的隐式和显式表示。传统的分子字符串,如SMILES,将分子图扁平化成语义上任意的令牌序列,其中拓扑结构是隐含的,必须在推理过程中重建。而MoleCode将原子和键编码为具有持久标识符和可读结构语义的显式图表示。b,MoleCode抽象语法。MoleCode主要由三个原语构建而成:子图、节点和边。子图定义结构范围,节点用持久标识符编码类型化实体,边编码节点之间的显式关系。c,MoleCode的实现示例。一个复杂分子可以表示为单个图或多个子图,并保持精确的拓扑结构和确定性等价。d,域格式和MoleCode之间的确定性双向转换。现有的分子表示法,包括MOL文件和SMILES,可以以确定性方式与MoleCode进行转换,而不会丢失结构信息。e,通过显式图操作进行结构感知的分子操作。前沿的大语言模型通过执行局部图修改,直接在MoleCode空间中编辑分子。f,使用MoleCode的标准化大语言模型工作流程。MoleCode在统一的图语言接口内支持分子编辑、生成、理解和分析,使前沿的大语言模型能够对显式拓扑结构进行操作。g,由MoleCode启用的智能长任务工作流程。对于多步分子任务,基于大语言模型的编码智能体可以对MoleCode图进行迭代推理,并执行显式的图级操作。

This bottleneck reflects a broader principle: representations shape what kinds of reasoning are easy [26, 27]. Arabic numerals with positional notation made arithmetic scalable by turning magnitude and place into explicit symbols [28]. The structural formulas transformed chemistry by making explicit representations of the molecular composition and connectivity [29, 30]. For LLM-based molecular science, the analogous question is whether molecular topology is directly available as part of the language interface, or hidden behind syntax that the model must decode [4, 18].

这个瓶颈反映了一个更广泛的原则:表示形式决定了哪种推理更容易[26, 27]。带位置记数法的阿拉伯数字通过将大小和位置转化为显式符号,使算术运算具有可扩展性[28]。结构公式通过明确表示分子组成和连接性,改变了化学[29, 30]。对于基于大语言模型的分子科学,类似的问题是分子拓扑结构是直接作为语言接口的一部分可用,还是隐藏在模型必须解码的语法后面[4, 18]。

Existing molecular representations and models only partially address this issue. SELFIES [31] and T-SMILES [32] improve syntactic validity and robustness, but still present molecules as sequential strings rather than explicit node-edge declarations. Graph neural networks [15, 33-35] operate directly on molecular topology and have achieved strong performance in property prediction and molecular representation learning [36-38]. However, they are typically specialized predictors rather than general interfaces for open-ended molecular reasoning, natural-language constraints and iterative editing [15, 39-42]. Hybrid graph-language systems attempt to connect these regimes by projecting molecular graphs into vectors or textual sequences $\left\lbrack {5,8,{43},{44}}\right\rbrack$ , but this compression weakens locality, editability and traceability. Thus, current approaches separate two capabilities that should ideally coexist: accurate structural perception and flexible language-based reasoning.

现有的分子表示法和模型仅部分解决了这个问题。SELFIES[31]和T-SMILES[32]提高了句法有效性和鲁棒性,但仍然将分子表示为顺序字符串,而不是显式的节点-边声明。图神经网络[15, 33-35]直接对分子拓扑结构进行操作,并在性质预测和分子表示学习方面取得了强大的性能[36-38]。然而,它们通常是专门的预测器,而不是用于开放式分子推理、自然语言约束和迭代编辑的通用接口[15, 39-42]。混合图-语言系统试图通过将分子图投影到向量或文本序列$\left\lbrack {5,8,{43},{44}}\right\rbrack$中来连接这些模式,但这种压缩削弱了局部性、可编辑性和可追溯性。因此,当前的方法将两种理想情况下应共存的能力分开:准确的结构感知和灵活的基于语言的推理。

To address these challenges, we introduce MoleCode, an LLM-native, training-free, graph-explicit molecular language designed to make molecular topology directly operable by LLMs without modifying model weights. In MoleCode, atoms and bonds are written as typed declarations with persistent identifiers, so connectivity is stated directly rather than inferred from sequential syntax (Fig. 1a). MoleCode is built from a simple Subgraph-Node-Edge grammar that supports both single graph serializations and hierarchical graph decompositions (Fig. 1b-c). Standard molecular formats, including MOL files and SMILES, can be converted into MoleCode and reconstructed through deterministic bidirectional pipelines (Fig. 1d). Because atoms and bonds are explicit textual objects, chemically meaningful edits become localized graph operations, such as adding a methyl group through the addition of one node and one edge (Fig. 1e). The same interface supports molecular editing, generation, understanding and analysis (Fig. 1f), and naturally integrates into multi-step agentic workflows in which a coding agent iteratively reasons over, edits and validates graph objects (Fig. 1g).

为应对这些挑战,我们引入了MoleCode,这是一种原生语言模型、无需训练、图形显式的分子语言,旨在使分子拓扑结构无需修改模型权重即可直接被语言模型操作。在MoleCode中,原子和键被写成带有持久标识符的类型化声明,因此连接性是直接陈述的,而不是从顺序语法中推断出来的(图1a)。MoleCode基于一个简单的子图-节点-边语法构建,该语法支持单图序列化和层次图分解(图1b - c)。标准分子格式,包括MOL文件和SMILES,可以转换为MoleCode,并通过确定性双向管道进行重建(图1d)。由于原子和键是显式文本对象,具有化学意义的编辑就变成了局部图操作,例如通过添加一个节点和一条边来添加一个甲基(图1e)。相同的接口支持分子编辑、生成、理解和分析(图1f),并自然地集成到多步智能工作流程中,在该流程中,编码智能体迭代地对图对象进行推理、编辑和验证(图1g)。

This representation changes the role of the LLMs. Under implicit molecular strings, graph structures must first be inferred before chemical reasoning can begin. Under MoleCode, topology is already present in the context window as readable structure, allowing the model to operate directly on atoms, bonds, subgraphs and transformations. We therefore hypothesized that MoleCode would be most beneficial in settings where structural access is limiting, including unfamiliar molecules, topology-sensitive tasks and goal-directed edits requiring chemically localized modifications.

这种表示改变了语言模型的作用。在隐式分子字符串下,必须先推断图结构才能开始化学推理。在MoleCode下,拓扑结构已经作为可读结构存在于上下文窗口中,允许模型直接对原子、键、子图和变换进行操作。因此,我们假设MoleCode在结构访问受限的情况下最有益,包括不熟悉的分子、拓扑敏感任务以及需要化学局部修改的目标导向编辑。

We tested this hypothesis across small-molecule reasoning, molecular optimization, inference-cost analysis, polymers, and higher-order chemical structure. MoleCode improved molecular reasoning most strongly when structural generalization rather than memorization was required (Fig. 2). It enabled more coherent molecular optimization through localized, property-aligned edits (Fig. 3), and reallocated inference from structural reconstruction towards more chemically directed reasoning (Fig. 4). The benefits became stronger for long and repetitive polymers, where implicit sequential encodings degraded rapidly (Fig. 5). Finally, the same graph-native abstraction extended naturally to Markush structures, mechanism-style transformations and interleaved image-text chemistry documents, including research articles and patent disclosures (Fig. 6). Together, these results support a broader principle for scientific language interfaces: when the object of reasoning is structured, the structure itself should be directly accessible to the LLM, rather than hidden behind implicit sequential syntax.

我们在小分子推理、分子优化、推理成本分析、聚合物和高阶化学结构等方面测试了这一假设。当需要结构泛化而非记忆时,MoleCode对分子推理的改进最为显著(图2)。它通过局部的、属性对齐的编辑实现了更连贯的分子优化(图3),并将推理从结构重建重新分配到更具化学导向的推理上(图4)。对于长且重复的聚合物,这种好处变得更加明显,因为隐式顺序编码会迅速退化(图5)。最后,相同的图形原生抽象自然地扩展到了马库什结构、机理式变换以及交错的图像-文本化学文档,包括研究文章和专利披露(图6)。总之,这些结果支持了科学语言接口的一个更广泛原则:当推理对象是结构化的时,结构本身应该直接可供语言模型访问,而不是隐藏在隐式顺序语法之后。

Results

结果

MoleCode improves molecular reasoning through structural generalization

MoleCode通过结构泛化提高分子推理能力

We first asked whether making molecular topology explicit improves LLM reasoning across different forms of molecular work. We evaluated three frontier LLMs, DeepSeck-R1 [45], Gemini-2.5-Flash [46] and Gemini-3-Pro [47], on a unified benchmark spanning four task families: molecular editing, molecular generation, molecular understanding and molecular analysis (Fig. 2a). These tasks ranged from local graph operations, including atom addition, deletion and substitution, to structure-sensitive problems such as atom-number-constrained generation, molecular formula prediction, carbon counting, IUPAC-to-SMILES conversion, reaction prediction and nuclear magnetic resonance elucidation.

我们首先询问,使分子拓扑结构明确是否能提高大语言模型在不同形式分子工作中的推理能力。我们在一个统一的基准上评估了三个前沿大语言模型,DeepSeck-R1 [45]、Gemini-2.5-Flash [46] 和Gemini-3-Pro [47],该基准涵盖四个任务类别:分子编辑、分子生成、分子理解和分子分析(图2a)。这些任务范围从局部图操作,包括原子添加、删除和替换,到结构敏感问题,如原子数受限生成、分子式预测、碳计数、IUPAC到SMILES转换、反应预测和核磁共振解析。

Across all four task families, replacing SMILES with MoleCode consistently improved performance (Fig. 2a). The largest gains appeared in tasks that require accurate access to molecular topology rather than recognition of local string patterns. For Gemini-3-Pro, reaction prediction accuracy increased from 58.8% to 95.0%, and molecular formula prediction increased from 58.0% to 90.0%. Gemini-2.5-Flash showed similarly large shifts on structure-sensitive generation and understanding tasks, with atom-number-constrained generation increasing from 34.7% to 77.3% and molecular formula prediction increasing from 3.0% to 80.0%. By contrast, the gap was smaller on local editing tasks, where only limited structural context must be inferred. This pattern suggests that the benefit of MoleCode grows when the model would otherwise need to reconstruct hidden topology from sequential syntax.

在所有四个任务类别中,用MoleCode替换SMILES始终能提高性能(图2a)。最大的提升出现在需要准确访问分子拓扑结构而非识别局部字符串模式的任务中。对于Gemini-3-Pro,反应预测准确率从58.8%提高到95.0%,分子式预测从58.0%提高到90.0%。Gemini-2.5-Flash在结构敏感的生成和理解任务上也有类似的大幅提升,原子数受限生成从34.7%提高到77.3%,分子式预测从3.0%提高到80.0%。相比之下,在局部编辑任务中差距较小,因为在这些任务中只需要推断有限的结构上下文。这种模式表明,当模型否则需要从顺序语法中重建隐藏拓扑结构时,MoleCode的优势会增加。

We next examined whether these gains reflected structural generalization rather than improved matching to familiar molecular strings. We stratified molecules into popular, classical and novel familiarity tiers using PubChem [48] occurrence frequency as an approximate proxy for molecular familiarity and likely pretraining exposure (Fig. 2b, left). Under SMILES, accuracy decreased sharply as molecules became less familiar, dropping from 42% on classical molecules to 20% on novel molecules. MoleCode remained substantially more stable, maintaining approximately 76-80% accuracy across all three tiers. This stability is consistent with the interpretation that explicit topology helps models reason over molecular structure rather than rely primarily on familiar string forms.

接下来,我们研究这些提升是否反映了结构泛化,而不是对熟悉分子字符串的更好匹配。我们使用PubChem [48]出现频率作为分子熟悉度和可能的预训练暴露的近似代理,将分子分层为流行、经典和新颖熟悉度层级(图2b,左)。在SMILES下,随着分子变得不那么熟悉,准确率急剧下降,从经典分子的42%降至新颖分子的20%。MoleCode则保持了更高的稳定性,在所有三个层级中准确率都保持在大约76 - 80%。这种稳定性与明确拓扑结构有助于模型对分子结构进行推理而不是主要依赖熟悉字符串形式的解释一致。

We then asked whether this familiarity effect interacted with structural complexity. Joint stratification by molecular familiarity and complexity showed that SMILES degraded most strongly when molecules were both unfamiliar and structurally complex (Fig. 2b, middle). On simple classical compounds, SMILES and MoleCode performed comparably.

然后,我们询问这种熟悉度效应是否与结构复杂性相互作用。通过分子熟悉度和复杂性的联合分层表明,当分子既不熟悉又结构复杂时,SMILES的性能下降最为明显(图2b,中)。在简单的经典化合物上,SMILES和MoleCode的表现相当。

3_203_230_1390_1111_0.jpg

Figure 2 Explicit structure improves molecular reasoning by supporting structural generalization rather than memorization. a, Performance comparison across four molecular task families: editing, generation, understanding, and analysis. Across three frontier LLMs, MoleCode consistently improves over SMILES, with the largest gains on structure-intensive tasks such as atom-number-constrained generation, molecular formula prediction, carbon counting, and chemical reaction prediction. b, Generalization across molecular familiarity and structural complexity. Left, SMILES performs well only on popular (i.e., frequently seen) molecules but degrades when encountering classical and especially novel molecules, whereas MoleCode remains highly consistent. Middle, stratification by familiarity and complexity shows that SMILES collapses most strongly on structurally complex and unfamiliar molecules, while MoleCode remains robust. Right, as molecular weight increases, SMILES accuracy declines monotonically, whereas MoleCode preserves high accuracy. c, Generalization across molecular size. SMILES and SELFIES degrade as molecular size increases, while MoleCode remains substantially more stable, indicating that explicit topology improves reasoning under increasing structural complexity. d, Representation ablation on molecular understanding tasks. MoleCode variants with increasingly explicit structural annotations generally improve over SMILES, with scaffold-aware encoding providing the strongest and most consistent performance across models and tasks.

图2 明确结构通过支持结构泛化而非记忆来提高分子推理能力。a,四个分子任务类别的性能比较:编辑、生成、理解和分析。在三个前沿大语言模型中,MoleCode始终优于SMILES,在原子数受限生成、分子式预测、碳计数和化学反应预测等结构密集型任务中提升最大。b,分子熟悉度和结构复杂性的泛化。左,SMILES仅在流行(即常见)分子上表现良好,但在遇到经典分子尤其是新颖分子时性能下降,而MoleCode保持高度一致。中,按熟悉度和复杂性分层表明,SMILES在结构复杂和不熟悉的分子上下降最为明显,而MoleCode保持稳健。右,随着分子量增加,SMILES准确率单调下降,而MoleCode保持高精度。c,分子大小的泛化。随着分子大小增加,SMILES和SELFIES性能下降,而MoleCode保持更稳定,表明明确拓扑结构在结构复杂性增加时提高推理能力。d,分子理解任务的表示消融。具有越来越明确结构注释的MoleCode变体通常优于SMILES,支架感知编码在模型和任务中提供最强和最一致的性能。

On complex novel molecules, however, SMILES accuracy decreased to 16%, whereas MoleCode remained at 72%. This pattern suggests that the limiting factor is not only chemical knowledge or prior exposure to familiar compounds, but also reliable access to topology when the structure is unfamiliar and difficult to recover from sequential syntax.

然而,在复杂的新颖分子上,SMILES准确率降至16%,而MoleCode仍保持在72%。这种模式表明,限制因素不仅是化学知识或对熟悉化合物的先前接触,还包括当结构不熟悉且难以从顺序语法中恢复时对拓扑结构的可靠访问。

This representational bottleneck became more pronounced as molecular size increased. As molecular weight increased from 50-150 Da to 350-500 Da, SMILES accuracy decreased monotonically from 65% to 32%, whereas MoleCode remained comparatively stable from 78% to 76% (Fig. 2b, right). The same trend appeared when scaling directly with carbon count across three molecular representations and three frontier LLMs (Fig. 2c). SMILES and SELFIES progressively degraded with increasing molecular size, whereas MoleCode remained substantially more stable across the same complexity range. Thus, the value of explicit topology increases as the structural burden of the molecule grows.

随着分子大小增加,这种表示瓶颈变得更加明显。当分子量从50 - 150 Da增加到350 - 500 Da时,SMILES准确率从65%单调下降到32%,而MoleCode从78%到76%相对稳定(图2b,右)。当在三种分子表示和三个前沿大语言模型中直接按碳计数缩放时,也出现了相同趋势(图2c)。随着分子大小增加,SMILES和SELFIES逐渐退化,而MoleCode在相同复杂性范围内保持更稳定。因此,随着分子结构负担的增加,明确拓扑结构的价值也在增加。

To identify which aspects of MoleCode contributed to these improvements, we performed a representation ablation spanning progressively richer variants, including base, ring-aware and scaffold-aware encodings (Fig. 2d). We evaluated these variants on molecular equivalence, functional-group counting, ring counting and ring-system scaffold identification. MoleCode variants improved over SMILES baselines across most tasks and models. The gains generally increased as structural annotations became richer, with scaffold-aware encoding producing the strongest and most consistent performance, particularly on scaffold-sensitive tasks such as ring-system identification. These ablations support the conclusion that the key factor is not prompt formatting alone, but rather the degree to which molecular topology is made explicit and accessible.

为了确定MoleCode的哪些方面促成了这些改进,我们进行了一系列表征消融实验,涵盖了逐渐丰富的变体,包括基础编码、环感知编码和支架感知编码(图2d)。我们在分子等价性、官能团计数、环计数和环系支架识别等方面对这些变体进行了评估。在大多数任务和模型中,MoleCode变体相对于SMILES基线都有改进。随着结构注释变得更加丰富,性能提升通常也会增加,其中支架感知编码产生了最强且最一致的性能,特别是在诸如环系识别等对支架敏感的任务上。这些消融实验支持了这样一个结论,即关键因素不仅仅是提示格式,而是分子拓扑结构被明确和可访问的程度。

Together, these experiments reveal a consistent pattern across task families, familiarity regimes and complexity scales: MoleCode improves molecular reasoning most strongly when success depends on structural generalization rather than memorization of canonical molecular strings.

总之,这些实验揭示了一个跨越任务家族、熟悉程度和复杂度范围的一致模式:当成功取决于结构泛化而非对规范分子字符串的记忆时,MoleCode对分子推理的提升最为显著。

MoleCode enables chemically grounded molecular optimization

MoleCode实现了基于化学原理的分子优化

Reasoning about molecular structure is only one requirement for molecular design. Practical molecular engineering also requires models to modify structure while preserving chemical coherence and aligning edits with a target objective. We therefore asked whether explicit graph structure also improves goal-directed molecular optimization.

对分子结构进行推理只是分子设计的一个要求。实际的分子工程还要求模型在保持化学连贯性并使编辑与目标对齐的同时修改结构。因此,我们询问显式图结构是否也能改善目标导向的分子优化。

We compared MoleCode and SMILES across Gemini-2.5-Flash, Gemini-3-Pro and GPT-5.2 [51] on ChemCoTBench [21], using two optimization objectives: lipophilicity measured by water-octanol partition coefficient (LogP) [49, 50], and aqueous solubility. Across both objectives and all three models, MoleCode consistently improved optimization quality (Fig. 3a). The benefit of MoleCode was the most pronounced for Gemini-2.5-Flash, which achieved 0.0 mean LogP improvement with SMILES whereas a +1.15 improvement with MoleCode. Similar increases of mean LogP improvement were seen in Gemini-3-Pro and GPT-5.2, at +0.66 and +0.20 over SMILES, respectively. Solubility optimization also benefited from MoleCode consistently, with corresponding increases of +0.38, +0.21, and +0.34. The distributions of optimization gains shifted toward larger improvements under MoleCode for both objectives (Fig. 3b), indicating that the effect was broadly distributed rather than driven by a small number of outliers. All references to “LogP” in this study denote “penalized LogP”, as defined in prior works [49, 50] and described in the Methods section.

我们在ChemCoTBench [21]上,针对Gemini-2.5-Flash、Gemini-3-Pro和GPT-5.2 [51],使用两个优化目标,比较了MoleCode和SMILES:用水-辛醇分配系数(LogP)[49, 50]测量的亲脂性,以及水溶性。在这两个目标和所有三个模型中,MoleCode始终提高了优化质量(图3a)。MoleCode对Gemini-2.5-Flash的益处最为明显,使用SMILES时LogP平均提高0.0,而使用MoleCode时提高了+1.15。在Gemini-3-Pro和GPT-5.2中也观察到类似的LogP平均提高,分别比SMILES提高了+0.66和+0.20。溶解度优化也始终受益于MoleCode,相应提高分别为+0.38、+0.21和+0.34。在这两个目标下,优化增益的分布在MoleCode下都朝着更大的改进方向移动(图3b),表明这种效果分布广泛,而不是由少数异常值驱动。本研究中所有对“LogP”的引用均指“惩罚后的LogP”,如先前工作[49, 50]中所定义,并在方法部分进行了描述。

We then examined whether the edits produced under MoleCode were chemically interpretable. Descriptor-level analysis showed directionally coherent structural changes aligned with the target objective (Fig. 3c). For LogP optimization, MoleCode preferentially reduced hydrogen-bond donor and acceptor counts while increasing halogenation, changes consistent with increased lipophilicity. For solubility optimization, this pattern shifted in the expected direction, with increased hydrogen-bond donor tendency and reduced halogenation. Structural conservation analysis further showed that MoleCode maintained high Tanimoto similarity to the starting molecules while producing substantial property improvements (Fig. 3c). This suggests that explicit graph structure supports targeted modification rather than broad unconstrained rewriting.

然后,我们检查了在MoleCode下产生的编辑是否在化学上可解释。描述符级分析表明,结构变化在方向上与目标一致(图3c)。对于LogP优化,MoleCode优先减少氢键供体和受体的数量,同时增加卤化,这些变化与亲脂性增加一致。对于溶解度优化,这种模式朝着预期方向转变,氢键供体倾向增加,卤化减少。结构保守性分析进一步表明,MoleCode在产生显著的性质改进的同时,与起始分子保持了较高的Tanimoto相似性(图3c)。这表明显式图结构支持有针对性的修改,而不是广泛的无约束重写。

A representative LogP optimization example illustrates this behaviour (Fig. 3d). Starting from the same molecule, the SMILES-prompted model produced a structurally degraded candidate with $\Delta \log \mathrm{P} = - {0.054}$ . By contrast, MoleCode identified explicit graph nodes and proposed localized, chemically interpretable edits, including amide nitrogen modification and ether-to-methylene substitutions, yielding a substantially improved molecule with $\Delta \log \mathrm{P} = + {2.360}$ .

一个代表性的LogP优化示例说明了这种行为(图3d)。从同一个分子开始,SMILES提示的模型产生了一个结构退化的候选物$\Delta \log \mathrm{P} = - {0.054}$ 。相比之下,MoleCode识别出显式的图节点,并提出了局部的、化学上可解释的编辑,包括酰胺氮修饰和醚到亚甲基的取代,产生了一个有显著改进的分子$\Delta \log \mathrm{P} = + {2.360}$ 。

These results extend the structural generalization finding from molecular perception to molecular design. By exposing atoms and bonds as editable objects, MoleCode enables LLMs not only to read molecular structure more reliably, but also to modify it in ways that are localized, property-aligned and chemically interpretable.

这些结果将从分子感知到分子设计的结构泛化发现进行了扩展。通过将原子和键作为可编辑对象暴露出来,MoleCode使大语言模型不仅能够更可靠地读取分子结构,还能够以局部的、与性质对齐且化学上可解释的方式对其进行修改。

MoleCode reallocates inference towards productive reasoning

MoleCode将推理重新分配到富有成效的推理上

MoleCode uses longer inputs than conventional molecular strings because topology is written explicitly in the prompt. We therefore asked whether this verbosity increases total inference cost, or whether explicit structure changes how computation is allocated during reasoning. Input token count scaled approximately linearly with molecular size for all representations, but MoleCode inputs were longer than SMILES and SELFIES because atoms and bonds are represented as graph primitives (Fig. 4a, left). This increased upfront cost was offset by a substantial reduction in chain-of-thought (CoT) [52] reasoning tokens (Fig. 4a, middle). With SMILES and SELFIES, CoT token cost increased superlinearly with carbon count, at approximately ${C}^{1.65}$ and ${C}^{1.36}$ , respectively. With MoleCode, CoT token cost scaled sublinearly, approximately at ${C}^{0.52}$ . Therefore, MoleCode shifts inference into a long-input and short-reasoning regime, whereas SMILES and SELFIES occupy a short-input and long-reasoning regime associated with lower accuracy. Despite using the longest prompts, MoleCode achieved the lowest total token cost per query because the reduction in reasoning-token generation largely outweighed the increase in input length (Fig. 4a, right). These findings are consistent with the interpretation that explicit structure externalizes part of the structural reconstruction burden into the prompt itself.

MoleCode使用比传统分子字符串更长的输入,因为拓扑结构在提示中被明确写出。因此,我们询问这种冗长是否会增加总推理成本,或者明确的结构是否会改变推理过程中计算的分配方式。对于所有表示形式,输入令牌数与分子大小大致呈线性比例,但MoleCode的输入比SMILES和SELFIES更长,因为原子和键被表示为图原语(图4a,左)。这种增加的前期成本被思维链(CoT)[52]推理令牌的大幅减少所抵消(图4a,中)。对于SMILES和SELFIES,CoT令牌成本随着碳原子数超线性增加,分别约为${C}^{1.65}$和${C}^{1.36}$。对于MoleCode,CoT令牌成本呈次线性比例,约为${C}^{0.52}$。因此,MoleCode将推理转移到长输入和短推理模式下,而SMILES和SELFIES则处于与较低准确性相关的短输入和长推理模式。尽管使用了最长的提示,但MoleCode实现了每个查询最低的总令牌成本,因为推理令牌生成的减少在很大程度上超过了输入长度的增加(图4a,右)。这些发现与以下解释一致:明确的结构将部分结构重建负担外化到提示本身中。

5_207_235_1385_886_0.jpg

Figure 3 MoleCode improves goal-directed molecular design and induces chemically interpretable edits. a, Cross-model optimization gains for water-octanol partition coefficient (LogP) and solubility. Bars show mean property improvement (Δ) from the starting molecules. MoleCode consistently improves optimization outcomes across both objectives and all three models. b, Distribution of optimization gains. Kernel-density curves show that MoleCode shifts the distribution of ΔLogP and ΔSolubility toward larger improvements, indicating that the gains are broadly distributed rather than driven by a small number of outliers. c, Descriptor-level analysis of the edits produced during optimization. For LogP optimization, MoleCode produces more task-aligned structural changes, including reduced hydrogen-bond donor and acceptor counts and increased halogenation. For solubility optimization, MoleCode shows increased hydrogen-bond donor tendency and reduced halogenation. Structural conservation is also tracked by Tanimoto similarity. d, Representative LogP optimization example. Starting from the same molecule, SMILES fails to ground the edit in the structural context and produces a degraded candidate. MoleCode identifies specific graph nodes and performs chemically interpretable edits, including amide nitrogen modification and ether-to-methylene substitutions, yielding a substantially improved molecule. All references to “LogP” in this study denote “penalized LogP” as defined in prior works [49, 50].

图3 MoleCode改进了目标导向的分子设计并诱导了化学可解释的编辑。a,水-辛醇分配系数(LogP)和溶解度的跨模型优化增益。条形图显示了起始分子的平均性质改善(Δ)。MoleCode在两个目标和所有三个模型中都持续改进了优化结果。b,优化增益的分布。核密度曲线表明,MoleCode将ΔLogP和Δ溶解度的分布向更大的改善方向转移,表明增益分布广泛,而不是由少数异常值驱动。c,优化过程中产生的编辑的描述符级分析。对于LogP优化,MoleCode产生了更多与任务对齐的结构变化,包括减少氢键供体和受体的数量以及增加卤化。对于溶解度优化,MoleCode显示出氢键供体倾向增加和卤化减少。结构保守性也通过Tanimoto相似性进行跟踪。d,代表性的LogP优化示例。从同一个分子开始,SMILES未能在结构背景中确定编辑,产生了一个退化的候选物。MoleCode识别特定的图节点并进行化学可解释的编辑,包括酰胺氮修饰和醚到亚甲基的取代,产生了一个显著改进的分子。本研究中所有对“LogP”的引用均指先前工作[49,50]中定义的“惩罚LogP”。

We next asked whether the remaining reasoning effort under MoleCode was more closely associated with successful optimization. During molecular optimization, reasoning length under MoleCode increased with molecular complexity $(\rho = \; {0.32}, p = {0.03})$ , whereas SMILES showed no meaningful positive relationship $\left( {\rho = - {0.22}, p = {0.15}\text{ ; Fig. 4b). }}\right)$ More importantly, complexity-adjusted reasoning-length residuals correlated positively with optimization gain under

接下来,我们询问在MoleCode下剩余的推理努力是否与成功优化更密切相关。在分子优化过程中,MoleCode下的推理长度随着分子复杂性$(\rho = \; {0.32}, p = {0.03})$增加,而SMILES则没有显示出有意义的正相关$\left( {\rho = - {0.22}, p = {0.15}\text{ ; Fig. 4b). }}\right)$更重要的是,复杂性调整后的推理长度残差与优化增益呈正相关

6_225_241_1341_1351_0.jpg

Figure 4 MoleCode reallocates inference from structural reconstruction to productive reasoning over explicit structure. a, Token-cost decomposition across molecular representations for Gemini-2.5-Flash. MoleCode uses more input tokens because topology is stated explicitly, but its chain-of-thought (CoT) length grows sub-linearly with molecular size, unlike the super-linear growth observed for SMILES and SELFIES. This shifts inference into a long-input/short-CoT regime with lower total token cost. b, Productive and unproductive reasoning during molecular optimization. MoleCode elicits longer CoT as molecular complexity increases, and this additional reasoning is positively correlated with optimization gain. In contrast, thinking longer with SMILES does not translate into productivity. c, Qualitative comparison of reasoning chains for the same molecule under SMILES and MoleCode. SMILES reasoning spends much of its effort recovering implicit connectivity and resolving structural ambiguity, whereas MoleCode reasoning directly uses explicit atom and bond annotations to identify chemically meaningful constraints and make localized edits.

图4 MoleCode将推理从结构重建重新分配到基于明确结构的富有成效的推理上。a,Gemini-2.5-Flash在不同分子表示下的令牌成本分解。MoleCode使用更多的输入令牌,因为拓扑结构被明确说明,但其思维链(CoT)长度随着分子大小呈次线性增长,这与SMILES和SELFIES观察到的超线性增长不同。这将推理转移到长输入/短CoT模式,总令牌成本更低。b,分子优化过程中的富有成效和无成效推理。随着分子复杂性增加,MoleCode引发更长的CoT,并且这种额外的推理与优化增益呈正相关。相比之下,用SMILES进行更长时间的思考并不能转化为生产力。c,SMILES和MoleCode下同一分子的推理链的定性比较。SMILES推理花费大量精力恢复隐式连接性并解决结构歧义,而MoleCode推理直接使用明确的原子和键注释来识别化学上有意义的约束并进行局部编辑。

MoleCode $\left( {\rho = {0.34}, p = {0.03}}\right)$ , but not under SMILES $\left( {\rho = {0.03}, p = {0.87}}\right)$ , as shown in Fig. 4b. In summary, longer reasoning with MoleCode leads to better optimization, but this does not apply to SMILES.

如图4b所示,在MoleCode下$\left( {\rho = {0.34}, p = {0.03}}\right)$,但在SMILES下不是$\left( {\rho = {0.03}, p = {0.87}}\right)$。总之,使用MoleCode进行更长时间的推理会导致更好的优化,但这不适用于SMILES。

A qualitative side-by-side comparison supported this view (Fig. 4c). Under SMILES, the model spent much of its reasoning trace recovering implicit connectivity and resolving structural ambiguity. Under MoleCode, the model directly used atom and bond annotations to identify chemically meaningful constraints, reason about local structural consequences and propose localized edits.

一项定性的并列比较支持了这一观点(图4c)。在SMILES表示法下,模型在推理过程中花费了大量时间来恢复隐含的连接性并解决结构歧义。在MoleCode表示法下,模型直接使用原子和键的注释来识别化学上有意义的约束,推断局部结构后果并提出局部编辑建议。

Together, these results suggest a functional interpretation of MoleCode’s advantage. Under implicit string representations, a substantial fraction of inference appears to be devoted to reconstructing hidden topology from sequential syntax. Under MoleCode, topology is already accessible in the input, allowing generated reasoning tokens to operate more directly on chemistry-relevant operations. MoleCode therefore does not merely change the format of the molecule; it changes how inference is allocated during molecular reasoning.

综合来看,这些结果表明了对MoleCode优势的一种功能解释。在隐式字符串表示下,相当一部分推理似乎致力于从序列语法中重建隐藏的拓扑结构。在MoleCode表示法下,拓扑结构在输入中已经可用,使得生成的推理令牌能够更直接地对与化学相关的操作进行操作。因此,MoleCode不仅改变了分子的表示形式;它还改变了分子推理过程中推理的分配方式。

MoleCode scales to large and repetitive polymers

MoleCode可扩展至大型重复聚合物

We next investigated whether the advantages of explicit structure extend beyond small molecules to polymers, where long chains and repeated motifs amplify the difficulty of structural reasoning. MoleCode represents polymers by declaring the repeat unit as an explicit subgraph and attaching a multiplicity operator such as $\times n$ , rather than expanding every repeat into a long full-chain string. For example, the nylon-like repeat unit in Fig. 5a is written as a compact graph object whose internal atoms and bonds remain explicit while chain length is controlled symbolically by $n$ . To evaluate this setting, we introduced the ChemLLM-Polymer benchmark, comprising three tasks: structure scaling through carbon counting, polymer editing and de novo polymer generation (Fig. 5b).

接下来,我们研究了显式结构的优势是否能从小分子扩展到聚合物,在聚合物中,长链和重复基序会增加结构推理的难度。MoleCode通过将重复单元声明为显式子图并附加诸如$\times n$之类的多重性运算符来表示聚合物,而不是将每个重复单元扩展为长的全链字符串。例如,图5a中的尼龙样重复单元被写成一个紧凑的图形对象,其内部原子和键保持显式,而链长由$n$符号控制。为了评估这种设置,我们引入了ChemLLM-Polymer基准测试,包括三个任务:通过碳计数进行结构缩放、聚合物编辑和从头生成聚合物(图5b)。

The first task evaluated carbon-counting accuracy across polymer chains of increasing length and across ten polymer classes. As polymer size increased, MoleCode substantially outperformed both full-chain SMILES and PSMILES [53], a polymer-specific extension of SMILES designed to represent repeating structures compactly (Fig. 5c). MoleCode achieved near-perfect accuracy across all chain-length bins, including polymers exceeding 250 repeat units. Full-chain SMILES collapsed at larger scales, reflecting the burden of very long expanded strings. PSMILES remained more compact, but was less accurate because the model still had to infer repeat-unit chemistry and multiplicity from an implicit sequence.

第一个任务评估了不同长度的聚合物链以及十种聚合物类别的碳计数准确性。随着聚合物尺寸的增加,MoleCode在性能上大幅超越了全链SMILES和PSMILES [53],PSMILES是SMILES的一种特定于聚合物的扩展,旨在紧凑地表示重复结构(图5c)。MoleCode在所有链长区间都实现了近乎完美的准确性,包括超过250个重复单元的聚合物。全链SMILES在更大规模时表现不佳,反映了非常长的扩展字符串带来的负担。PSMILES保持更紧凑,但准确性较低,因为模型仍需从隐式序列中推断重复单元的化学性质和多重性。

Joint stratification by chain length and repeat-unit complexity separated two failure modes of implicit polymer strings (Fig. 5d). Full-chain SMILES degraded primarily as the number of repeat units increased. PSMILES was more stable along the chain-length axis, but degraded as the repeat unit became more complex. MoleCode remained accurate across both axes because the repeat unit was explicit and the repetition count was represented symbolically.

按链长和重复单元复杂性进行联合分层,分离出了隐式聚合物字符串的两种失败模式(图5d)。全链SMILES主要随着重复单元数量的增加而退化。PSMILES在链长轴上更稳定,但随着重复单元变得更复杂而退化。MoleCode在两个轴上都保持准确,因为重复单元是显式的,重复计数由符号表示。

Stratifying carbon-counting performance by polymer class revealed the same pattern across chemically diverse families (Fig. 5e). MoleCode consistently improved over PSMILES across polyamides, polyesters, polyacrylates, silicones, halogenated polymers and conjugated systems. The largest gains appeared in polymer families with highly repetitive or chemically complex structures, including halogenated and aromatic systems. This supports the view that explicit topology becomes increasingly valuable as repetition and compositional complexity increase.

按聚合物类别对碳计数性能进行分层,揭示了不同化学家族中的相同模式(图5e)。在聚酰胺、聚酯、聚丙烯酸酯、硅酮、卤化聚合物和共轭体系中,MoleCode始终比PSMILES表现更好。最大的提升出现在具有高度重复或化学复杂结构的聚合物家族中,包括卤化和芳香体系。这支持了这样一种观点,即随着重复和组成复杂性的增加,显式拓扑结构变得越来越有价值。

We next evaluated polymer editing tasks spanning eighteen chemically meaningful edit types, including side-chain modification, ring substitution, oxidation and backbone modification (Fig. 5f). MoleCode improved both structural validity and edit correctness across Gemini-2.5-Flash and DeepSeek-R1. Thus, explicit graph structure improved not only structural perception, but also manipulation fidelity in macromolecular settings.

接下来,我们评估了涵盖十八种化学意义明确的编辑类型的聚合物编辑任务,包括侧链修饰、环取代、氧化和主链修饰(图5f)。在Gemini-2.5-Flash和DeepSeek-R1上,MoleCode提高了结构有效性和编辑正确性。因此,显式图形结构不仅提高了结构感知能力,还提高了大分子环境中的操作保真度。

Finally, we evaluated de novo polymer generation under constraint-based and fragment-assembly settings with Easy, Medium and Hard difficulty levels (Fig. 5g). We compared PSMILES, MoleCode, MoleCode with few-shot demonstrations (FS), MoleCode with interleaved planning (IL) and the combination of both strategies (FS+IL). The best performance was achieved when MoleCode was combined with both strategies.

最后,我们在具有简单、中等和困难难度级别的基于约束和片段组装设置下评估了从头生成聚合物(图5g)。我们比较了PSMILES、MoleCode、带有少样本示范的MoleCode(FS)、带有交错规划的MoleCode(IL)以及两种策略的组合(FS+IL)。当MoleCode与两种策略结合时,取得了最佳性能。

Collectively, these experiments show that the advantage of MoleCode is not limited to small molecules. As chemical objects become larger, more repetitive, and more compositionally structured, implicit sequential encodings degrade increasingly rapidly, whereas explicit graph structure remains stable and operable.

总体而言,这些实验表明MoleCode的优势不限于小分子。随着化学对象变得更大、更重复且组成结构更复杂,隐式顺序编码的退化速度越来越快,而显式图形结构则保持稳定且可操作。

MoleCode extends from molecules to broader scientific structure

MoleCode从分子扩展到更广泛的科学结构

The experiments above establish MoleCode as an effective interface for molecular reasoning. We next asked whether the same graph-native abstraction can extend beyond individual molecules to higher-order forms of chemical structure.

上述实验将MoleCode确立为分子推理的有效接口。接下来,我们询问相同的基于图的抽象是否可以从单个分子扩展到更高阶的化学结构形式。

8_204_229_1396_1159_0.jpg

Figure 5 The benefit of explicit structure becomes stronger as chemical objects become larger and more repetitive. a, MoleCode representation of a polymer repeat unit. A polymer can be written as repeated subgraphs with multiplicity $\times n$ , avoiding expansion of the full chain while preserving atom and bond connectivity inside the repeating motif. b, Overview of the ChemLLM-Polymer benchmark, covering polymer classes and edit-type distributions for three evaluation settings: structure scaling through carbon counting across polymer chain lengths and polymer classes, polymer editing across multiple chemically meaningful edit types, and de novo polymer generation under structural constraints. c, Generalization across polymer chain length (number of repeat units) for Gemini-2.5-Flash. MoleCode maintains near-perfect accuracy across all lengths, while full-chain SMILES collapses to 0% as the polymer chain becomes longer. d, Carbon-counting accuracy jointly stratified by polymer chain length and repeat-unit complexity (carbons per repeat unit). Full-chain SMILES degrades along the chain-length axis, PSMILES degrades along the repeat-unit-complexity axis, and MoleCode remains uniformly accurate across both axes, isolating the orthogonal failure modes of the two baselines. e, Carbon-counting accuracy stratified by polymer class. Across diverse polymer families, MoleCode consistently improves over PSMILES, with the largest gains appearing in structurally repetitive and chemically complex polymer classes. f, Polymer editing performance under PSMILES and MoleCode representations. MoleCode improves both structural validity and edit correctness. g, De novo polymer generation ablation across prompting and planning strategies. Constraint satisfaction and structural validity are evaluated for PSMILES, MoleCode, MoleCode with few-shot examples (FS), MoleCode with interleaved planning (IL), and MoleCode with both few-shot examples and interleaved planning (FS+IL). Combining MoleCode with structured planning and demonstrations yields the strongest generation performance across both models.

图5随着化学对象变得更大且更具重复性,显式结构的优势变得更强。a,聚合物重复单元的MoleCode表示。聚合物可以写成具有多重性$\times n$的重复子图,避免完整链的扩展,同时保留重复基序内的原子和键连接性。b,ChemLLM - 聚合物基准的概述,涵盖三种评估设置的聚合物类别和编辑类型分布:通过跨聚合物链长度和聚合物类别的碳计数进行结构缩放、跨多种化学意义上的编辑类型进行聚合物编辑,以及在结构约束下的从头聚合物生成。c,Gemini - 2.5 - Flash在聚合物链长度(重复单元数量)上的泛化。MoleCode在所有长度上都保持近乎完美的准确性,而随着聚合物链变长,完整链SMILES的准确性降至0%。d,按聚合物链长度和重复单元复杂性(每个重复单元的碳原子数)联合分层的碳计数准确性。完整链SMILES沿链长度轴下降,PSMILES沿重复单元复杂性轴下降,而MoleCode在两个轴上都保持一致的准确性,分离了两个基线的正交失败模式。e,按聚合物类别分层的碳计数准确性。在不同的聚合物家族中,MoleCode始终优于PSMILES,在结构重复和化学复杂的聚合物类别中收益最大。f,PSMILES和MoleCode表示下的聚合物编辑性能。MoleCode提高了结构有效性和编辑正确性。g,跨提示和规划策略的从头聚合物生成消融。对PSMILES、MoleCode、带有少样本示例(FS)的MoleCode、带有交错规划(IL)的MoleCode以及同时带有少样本示例和交错规划(FS + IL)的MoleCode评估约束满足和结构有效性。将MoleCode与结构化规划和演示相结合,在两个模型中都产生了最强的生成性能。

MoleCode is built from a general Subgraph-Node-Edge abstraction in which graph nodes represent typed entities and edges represent explicit relations. Because this abstraction is not tied to a single molecular scale, the same syntax can represent multiple levels of chemical structure, including atom-level annotations, Markush structures, and mechanism-style graph transformations (Fig. 6a).

MoleCode基于一般的子图 - 节点 - 边抽象构建,其中图节点表示类型化实体,边表示显式关系。由于这种抽象不局限于单个分子尺度相同的语法可以表示多个化学结构层次,包括原子级注释、Markush结构和机理式图变换(图6a)。

test Butyl Broesia
avoide los …» test Butyl Brooks
g
SMILES
84.0
Graph
E-SMILES (MolParser
Accuracy (%)
MoleCode (Ours)
MIX 100
Finl ${C1}\cdots$ Finl ${C7}$
38.1
Fig. $1 \leq 7 < \cdots < {10}$ . It2
Case $\left( {x, y}\right)$ :
Mai C 2 … Mol X 1
1.0
Original Image

MoleCode (Ours)
One preps
1. Reacting Species
2. Electron Transfer
3. Resulting Species
17.2
lity of $n - \rightarrow$ Hal H I
No1 H 1 …) Mol 0 1
Mol C 1 … Fiol 0_1
XIS Hyd_BI_H- - - - NOI_H_1
L is a bound, ${\mathrm{C}}_{12}$ -all plane, ${40}{\mathrm{C}}_{12}$ , all plane, ${80}{\mathrm{C}}_{12}$ , ${80}{\mathrm{C}}_{12}$ , ${90}^{ \circ }$ , Our fit wherein e
Conservatio –>

9_201_227_1395_664_0.jpg

Figure 6 MoleCode is a general language for scientific structure. a, One grammar spans atom-level molecular annotations, Markush structures with variable substituents and reaction mechanisms with graph transformations. b, On Markush representation, MoleCode substantially outperforms SMILES, which cannot represent Markush structures, and E-SMILES, which captures them only partially. c, In a Markush case study, MoleCode preserves substituent logic and structural relations that are lost in simplified human E-SMILES annotations. d, On mechanism representation, MoleCode improves overall accuracy, conservation, electron-transfer paths and continuous electron-transfer paths. e, In a mechanism case study, MoleCode represents reacting species, electron transfer and resulting species as explicit, local graph edits. f, MoleCode parses interleaved image-text content from a recently published chemistry paper [54] into a unified structural graph. g, MoleCode similarly parses interleaved image-text content from a recent patent disclosure [55] containing Markush cores, substituent definitions and image-text descriptions. Colored block highlights in $\mathbf{f}$ and $\mathbf{g}$ were added for visualization and are not present in the original documents.

图6 MoleCode是科学结构的通用语言。a,一种语法涵盖原子级分子注释、具有可变取代基的Markush结构以及具有图变换的反应机理。b,在Markush表示上,MoleCode显著优于无法表示Markush结构的SMILES和仅部分捕获它们的E - SMILES。c,在一个Markush案例研究中,MoleCode保留了在简化的人类E - SMILES注释中丢失的取代基逻辑和结构关系。d,在机理表示上,MoleCode提高了整体准确性、守恒性、电子转移路径和连续电子转移路径。e,在一个机理案例研究中,MoleCode将反应物种、电子转移和生成的物种表示为显式的局部图编辑。f,MoleCode将最近发表的化学论文[54]中的交错图像 - 文本内容解析为统一的结构图。g,MoleCode同样将最近的专利披露[55]中的交错图像 - 文本内容解析为包含Markush核心、取代基定义和图像 - 文本描述。$\mathbf{f}$和$\mathbf{g}$中的彩色块突出显示是为了可视化而添加的,原始文档中不存在。

At the most concrete level, MoleCode supports atom-level annotation in which chemically meaningful attributes such as nucleophilicity, electrophilicity, acidity and hydrophobicity are attached directly to molecular graph nodes. These annotations are machine-readable, atom-resolved and auditable within the same structural representation (Fig. 6a, left).

在最具体的层面上,MoleCode支持原子级注释,其中诸如亲核性、亲电性、酸度和疏水性等化学意义上的属性直接附加到分子图节点上。这些注释在相同的结构表示内是机器可读的、原子解析的且可审计的(图6a,左)。

At a higher level of abstraction, MoleCode supports Markush representations in which substituent positions, attachment sites, alternative groups, and logical relations are expressed as explicit graph nodes and edges (Fig. 6a, middle). We evaluated this setting using the MolParser benchmark [56], which represents Markush structures with E-SMILES [56], an extended and dataset-specific version of SMILES. Although E-SMILES is more expressive than standard SMILES, it captures these structures only partially, omitting complex structural logics such as logical OR (“functional group A” OR “functional group B”). By contrast, MoleCode preserves variable groups and substituent logic in a graph-native form and leads to substantial performance gain from 38.1% to 84.0% (Fig. 6b). A qualitative comparison further shows that E-SMILES annotations can collapse variable regions into simplified placeholders, whereas MoleCode preserves attachment relationships and alternative substituent structure through explicit graph annotations (Fig. 6c).

在更高的抽象层次上,MoleCode支持马尔可夫表示法,其中取代基位置、连接位点、替代基团和逻辑关系被表示为显式的图节点和边(图6a,中间)。我们使用MolParser基准测试[56]对这种设置进行了评估,该基准测试使用E-SMILES[56]来表示马尔可夫结构,E-SMILES是SMILES的一个扩展且特定于数据集的版本。尽管E-SMILES比标准SMILES更具表现力,但它只能部分捕获这些结构,省略了诸如逻辑或(“官能团A”或“官能团B”)等复杂的结构逻辑。相比之下,MoleCode以图原生形式保留了可变基团和取代基逻辑,并使性能从38.1%大幅提高到84.0%(图6b)。定性比较进一步表明,E-SMILES注释可能会将可变区域折叠为简化的占位符,而MoleCode通过显式的图注释保留了连接关系和替代取代基结构(图6c)。

MoleCode also extends to reaction mechanisms, where the relevant structure is not a single static molecule but a sequence of graph transformations (Fig. 6a, right). In this setting, reacting species, electron-transfer paths, bond changes and resulting species can be represented as explicit node and edge operations. MoleCode improves mechanism representation across overall accuracy, conservation, electron-transfer paths and continuous electron-transfer paths, with absolute improvements of ${16.1}\% ,{31.1}\% ,{9.6}\%$ and ${15.1}\%$ across these levels (Fig. 6d). A representative case shows that MoleCode decomposes the mechanism into reacting species, electron transfer and resulting species while preserving the correspondence between molecular diagrams, curved-arrow operations and local graph edits (Fig. 6e).

MoleCode还扩展到了反应机制,其中相关结构不是单个静态分子,而是一系列图变换(图6a,右)。在这种设置下,反应物种、电子转移路径、键变化和生成的物种可以表示为显式的节点和边操作。MoleCode在整体准确性、守恒性、电子转移路径和连续电子转移路径方面改进了机制表示,在这些层面上的绝对改进分别为${16.1}\% ,{31.1}\% ,{9.6}\%$和${15.1}\%$(图6d)。一个代表性的例子表明,MoleCode将机制分解为反应物种、电子转移和生成的物种,同时保留了分子图、弯箭头操作和局部图编辑之间的对应关系(图6e)。

Finally, we examined whether MoleCode could serve as an interface for multimodal chemistry documents in which chemical information is distributed across text, molecular diagrams and reaction schemes. As a generalization test, we used a frontier multimodal LLM, Gemini-3-Pro, to parse a recent article on programmable divergent electrochemical ring-opening multifunctionalization of strained rings published in Nature Chemistry [54] into a single MoleCode graph (Fig. 6f). The article was published in April 2026 and reports a newly developed synthetic strategy, making it unlikely to have been memorized during LLM pretraining, and therefore ensures the task highlights extraction, structural grounding and organization from the supplied document. MoleCode preserved molecular entities, annotations, intermediates, and cross-modal relations within one graph-native representation. Because atoms in molecular images correspond naturally to nodes and bonds correspond to edges, visual chemical structure can be mapped into MoleCode without first reducing it to a purely sequential string.

最后,我们研究了MoleCode是否可以作为多模态化学文档的接口,其中化学信息分布在文本、分子图和反应方案中。作为一个泛化测试,我们使用前沿的多模态大语言模型Gemini-3-Pro将一篇发表在《自然化学》[54]上的关于应变环的可编程发散电化学开环多功能化的近期文章解析为单个MoleCode图(图6f)。这篇文章于2026年4月发表,报道了一种新开发的合成策略,因此在大语言模型预训练期间不太可能被记住,从而确保该任务突出了从所提供文档中提取、结构基础和组织信息的能力。MoleCode在一个图原生表示中保留了分子实体、注释、中间体和跨模态关系。由于分子图像中的原子自然地对应于节点,键对应于边,因此可视化化学结构可以直接映射到MoleCode中,而无需先将其简化为纯顺序字符串。

We further tested the same multimodal parsing ability on a recent patent disclosure containing Markush cores, substituent definitions and image-text descriptions, published in March 2026 [55]. MoleCode converts the patent content into a structured graph that preserves scaffold definitions, variable groups, substituent logic and relations between the text and molecular image (Fig. 6g). This example suggests that the same representation can organize chemical information not only from research articles, but also from complex disclosure formats where molecular structure is distributed across figures, claims and descriptions.

我们还对一篇于2026年3月发表的包含马尔可夫核、取代基定义和图像-文本描述的近期专利披露进行了相同的多模态解析能力测试[55]。MoleCode将专利内容转换为一个结构化图,该图保留了支架定义、可变基团、取代基逻辑以及文本与分子图像之间的关系(图6g)。这个例子表明,相同的表示不仅可以组织来自研究文章的化学信息,还可以组织来自复杂披露格式的化学信息,在这些格式中分子结构分布在图、权利要求和描述中。

These examples suggest that MoleCode is not only a molecular string alternative, but also a graph-native interface for higher-order chemical structure. The same abstraction can express molecules, generalized scaffolds, reaction transformations and multimodal chemistry documents within one unified structural language.

这些例子表明,MoleCode不仅是分子字符串的替代方案,还是用于高阶化学结构的图原生接口。相同的抽象可以在一种统一的结构语言中表达分子、广义支架、反应变换和多模态化学文档。

Discussion

讨论

Our results show that molecular reasoning in frontier LLMs is strongly shaped by whether molecular topology is directly accessible within the language input. SMILES is compact and widely adopted, but it hides graph structure behind sequential syntax. MoleCode instead exposes molecular components and relations as explicit linguistic objects, allowing models to operate on topology rather than reconstruct it as an intermediate step. Across small molecules, goal-directed optimization and polymers, the advantage of MoleCode was largest when structural access was most limiting, including unfamiliar compounds, topology-sensitive tasks and long repetitive chemical objects.

我们的结果表明,前沿语言模型中的分子推理很大程度上受到语言输入中分子拓扑结构是否直接可及的影响。SMILES紧凑且被广泛采用,但它将图形结构隐藏在顺序语法之后。相反,MoleCode将分子组件和关系作为明确的语言对象暴露出来,使模型能够对拓扑结构进行操作,而不是将其作为中间步骤进行重建。在小分子、目标导向优化和聚合物方面,当结构访问最受限制时,MoleCode的优势最大,包括不熟悉的化合物、拓扑敏感任务和长重复化学对象。

This finding reframes the role of representation in language-based molecular science. The contrast is not simply between strings and graphs, or between LLMs and graph neural networks. Graph neural networks provide direct access to topology, but they are usually specialized predictors. LLMs provide flexible reasoning, natural-language interaction and iterative editing, but struggle when structure is hidden inside implicit encodings. MoleCode brings these capabilities closer together by placing graph structure inside the context window as readable and editable language. The model is therefore not asked to infer the molecular graph before reasoning; it is asked to reason over a graph that is already explicitly represented.

这一发现重新定义了基于语言的分子科学中表示的作用。这种对比不仅仅是字符串和图形之间的对比,也不是语言模型和图形神经网络之间的对比。图形神经网络提供对拓扑结构的直接访问,但它们通常是专门的预测器。语言模型提供灵活的推理、自然语言交互和迭代编辑,但当结构隐藏在隐式编码中时会遇到困难。MoleCode通过将图形结构作为可读和可编辑的语言放置在上下文窗口中,将这些能力更紧密地结合在一起。因此,在推理之前,模型不需要推断分子图;而是被要求对已经明确表示的图进行推理。

The inference analyses further suggest that MoleCode changes how computation is used. Although MoleCode prompts are longer than SMILES, reasoning-token growth scales more efficiently with molecular size, and additional reasoning effort is more closely associated with optimization success. These observations are consistent with the interpretation that explicit topology reallocates inference away from structural reconstruction and towards chemically meaningful operations, such as identifying functional motifs, evaluating local consequences and making targeted edits. Qualitative reasoning traces support this view: SMILES-based reasoning often spends substantial effort resolving implicit connectivity, whereas MoleCode reasoning proceeds more directly from atom and bond annotations to localized chemical decisions.

推理分析进一步表明,MoleCode改变了计算的使用方式。虽然MoleCode提示比SMILES长,但推理令牌的增长随着分子大小的增加更有效地扩展,并且额外的推理努力与优化成功更密切相关。这些观察结果与以下解释一致:明确的拓扑结构将推理从结构重建重新分配到化学上有意义的操作,如识别功能基序、评估局部后果和进行有针对性的编辑。定性推理轨迹支持这一观点:基于SMILES的推理通常花费大量精力解决隐式连接性,而MoleCode推理则更直接地从原子和键注释进行局部化学决策。

The same perspective also explains why MoleCode can operate beyond individual molecules. Its Subgraph-Node-Edge abstraction can express atom-level annotations, Markush structures, reaction transformations and multimodal chemistry documents within one graph-native syntax. More broadly, MoleCode illustrates a representational principle for scientific language interfaces. Many scientific objects, including molecules, polymers, reaction schemes, knowledge graphs, circuits and experimental workflows, are fundamentally relational. Compressing them into implicit sequences forces models to recover structure before using it. Exposing structure directly may allow LLMs to apply their reasoning capabilities more reliably across structured scientific domains.

同样的观点也解释了为什么MoleCode可以超越单个分子进行操作。它的子图-节点-边抽象可以在一种图形原生语法中表达原子级注释、Markush结构、反应转化和多模态化学文档。更广泛地说,MoleCode说明了科学语言接口的一种表示原则。许多科学对象,包括分子、聚合物、反应方案、知识图谱、电路和实验工作流程,从根本上说是关系性的。将它们压缩成隐式序列会迫使模型在使用结构之前恢复结构。直接暴露结构可能允许语言模型在结构化科学领域更可靠地应用其推理能力。

Because MoleCode exposes editable graph objects directly in language, it also supports agentic scientific workflows. As a step towards this direction, we incorporated MoleCode as a coding-agent skill that allows agents to parse molecular inputs, manipulate graph objects, validate edits and convert structures back into standard chemical formats across iterative workflows. We implemented this capability in AtomFlow, a MoleCode-driven human-AI interaction system for accessing, selecting and editing molecular graph objects (please visit our website: https://atomflow-ai.com).The two core applications, AtomChat supports natural-language editing of atoms, bonds and fragments, whereas AtomRetro supports retrosynthesis planning over explicit MoleCode structures. These applications illustrate how graph-explicit molecular language can move LLM-based chemistry from molecule-level prompting towards atom-level interaction, where reasoning, editing and validation operate on the same structured object.

因为MoleCode直接在语言中暴露可编辑的图形对象,它也支持智能科学工作流程。作为朝着这个方向迈出的一步,我们将MoleCode作为一种编码代理技能,允许代理解析分子输入、操作图形对象、验证编辑并在迭代工作流程中将结构转换回标准化学格式。我们在AtomFlow中实现了这一功能,AtomFlow是一个由MoleCode驱动的用于访问、选择和编辑分子图形对象的人机交互系统(请访问我们的网站:https://atomflow-ai.com)。两个核心应用,AtomChat支持对原子键和片段进行自然语言编辑,而AtomRetro支持对明确的MoleCode结构进行逆合成规划。这些应用说明了图形明确的分子语言如何将基于语言模型的化学从分子级提示转向原子级交互,在这种交互中,推理、编辑和验证在同一个结构化对象上进行。

Several limitations remain. MoleCode does not create chemical knowledge that a model lacks. Smaller or less chemically capable models may still generate invalid structures or violate chemical constraints, indicating that explicit representation must be paired with sufficient domain knowledge. MoleCode is also more verbose than SMILES, and specialized domains such as organometallic chemistry, inorganic solids and biological macromolecules may require additional primitives for coordination geometry, periodicity and higher-order organization. These limitations suggest a natural next step: incorporating graph-explicit representations into molecular and scientific pretraining, so that future models learn structured domains through explicit topology from the outset rather than through implicit string reconstruction.

仍然存在一些限制。MoleCode不会创造模型所缺乏的化学知识。较小或化学能力较弱的模型可能仍然会生成无效结构或违反化学约束,这表明明确的表示必须与足够的领域知识相结合。MoleCode也比SMILES更冗长,并且像有机金属化学、无机固体和生物大分子等专业领域可能需要额外的原语来处理配位几何、周期性和高阶组织。这些限制表明了一个自然的下一步:将图形明确的表示纳入分子和科学预训练中,以便未来的模型从一开始就通过明确的拓扑结构而不是通过隐式字符串重建来学习结构化领域。

Taken together, these findings suggest that representation design is not a peripheral engineering choice for scientific LLMs. It determines which aspects of a structured object are immediately available for reasoning, which operations are local and auditable, and how much computation is spent recovering structure rather than reasoning over it. MoleCode demonstrates this principle in molecular science, suggesting that future scientific language interfaces may benefit from representing structured objects in forms that are directly operable rather than implicitly encoded.

综上所述,这些发现表明表示设计对于科学语言模型来说不是一个外围的工程选择。它决定了结构化对象的哪些方面可以立即用于推理,哪些操作是局部的且可审计的,以及花费多少计算来恢复结构而不是对其进行推理。MoleCode在分子科学中证明了这一原则,表明未来的科学语言接口可能会从以直接可操作而不是隐式编码的形式表示结构化对象中受益。

Methods

方法

MoleCode grammar for small molecule, polymer, Markush, and mechanism

小分子、聚合物、马库什结构和反应机理的MoleCode语法

MoleCode uses one unified grammar across all use cases: the core grammar and conversion examples in Fig. 1b-d, the polymer repeat-unit representation in Fig. 5a, and the higher-order structural extensions in Fig. 6a. MoleCode is implemented as a text serialization of molecular graphs using three primitives: Subgraph, Node and Edge. A subgraph defines a scoped structural object, such as a molecule, repeat unit, Markush scaffold, variable substituent or reaction intermediate. A node represents either an atom or a higher-level labelled chemical entity and carries a persistent identifier that remains stable across prompt construction, model reasoning and post-processing. An edge represents an explicit relation between two nodes. For molecules, edges correspond to bonds and encode bond order directly; the implementation uses Mermaid-compatible operators, including — for single bonds, === for double bonds and -.- for triple bonds. Aromatic small-molecule inputs are generally serialized in Kekulé form, whereas polymer editing and generation prompts use <–> to mark aromatic bonds when this improves syntactic clarity. Inline comments beginning with %% are permitted inside MoleCode blocks and are ignored by the parser; these comments allow models to attach reasoning, atom lists and validation checks to the graph without changing the parsed structure.

MoleCode在所有用例中使用统一的语法:图1b - d中的核心语法和转换示例、图5a中的聚合物重复单元表示以及图6a中的高阶结构扩展。MoleCode通过三个原语作为分子图的文本序列化来实现:子图(Subgraph)、节点(Node)和边(Edge)。子图定义一个有范围的结构对象,例如分子、重复单元、马库什骨架、可变取代基或反应中间体。节点表示原子或更高级别的带标签化学实体,并带有一个持久标识符,该标识符在提示构建、模型推理和后处理过程中保持稳定。边表示两个节点之间的显式关系。对于分子,边对应于键并直接编码键级;实现使用与Mermaid兼容的运算符,包括单键用—、双键用 === 和三键用 -.-。芳香小分子输入通常以凯库勒形式序列化,但聚合物编辑和生成提示在提高句法清晰度时使用<–>来标记芳香键。以%%开头的内联注释在MoleCode块内允许,并且解析器会忽略它们;这些注释允许模型在不改变解析结构的情况下将推理、原子列表和验证检查附加到图上。

Conversion between standard molecular formats (such as SMILES and the RDKit MOL file) and MoleCode is deterministic and does not use a learned model. For small molecules, input SMILES are parsed and sanitized with RDKit [57], stereochemical information is assigned when present, aromatic systems are Kekuléized according to the representation mode, and every heavy atom is assigned a namespace-local identifier of the form Molecule_C_4 or Reactant1_N_2 . Node labels encode element identity and, when used by the task, hydrogen count, formal charge and stereochemical suffixes. Bond lines are emitted from the RDKit bond table with explicit source and target identifiers.

标准分子格式(如SMILES和RDKit MOL文件)与MoleCode之间的转换是确定性的,并且不使用学习模型。对于小分子,输入的SMILES用RDKit [57]进行解析和清理,存在立体化学信息时进行分配,芳香体系根据表示模式进行凯库勒化,并且每个重原子被分配一个形式为Molecule_C_4或Reactant1_N_2的命名空间局部标识符。节点标签编码元素身份,并且在任务使用时,编码氢原子数、形式电荷和立体化学后缀。键线从RDKit键表中发出,带有明确的源和目标标识符。

For Markush and document-level examples, MoleCode additionally allows abbreviation nodes written with labelled braces, such as R1, Ar , Boc or (CH2)n . These nodes preserve visible chemical labels that cannot be represented faithfully by ordinary SMILES. So we refer to E-SMILES [56] for implementation. Variable substituents, attachment sites, logical alternatives and non-expanded groups are encoded as explicit nodes and typed edges rather than collapsed into an anonymous wildcard. For polymers, repeat units are represented as subgraphs carrying a multiplicity label such as $\times n$ , together with two terminus markers corresponding to the two $*$ atoms in PSMILES [53]. Hydrogen counts for polymer editing and generation are inferred during reverse conversion from valence and connectivity rather than read directly from node labels, which reduces failures caused by minor hydrogen-bookkeeping drift.

对于马库什结构和文档级示例,MoleCode还允许使用带标签括号编写的缩写节点,例如R1、Ar、Boc或(CH2)n。这些节点保留了普通SMILES无法忠实地表示的可见化学标签。因此,我们参考E - SMILES [56]进行实现。可变取代基、连接位点、逻辑替代和未扩展的基团被编码为显式节点和类型化边,而不是折叠成匿名通配符。对于聚合物,重复单元表示为带有多重性标签(如$\times n$)的子图,以及与PSMILES [53]中的两个$*$原子相对应的两个末端标记。聚合物编辑和生成的氢原子数在从价态和连接性进行反向转换时推断,而不是直接从节点标签读取,这减少了由于微小的氢原子簿记漂移导致的失败。

Reaction mechanisms are represented in MoleCode as graph-valued reaction paths. Each mechanism is encoded as an ordered sequence of chemically meaningful states and transformations: a state contains the molecular species present at a given point along the reaction coordinate, whereas a transformation describes the structural and electronic changes connecting two adjacent states. The representation preserves key mechanistic objects, including reactants, products, intermediates and transition states, while maintaining atom-level identity throughout the full path. Electron-transfer relations between atoms, bonds or lone-pairs are encoded explicitly, enabling direct representation of bond formation and cleavage, bond-order changes, charge migration, proton transfer, resonance and coordination events. Generic substituents and unresolved groups are retained as labelled nodes when their internal structures are not involved in the mechanism.

反应机理在MoleCode中表示为图值反应路径。每个机理被编码为化学上有意义的状态和转换的有序序列:一个状态包含沿着反应坐标在给定点存在的分子物种,而一个转换描述连接两个相邻状态的结构和电子变化。该表示保留了关键的机理对象,包括反应物、产物、中间体和过渡态,同时在整个路径中保持原子级身份。原子、键或孤对之间的电子转移关系被明确编码,从而能够直接表示键的形成和断裂、键级变化、电荷迁移、质子转移、共振和配位事件。当通用取代基和未解析基团的内部结构不参与机理时,它们作为带标签的节点保留。

分子相关基准测试

The molecule-related benchmark underlying Fig. 2a is organized into four task families: molecular editing, molecular generation, molecular understanding and molecular analysis. Molecular editing tasks, including atom addition, deletion and substitution, derive from the TOMG benchmark [58]. Molecular generation tasks include atom-number-constrained generation and functional-group-guided generation from TOMG, together with text-based de novo molecule generation from ChEBI-20 [5]. Molecular understanding and analysis tasks are drawn from subsets of ChemIQ [59] and ChemCoTBench [21]; these tasks include carbon counting, molecular formula prediction, IUPAC-to-SMILES conversion, reaction prediction and NMR elucidation. We additionally use molecular equivalence, functional-group counting, ring counting and ring-system scaffold identification to evaluate representation variants in the ablation analysis.

图2a所示的分子相关基准测试分为四个任务类别:分子编辑、分子生成、分子理解和分子分析。分子编辑任务,包括原子添加、删除和替换,源自TOMG基准测试[58]。分子生成任务包括来自TOMG的原子数受限生成和官能团引导生成,以及来自ChEBI-20[5]的基于文本的从头分子生成。分子理解和分析任务取自ChemIQ[59]和ChemCoTBench[21]的子集;这些任务包括碳原子计数、分子式预测、IUPAC到SMILES的转换、反应预测和核磁共振解析。我们还使用分子等价性、官能团计数、环计数和环系支架识别来评估消融分析中的表示变体。

For tasks derived from ChemIQ [59] and ChemCoTBench [21], the source files contain 806 questions across eight task labels. The experiments use the subsets relevant to the main figure: carbon counting, ring counting, reaction prediction, NMR elucidation, and SMILES/IUPAC conversion. Carbon and ring counting are scored by exact integer match. Molecular formula prediction is scored by exact formula match after normalization. IUPAC-to-SMILES, reaction prediction and NMR elucidation outputs are canonicalized with RDKit and scored by canonical-SMILES equality to the reference molecule or product. Outputs that fail extraction or RDKit parsing are counted as incorrect.

对于源自ChemIQ[59]和ChemCoTBench[21]的任务,源文件包含八个任务标签下的806个问题。实验使用与主图相关的子集:碳原子计数、环计数、反应预测、核磁共振解析以及SMILES/IUPAC转换。碳原子和环计数通过精确整数匹配计分。分子式预测通过归一化后的精确分子式匹配计分。IUPAC到SMILES、反应预测和核磁共振解析输出使用RDKit进行规范化,并通过与参考分子或产物的规范SMILES相等性计分。提取失败或RDKit解析失败的输出计为错误。

For TOMG and ChEBI-20 generation or editing tasks, each natural-language instruction is paired with the same source molecule or generation constraint across representations. SMILES and SELFIES inputs are provided as linear strings. MoleCode inputs are generated from the RDKit molecular graph and expose atom identifiers, atom labels and bond relations directly in the prompt. For editing tasks, outputs are converted to canonical SMILES and evaluated for validity and satisfaction of the requested structural edit. For generation tasks, model outputs are parsed from the requested representation and converted back to canonical SMILES when a structural answer is required. For tasks requiring a natural-language or numeric answer, the leading answer span is extracted using task-specific regular expressions and compared with the reference answer.

对于TOMG和ChEBI-20的生成或编辑任务,每个自然语言指令在不同表示形式下都与相同的源分子或生成约束配对。SMILES和SELFIES输入以线性字符串形式提供。MoleCode输入从RDKit分子图生成,并在提示中直接暴露原子标识符、原子标签和键关系。对于编辑任务,输出转换为规范SMILES,并评估其有效性和对所需结构编辑的满足情况。对于生成任务,当需要结构答案时,模型输出从请求的表示形式中解析出来并转换回规范SMILES。对于需要自然语言或数字答案的任务,使用特定于任务的正则表达式提取主要答案跨度,并与参考答案进行比较。

Familiarity, complexity and representation ablations

熟悉度、复杂度和表示消融

For the familiarity, complexity and representation-ablation analyses in Fig. 2b-d, we test whether MoleCode improves structural generalization rather than memorization of familiar molecular strings using a PubChem-based memorization benchmark that stratifies molecules into three exposure tiers (Fig. 2b). The tiers are defined by PubChem Compound Identifier (CID), which serves as a proxy for deposition time and downstream web or literature presence [48]: popular/famous compounds use CIDs 1-10,000, classical/medium-exposure compounds use CIDs 10,001-200,000, and novel/obscure compounds use CIDs 130,000,000-165,000,000. Candidate metadata are retrieved with PubChem PUG-REST batch property queries for molecular formula, molecular weight, canonical or connectivity SMILES and IUPAC name. Famous-tier CIDs are enumerated sequentially; medium-tier candidates are drawn as a uniform random sample of 8,000 CIDs; obscure-tier candidates are first subsampled at stride 100 across the target CID interval and then uniformly sampled to 10,000 CIDs. Retrieval uses batches of 200 CIDs with a 0.25-0.30-s inter-request delay. Molecules are retained only if RDKit parses the SMILES, the molecule is a single connected component, all atoms belong to the organic subset $\{ \mathrm{C},\mathrm{H},\mathrm{N},\mathrm{O},\mathrm{S},\mathrm{F},\mathrm{{Cl}},\mathrm{{Br}},\mathrm{P},\mathrm{I}\}$ , at least one carbon atom and at least three heavy atoms are present, and PubChem-reported molecular weight lies in the range 50-500 Da. To control for molecular size, candidates are stratified into four molecular-weight bins, [50,150), [150,250), [250,350) and [350,500) Da. Within each tier, 13 molecules are sampled per bin and then uniformly trimmed to exactly 50 molecules per tier, yielding 150 molecules with approximately matched molecular-weight distributions. All sampling uses random seed 42. For each retained molecule we generate RDKit-canonical SMILES, three random but equivalent SMILES strings, canonical MoleCode, atom-permuted MoleCode and the Hill-order molecular formula used as the ground-truth answer. Continuous familiarity covariates, including PubChem synonym count and PubMed cross-reference count, are also collected and used on a log scale when regression-style analyses are required. Molecular complexity is analysed using molecular weight, carbon count and, for optimization-token analyses, BertzCT graph complexity.

对于图2b - d中的熟悉度、复杂度和表示消融分析,我们使用基于PubChem的记忆基准测试MoleCode是否能提高结构泛化能力,而非对熟悉分子字符串的记忆,该基准将分子分为三个暴露层级(图2b)。这些层级由PubChem化合物标识符(CID)定义,CID可作为沉积时间以及下游网络或文献存在情况的代理[48]:常见/著名化合物使用CID 1 - 10,000,经典/中等暴露化合物使用CID 10,001 - 200,000,新颖/晦涩化合物使用CID 130,000,000 - 165,000,000。候选元数据通过PubChem PUG - REST批量属性查询获取,包括分子式、分子量、标准或连接性SMILES以及IUPAC名称。著名层级的CID按顺序枚举;中等层级的候选者从8000个CID中均匀随机抽取;晦涩层级的候选者首先在目标CID区间内按步长100进行子采样,然后均匀采样至10,000个CID。检索使用200个CID的批次,请求间延迟为0.25 - 0.30秒。仅当RDKit能解析SMILES、分子为单个连通组件、所有原子属于有机子集$\{ \mathrm{C},\mathrm{H},\mathrm{N},\mathrm{O},\mathrm{S},\mathrm{F},\mathrm{{Cl}},\mathrm{{Br}},\mathrm{P},\mathrm{I}\}$、存在至少一个碳原子和至少三个重原子且PubChem报告的分子量在50 - 500 Da范围内时,分子才会被保留。为了控制分子大小,候选者被分为四个分子量区间,[50,150)、[150,250)、[250,350)和[350,500) Da。在每个层级内,每个区间采样13个分子,然后每层均匀修剪至恰好50个分子,得到150个具有近似匹配分子量分布的分子。所有采样使用随机种子42。对于每个保留的分子,我们生成RDKit标准SMILES、三个随机但等效的SMILES字符串、标准MoleCode、原子置换的MoleCode以及用作真实答案的希尔排序分子式。当需要进行回归式分析时,还会收集包括PubChem同义词计数和PubMed交叉引用计数在内的连续熟悉度协变量,并以对数尺度使用。使用分子量、碳原子数以及(用于优化token分析的)BertzCT图复杂度来分析分子复杂度。

Representation ablations compare SMILES with progressively richer MoleCode variants on molecular understanding tasks using the same questions, models and answer extractors for all variants. The base MoleCode variant encodes atom and bond declarations only. The ring-aware variant adds explicit ring-level annotations so that ring membership and ring closures are available without reconstructing them from edge patterns. The scaffold-aware variant further exposes ring-system scaffolds, scaffold membership and substituent attachment relationships as graph-level annotations. These variants are evaluated on molecular equivalence, functional-group counting, ring counting and ring-system scaffold identification with DeepSeek-R1 and Gemini-2.5-Flash. Molecular equivalence and ring-system scaffold identification are reported as accuracy; functional-group counting and ring counting are reported as mean absolute error. Numeric answers are extracted directly and compared with the reference counts, whereas structural answers are canonicalized before equivalence scoring.

表示消融在分子理解任务中,使用相同的问题、模型和答案提取器,将SMILES与逐渐丰富的MoleCode变体进行比较。基础MoleCode变体仅对原子和键声明进行编码。环感知变体添加了明确的环级注释,以便无需从边模式重建就能获取环成员和环闭合信息。支架感知变体进一步将环系统支架、支架成员和取代基连接关系作为图级注释暴露出来。这些变体在分子等效性、官能团计数、环计数和环系统支架识别方面,使用DeepSeek - R1和Gemini - 2.5 - Flash进行评估。分子等效性和环系统支架识别以准确率报告;官能团计数和环计数以平均绝对误差报告。数值答案直接提取并与参考计数进行比较,而结构答案在等效性评分前进行规范化。

Scaling with molecular size is analysed in the carbon-counting task. For the expanded scaling experiment, 200 examples spanning carbon counts from $C = 3$ to $C = {102}$ are sorted by expected carbon count and divided into 20 bins of 10 examples each. Bucket-wise accuracy is plotted after LOWESS smoothing with fraction 0.35 for each representation and model. The three molecular-size regimes used for interpretation are $C = 3 - {27}, C = {28} - {52}$ and $C = {53} - {102}$ . The same 40-example subset, sampled at regular intervals from the carbon-counting set and covering $C = 3 - {60}$ , is used for token-cost analysis with Gemini-2.5-Flash.

在碳原子计数任务中分析与分子大小的缩放关系。对于扩展缩放实验,从$C = 3$到$C = {102}$的200个碳原子计数示例按预期碳原子数排序,并分为20个区间,每个区间10个示例。对每个表示和模型,在使用0.35分数进行LOWESS平滑后绘制区间准确率。用于解释的三个分子大小范围是$C = 3 - {27}, C = {28} - {52}$和$C = {53} - {102}$。从碳原子计数集中以固定间隔采样的相同40个示例子集,涵盖$C = 3 - {60}$,用于Gemini - 2.5 - Flash的token成本分析。

Molecular optimization benchmark

分子优化基准

The molecular-optimization experiments shown in Fig. 3a-d use the ChemCoTBench [21] molecular-optimization benchmark. For each property, 100 source molecules are evaluated, with paired SMILES and MoleCode prompts generated from the same molecule. The benchmark includes LogP, QED, and ESOL-style aqueous solubility in the raw experiments; the main figure reports LogP (normalized penalized version [49, 50]) and solubility, using the benchmark’s provided metrics. Penalized LogP is defined as $\operatorname{score}\left( m\right) = \log \mathrm{P}\left( m\right) - \mathrm{{SA}}\left( m\right) - \operatorname{cycle}\left( m\right)$ , which subtracts the synthetic accessibility (SA) score and number of long cycles from the octanol-water partition coefficients [50]. Each prompt describes the property objective, provides the source molecule in the corresponding representation and asks the model to propose an improved target molecule. SMILES-mode responses are parsed from a JSON field named Final Target Molecule ; MoleCode-mode responses are parsed as graph blocks and converted back to RDKit molecules before scoring.

图3a - d所示的分子优化实验使用了ChemCoTBench [21]分子优化基准。对于每个属性,评估100个源分子,并从同一分子生成配对的SMILES和MoleCode提示。原始实验中的基准包括LogP、QED和ESOL式水溶性;主要图表报告了LogP(归一化惩罚版本[49, 50])和溶解度,使用基准提供的指标。惩罚后的LogP定义为$\operatorname{score}\left( m\right) = \log \mathrm{P}\left( m\right) - \mathrm{{SA}}\left( m\right) - \operatorname{cycle}\left( m\right)$,它从辛醇 - 水分配系数中减去合成可及性(SA)分数和长环数量[50]。每个提示描述属性目标,以相应表示形式提供源分子,并要求模型提出改进的目标分子。SMILES模式响应从名为Final Target Molecule的JSON字段中解析;MoleCode模式响应解析为图块,并在评分前转换回RDKit分子。

Optimization experiments run on Gemini-2.5-Flash, Gemini-3-Pro and GPT-5.2 with a maximum token budget of 90,000, extended to 200,000 for long constrained-design case studies. Each source molecule is evaluated with a single successful call per representation and model. Property improvement is computed as $\Delta = s$ (target) $- s$ (source), where $s$ is the property-specific scoring function. A target is scored only if it can be parsed by RDKit; invalid outputs contribute $\Delta = 0$ to aggregate bar plots. We also record validity and success rates, where success requires a valid target with improved property value relative to the source.

在Gemini - 2.5 - Flash、Gemini - 3 - Pro和GPT - 5.2上运行优化实验,最大令牌预算为90,000,对于长约束设计案例研究扩展到200,000。每个源分子针对每个表示形式和模型进行一次成功调用评估。属性改进计算为$\Delta = s$(目标)$- s$(源),其中$s$是特定于属性的评分函数。仅当目标可以由RDKit解析时才对其进行评分;无效输出对聚合柱状图贡献$\Delta = 0$。我们还记录有效性和成功率,其中成功要求目标有效且属性值相对于源有所改进。

Distributional analyses use the same per-molecule $\Delta$ values. For each model, property and representation, histograms are computed using 16 density-normalized bins and visualized as Gaussian kernel-density estimates with bandwidth 0.4, using scipy.stats.gaussian_kde . Descriptor-level mechanism analysis is performed on valid source-target pairs with RDKit. We compute changes in hydrogen-bond donor count, hydrogen-bond acceptor count and halogen count, and structural conservation is measured by Tanimoto similarity between Morgan fingerprints with radius 2 and 2048 bits.

分布分析使用相同的每个分子的$\Delta$值。对于每个模型、属性和表示形式,使用16个密度归一化箱计算直方图,并使用scipy.stats.gaussian_kde将其可视化为带宽为0.4的高斯核密度估计。使用RDKit对有效的源 - 目标对进行描述符级机制分析。我们计算氢键供体计数、氢键受体计数和卤素计数的变化,并通过半径为2和2048位的摩根指纹之间的Tanimoto相似性来衡量结构保守性。

Inference-token and reasoning-productivity analyses

推理令牌和推理生产力分析

To quantify the inference-allocation patterns shown in Fig. 4a-c, token-cost analyses measure how much computation is allocated to the input prompt versus model-generated reasoning and answer tokens. For the carbon-counting analysis, the same 40 examples are run with Gemini-2.5-Flash under SMILES, SELFIES and MoleCode. The token budget is set to 65,500 to avoid truncating long reasoning traces. We record prompt tokens, completion tokens and correctness for each call. When the API exposes hidden reasoning tokens only as usage counts, chain-of-thought token count is estimated as completion tokens minus visible answer tokens. Input-token scaling is fitted as a linear function of carbon count, and reasoning-token scaling is fitted by a power law $y = a{C}^{b}$ on log-transformed counts. These fits produce the exponents reported in the main text for SMILES, SELFIES and MoleCode.

为了量化图4a - c中所示的推理分配模式,令牌成本分析衡量了分配给输入提示与模型生成的推理和答案令牌的计算量。对于碳计数分析,在SMILES、SELFIES和MoleCode下使用Gemini - 2.5 - Flash运行相同的40个示例。令牌预算设置为65,500,以避免截断长推理轨迹。我们记录每次调用的提示令牌、完成令牌和正确性。当API仅将隐藏的推理令牌作为使用计数公开时,思维链令牌计数估计为完成令牌减去可见答案令牌。输入令牌缩放拟合为碳计数的线性函数,推理令牌缩放通过对数变换计数上的幂律$y = a{C}^{b}$拟合。这些拟合产生了正文中报告的SMILES、SELFIES和MoleCode的指数。

For molecular optimization, token-productivity analysis uses a paired 50-molecule LogP subset evaluated under SMILES and MoleCode with Gemini-2.5-Flash. Molecular complexity is quantified by BertzCT. For the relationship between reasoning length and molecular complexity, CoT token counts are plotted against BertzCT and outliers with absolute z-score greater than 2.0 are removed. Linear fits are used for visualization, and Spearman rank correlation is used for inference. To test whether extra reasoning is productive rather than merely associated with harder molecules, both CoT token count and $\Delta \mathrm{{LogP}}$ are residualized against BertzCT using a linear fit. Spearman correlation is then computed between the two residuals on the paired-valid subset; outputs invalid in either representation are excluded from this paired residual analysis. Per-mode outliers with absolute z-score greater than 1.75 on either residual axis are removed before reporting $\rho$ and $p$ values.

对于分子优化,令牌生产力分析使用在SMILES和MoleCode下使用Gemini - 2.5 - Flash评估的配对50分子LogP子集。分子复杂性通过BertzCT量化。对于推理长度与分子复杂性之间的关系,将思维链令牌计数与BertzCT绘制在一起,并去除绝对z分数大于2.0的异常值。使用线性拟合进行可视化,并使用Spearman等级相关性进行推理。为了测试额外的推理是否有成效而不仅仅是与更难的分子相关,使用线性拟合对思维链令牌计数和$\Delta \mathrm{{LogP}}$相对于BertzCT进行残差分析。然后在配对有效子集上计算两个残差之间的Spearman相关性;在任何一种表示中无效的输出都被排除在这个配对残差分析之外。在报告$\rho$和$p$值之前,去除在任何一个残差轴上绝对z分数大于1.75的每个模式异常值。

Polymer benchmark

聚合物基准测试

For the polymer analyses summarized in Fig. 5a-g, we use a ChemLLM-Polymer benchmark constructed from 25 canonical polymers spanning chemically diverse classes, including polyolefins, halogenated polymers, polyethers, polyvinyls, polyacrylates, polyesters, polyamides, aromatic and conjugated polymers, and silicones. For every question, paired inputs are generated in PSMILES, full-chain SMILES when applicable, and MoleCode, so that the molecular object and instruction are held fixed while the representation changes.

对于图5a - g中总结的聚合物分析,我们使用了一个ChemLLM - 聚合物基准测试,该基准测试由25种典型聚合物构建而成,涵盖了化学性质不同的类别,包括聚烯烃、卤化聚合物、聚醚、聚乙烯、聚丙烯酸酯、聚酯、聚酰胺、芳香族和共轭聚合物以及有机硅。对于每个问题,在PSMILES(适用时为全链SMILES)和MoleCode中生成配对输入,以便在表示形式变化时分子对象和指令保持固定。

The benchmark comprises three tasks. The carbon-counting task contains 150 examples: each of the 25 polymers is instantiated at six chain lengths chosen so that the total carbon count targets approximately 50, 100, 200, 350, 550 and 800 carbon atoms. Full-chain SMILES baselines are generated by explicit RDKit concatenation of $n$ repeat units after removing attachment-point atoms; termini are excluded from the ground-truth carbon count. The editing task contains 50 natural-language editing instructions spanning side-chain modification, halogenation, functional-group substitution, heteroatom substitution, ring modification, backbone modification, oxidation, deprotection and related categories. The de novo generation task contains 25 prompts: 12 constraint-satisfaction tasks and 13 fragment-assembly tasks, each tagged as Easy, Medium or Hard.

该基准测试包括三个任务。碳计数任务包含150个示例:25种聚合物中的每一种都在六个链长上实例化,选择这些链长以使总碳原子数目标约为50、100、200、350、550和800个碳原子。全链SMILES基线是通过在去除连接点原子后,使用RDKit显式连接$n$重复单元生成的;在真实碳原子计数中不包括末端。编辑任务包含50条自然语言编辑指令,涵盖侧链修饰、卤化、官能团取代、杂原子取代、环修饰、主链修饰、氧化、脱保护及相关类别。从头生成任务包含25个提示:12个约束满足任务和13个片段组装任务,每个任务都标记为简单、中等或困难。

PSMILES-to-MoleCode conversion is implemented by parsing the repeat-unit SMILES with RDKit, identifying the two wildcard attachment-point atoms, assigning block-local identifiers to non-wildcard heavy atoms and writing the repeat unit as a subgraph between terminus markers TL and TR. Reverse conversion parses node and edge lines, reintroduces two wildcard atoms, constructs an RDKit molecule and canonicalizes it to PSMILES. The converter is validated by round-tripping all 50 editing inputs and requiring equality after canonicalization. Counting prompts are scored by exact integer match. Editing and generation outputs are valid only if they parse, contain exactly two wildcard attachment points and satisfy all required SMARTS checks while matching none of the prohibited SMARTS checks. Canonical PSMILES equality to the reference answer is also recorded as a stricter secondary metric.

PSMILES到MoleCode的转换是通过使用RDKit解析重复单元SMILES、识别两个通配符连接点原子、为非通配符重原子分配块局部标识符并将重复单元写为末端标记TL和TR之间的子图来实现的。反向转换解析节点和边行,重新引入两个通配符原子,构建一个RDKit分子并将其规范为PSMILES。通过对所有50个编辑输入进行往返并要求规范化后相等来验证转换器。计数提示通过精确整数匹配进行评分。编辑和生成输出仅在它们能够解析、包含恰好两个通配符连接点并且满足所有所需的SMARTS检查同时不匹配任何禁止的SMARTS检查时才有效。规范PSMILES与参考答案的相等性也被记录为一个更严格的次要指标。

Polymer experiments evaluate Gemini-2.5-Flash and DeepSeek-R1. Decoding uses temperature =0. The maximum token budget is 65,536 for counting and 16,384 or 32,768 for editing and generation, depending on the model. Calls run in parallel with five workers, and partial results stream to disk with per-example identifiers so interrupted runs can be resumed. Polymer generation compares PSMILES, MoleCode, MoleCode with two few-shot examples, MoleCode with interleaved planning comments and MoleCode with both few-shot examples and interleaved planning. Interleaved plans are written as %% comments listing intended atoms, bond counts and valence checks, so they influence generation while remaining invisible to the graph parser.

聚合物实验评估了Gemini - 2.5 - Flash和DeepSeek - R1。解码使用温度=0。计数的最大令牌预算为65,536,编辑和生成的最大令牌预算根据模型为16,384或32,768。调用与五个工作线程并行运行,部分结果以每个示例的标识符流式传输到磁盘,以便可以恢复中断的运行。聚合物生成比较了PSMILES、MoleCode、带有两个少样本示例的MoleCode、带有交错规划注释的MoleCode以及带有少样本示例和交错规划的MoleCode。交错计划以%%注释的形式编写,列出预期的原子、键数和价态检查,因此它们会影响生成,同时对图形解析器不可见。

Markush structures, mechanism and multimodal chemistry documents

马库什结构、反应机理与多模态化学文档

The higher-order structure experiments in Fig. 6a-g include Markush recognition, mechanism parsing and multimodal document parsing (for both academic papers and patents); for the Markush component, we use the Markush subset of WildMol-10k released with the MolParser-7M benchmark [56]. We sample 100 examples deterministically with random seed 42 from the test_markush_10k split. The input to the model is a chemical-structure image, and the output is a machine-readable representation. Three formats are compared: plain SMILES, E-SMILES generated by the specialized

图6a - g中的高阶结构实验包括马库什识别、反应机理解析和多模态文档解析(针对学术论文和专利);对于马库什部分,我们使用与MolParser - 7M基准测试[56]一起发布的WildMol - 10k中的马库什子集。我们使用随机种子42从test_markush_10k分割中确定性地采样100个示例。模型的输入是化学结构图像,输出是机器可读表示。比较了三种格式:普通SMILES、由专用的MolParser - Base系统生成的E - SMILES,以及由遵循MoleCode规范提示的通用多模态模型生成的MoleCode。普通SMILES被视为下限格式,因为它无法保留标记的R基团和其他马库什变量。E - SMILES被视为特定领域的基线,因为它是基准测试的原生注释格式。

MolParser-Base system, and MoleCode generated by a general-purpose multimodal model prompted with the MoleCode specification. Plain SMILES is treated as a lower-bound format because it cannot preserve labelled R groups and other Markush variables. E-SMILES is treated as the domain-specific baseline because it is the native annotation format of the benchmark.

自动马库什评估将预测结果和E - SMILES真值都转换为通用的图表示,并应用具有自定义节点和边匹配的VF2风格的图同构。在对氢原子数和电荷进行归一化后比较原子标签。缩写标签通过大小写折叠和去除括号或索引装饰进行归一化,以便例如R[1]和R1可以匹配。键序要求匹配;对于主要的马库什分数,立体化学被忽略,因为许多通用结构没有一致地指定楔形。当预测缩写与真值不直接匹配时,使用精心策划的扩展表来测试扩展后的图是否同构。最终报告的马库什准确率使用专家人工验证:化学专家审查每个示例的原始图像、真值和预测,并将每个输出标记为正确、部分正确或错误。主要图表中使用专家审查后的正确率。

Automatic Markush evaluation converts both predictions and E-SMILES ground truth into a common graph representation and applies VF2-style graph isomorphism with custom node and edge matching. Atom labels are compared after normalizing hydrogen counts and charges. Abbreviation labels are normalized by case-folding and by stripping bracket or index decoration so that, for example, R[1] and R1 can match. Bond order is required to match; stereochemistry is ignored for the main Markush score because many generic structures do not specify wedges consistently. When a predicted abbreviation does not directly match the ground truth, a curated expansion table is used to test whether the expanded graph is isomorphic. Final reported Markush accuracy uses expert manual verification: a chemistry expert reviews the original image, ground truth and prediction for every example and labels each output as correct, partial or wrong. The expert-reviewed correct rate is used in the main figure.

我们从MechFinder[60]中提供的反应构建机理级基准测试。从原子映射的完整反应开始,我们应用MechFinder[60]中的反应模板库将每个整体反应与已知的机理类别进行匹配,并将其分解为一系列基本步骤,包括相应的反应状态和逐步电子转移轨迹。然后,我们按反应类型和机理长度进行分层采样,以确保涵盖化学类别和推理复杂性。从得到的候选集中,我们为每个反应类别选择两个示例,并进一步将基准测试限制为不超过10个步骤的机理。这产生了一个包含100个反应的最终基准测试。对于每个基准反应,我们为模型提供以MoleCode或映射SMILES编码的完整原子映射反应,并要求它生成电子转移事件和反应状态的原子映射序列。然后沿着三个维度评估预测的机理:守恒有效性,衡量生成的中间体是否保留原子组成和形式电荷;电子转移路径覆盖率,衡量在保持顺序匹配标准下正确恢复的真值电子转移事件的数量;以及整体机理完整性,衡量电子转移序列从机理开始是否连续正确。在这些指标中,我们发现基于MoleCode的机理解析始终优于基于SMILES的解析,显示出更高的化学守恒性、更准确的电子转移预测以及更好地恢复完整反应机理。

We construct the mechanism-level benchmark from reactions provided in MechFinder[60]. Starting from atom-mapped complete reactions, we apply the reaction template library in MechFinder[60] to match each overall reaction to a known mechanistic class and decompose it into a sequence of elementary steps, including the corresponding reaction state and step-wise electron-transfer trajectory. We then perform stratified sampling by reaction type and mechanism length to ensure coverage across both chemical classes and reasoning complexity. From the resulting candidate set, we select two examples per reaction category and further restrict the benchmark to mechanisms with no more than 10 steps. This yields a final benchmark of 100 reactions. For each benchmark reaction, we provide the model with the full atom-mapped reaction encoded either as MoleCode or as mapped SMILES, and ask it to generate the atom-mapped sequence of electron-transfer events and reaction states. The predicted mechanism is then evaluated along three dimensions: conservation validity, which measures whether the generated intermediates preserve atomic composition and formal charge; electron-transfer path coverage, which measures how many ground-truth electron-transfer events are correctly recovered under an order-preserving matching criterion; and overall mechanistic completeness, which measures whether the electron-transfer sequence is continuously correct from the beginning of the mechanism. Across these metrics, we find that mechanism parsing based on MoleCode consistently outperforms SMILES-based parsing, showing higher chemical conservation, more accurate electron-transfer prediction, and better recovery of complete reaction mechanisms.

对于多模态化学文档演示,我们考虑最近一篇化学文章,其中化学知识分布在交错的文本、分子结构和反应方案中。这种设置通常需要人工检查,因为文本描述和图像衍生的分子结构是跨模态的,并且彼此没有明确对齐。使用遵循MoleCode规范的Gemini - 3 - Pro,我们表明这样的混合化学文档可以解析为单个MoleCode图,该图在一种图原生表示中保留分子实体、标签、反应中间体、图像衍生结构和跨模态关系。人类专家验证确认解析后的图准确地恢复了文档中的化学结构。

For the multimodal chemistry-document demonstration, we consider a recent chemistry article in which chemical knowledge is distributed across interleaved text, molecular structures and reaction schemes. This setting normally requires manual checking, because the textual descriptions and image-derived molecular structures are cross-modal and are not explicitly aligned with one another. Using Gemini-3-Pro with the MoleCode specification, we show that such mixed chemistry documents can be parsed into a single MoleCode graph that preserves molecular entities, labels, reaction intermediates, image-derived structures and cross-modal relations in one graph-native representation. Human expert verification confirms that the parsed graph accurately recovers the chemical structures in the document.

对于多模态化学文档演示,我们考虑最近一篇化学文章,其中化学知识分布在交错的文本、分子结构和反应方案中。这种设置通常需要人工检查,因为文本描述和图像衍生的分子结构是跨模态的,并且彼此没有明确对齐。使用遵循MoleCode规范的Gemini - 3 - Pro,我们表明这样的混合化学文档可以解析为单个MoleCode图,该图在一种图原生表示中保留分子实体、标签、反应中间体、图像衍生结构和跨模态关系。人类专家验证确认解析后的图准确地恢复了文档中的化学结构。

AtomFlow: MoleCode-driven human-AI interaction agentic system

原子流:由分子代码驱动的人机交互智能体系统

We further built MoleCode-powered molecular interaction systems in AtomFlow using an agentic system. Since MoleCode represents every atom, bond and molecular fragment as an explicit and addressable graph object, it can be naturally integrated with the currently powerful coding agents, iteratively refined through agent workflows and converted into validated molecular operations. This makes it possible to move beyond molecule-level prompting towards atom-level human-AI interaction, where users and agents can jointly access, select, operate on and edit the underlying molecular graph. Based on this capability, we developed a series of AtomFlow products. AtomChat is a chat-with-molecule system where users can select specific atoms, bonds, or fragments to ask questions or perform arbitrary edits via natural language. Every modification and LLM annotation is reflected in the molecular graph in real-time. AtomRetro is a retrosynthesis-planning system powered by pure LLM reasoning and the LLM-native molecular language MoleCode, enabling workflows that operate directly over explicit molecular structures. This system accommodates arbitrary chemist preferences, allowing for atom-level comments on synthetic routes while intuitively explaining the rationale and logic for each retrosynthetic step.

我们在原子流中使用智能体系统进一步构建了由分子代码驱动的分子相互作用系统。由于分子代码将每个原子、键和分子片段表示为一个明确且可寻址的图对象,它可以自然地与当前强大的编码智能体集成,通过智能体工作流程进行迭代优化,并转换为经过验证的分子操作。这使得超越分子级提示迈向原子级人机交互成为可能,在这种交互中,用户和智能体可以共同访问、选择、操作和编辑底层分子图。基于此能力,我们开发了一系列原子流产品。原子聊天是一个与分子聊天的系统,用户可以选择特定的原子、键或片段,通过自然语言提问或进行任意编辑。每次修改和大语言模型注释都会实时反映在分子图中。原子逆合成是一个由纯大语言模型推理和大语言模型原生分子语言分子代码驱动的逆合成规划系统,支持直接在明确的分子结构上运行的工作流程。该系统适应任意化学家的偏好,允许对合成路线进行原子级注释,同时直观地解释每个逆合成步骤的原理和逻辑。

Acknowledgements

致谢

The authors would like to thank Peking University Shenzhen Graduate School for providing the research environment and for its generous support of student entrepreneurship. We are also grateful to AtomFlow Co., Ltd. for the funding and essential support provided for this study. A related patent filing by AtomFlow Co., Ltd. was made at an early stage of this project.

作者们要感谢北京大学深圳研究生院提供研究环境并对学生创业给予慷慨支持。我们还要感谢原子流有限公司为本研究提供资金和重要支持。原子流有限公司在本项目早期提交了一项相关专利申请。

Author contributions

作者贡献

Z.Y., C.L. and B.Z. conceived the project. Z.Y. and B.Z. designed the MoleCode syntax and grammar and implemented the conversion algorithms. Z.Y. and C.L. designed the experiments and analyses. C.L., Z.Y. and F.M. organized and framed the paper. Z.Y. conducted and implemented the molecule-related benchmarks, polymer benchmarks and associated analyses. K.L., Z.Y. and B.Z. implemented the document-parsing experiments. Z.Y. and B.Z. implemented the Markush-structure experiments, and Y.W. implemented the mechanism-related experiments. J.Z. implemented the Python version of MoleCode and integrated it into coding agents, and B.Z wrote the instructional skill that teaches coding agents to use MoleCode. H.L. provided analysis insights for molecular optimization and a helpful discussion of computational efficiency. L.L. provided insightful comments on the molecule-related benchmarks and a helpful discussion of the polymer. Z.Y. and C.L. performed the scaling analyses. L.Y. and S.Z. supervised the computational aspects, and F.M. led and supervised the scientific aspects. C.L., Z.Y., B.Z. and Y.W. polished the figures for visualization and demonstration. All authors contributed to writing the manuscript.

Z.Y.、C.L. 和 B.Z. 构思了该项目。Z.Y. 和 B.Z. 设计了 MoleCode 语法和文法并实现了转换算法。Z.Y. 和 C.L. 设计了实验和分析。C.L.、Z.Y. 和 F.M. 组织并构建了论文。Z.Y. 进行并实现了与分子相关的基准测试、聚合物基准测试及相关分析。K.L.、Z.Y. 和 B.Z. 实现了文档解析实验。Z.Y. 和 B.Z. 实现了马库什结构实验,Y.W. 实现了与机理相关的实验。J.Z. 实现了 MoleCode 的 Python 版本并将其集成到编码代理中,B.Z. 编写了教导编码代理使用 MoleCode 的指导技巧。H.L. 提供了分子优化的分析见解以及关于计算效率的有益讨论。L.L. 对与分子相关的基准测试提供了深刻见解并对聚合物进行了有益讨论。Z.Y. 和 C.L. 进行了缩放分析。L.Y. 和 S.Z. 监督了计算方面,F.M. 领导并监督了科学方面。C.L.、Z.Y.、B.Z. 和 Y.W. 对图表进行了润色以用于可视化和展示。所有作者都为撰写手稿做出了贡献。

References

参考文献

[1] Islambek Ashyrmamatov, Su Ji Gwak, Su-Young Jin, Ikhyeong Jun, Umit V Ucak, Jay-Yoon Lee, and Juyong Lee. A survey on large language models in biology and chemistry. Experimental & Molecular Medicine, pages 1-11, 2025.

[2] Debjyoti Bhattacharya, Harrison J Cassady, Michael A Hickner, and Wesley F Reinhart. Large language models as molecular design engines. Journal of Chemical Information and Modeling, 64(18):7086-7096, 2024.

[3] Jinyoung Park, Minseong Bae, Dohwan Ko, and Hyunwoo J Kim. Llamo: Large language model-based molecular graph assistant. Advances in Neural Information Processing Systems, 37:131972-132000, 2024.

[4] Adrian Mirza, Nawaf Alampara, Sreekanth Kunchapu, Martiño Ríos-García, Benedict Emoekabu, Aswanth Krishnan, Tanya Gupta, Mara Schilling-Wilhelmi, Macjonathan Okereke, Anagha Aneesh, et al. A framework for evaluating the chemical knowledge and reasoning abilities of large language models against the expertise of chemists. Nature Chemistry, 17(7):1027- 1034, 2025.

[5] Carl Edwards, Tuan Lai, Kevin Ros, Garrett Honke, Kyunghyun Cho, and Heng Ji. Translation between molecules and natural language. arXiv preprint arXiv:2204.11817, 2022.

[6] Qizhi Pei, Wei Zhang, Jinhua Zhu, Kehan Wu, Kaiyuan Gao, Lijun Wu, Yingce Xia, and Rui Yan. BioT5: Enriching cross-modal integration in biology with chemical knowledge and natural language associations. In The 2023 Conference on Empirical Methods in Natural Language Processing, 2023.

[7] Liuzhenghao Lv, Hao Li, Yu Wang, Zhiyuan Yan, Zijun Chen, Zongying Lin, Li Yuan, and Yonghong Tian. Navigating chemical-linguistic sharing space with heterogeneous molecular encoding. arXiv preprint arXiv:2412.20888, 2024.

[8] Zhiyuan Liu, Sihang Li, Yanchen Luo, Hao Fei, Yixin Cao, Kenji Kawaguchi, Xiang Wang, and Tat-Seng Chua. Molca: Molecular graph-language modeling with cross-modal projector and uni-modal adapter. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 15623-15638, 2023.

[9] Yin Fang, Xiaozhuan Liang, Ningyu Zhang, Kangwei Liu, Rui Huang, Zhuo Chen, Xiaohui Fan, and Huajun Chen. Mol-instructions: A large-scale biomolecular instruction dataset for large language models. In International Conference on Learning Representations, volume 2024, pages 48221-48251, 2024.

[10] He Cao, Zijing Liu, Xingyu Lu, Yuan Yao, and Yu Li. Instructmol: Multi-modal integration for building a versatile and reliable molecular assistant in drug discovery. In Proceedings of the 31st International Conference on Computational Linguistics, pages 354-379, 2025.

[11] Philipp Seidl, Andreu Vall, Sepp Hochreiter, and Günter Klambauer. Enhancing activity prediction models in drug discovery with the ability to understand human language. In International Conference on Machine Learning, pages 30458-30490. PMLR, 2023.

[12] Sihang Li, Zhiyuan Liu, Yanchen Luo, Xiang Wang, Xiangnan He, Kenji Kawaguchi, Tat-Seng Chua, and Qi Tian. Towards 3d molecule-text interpretation in language models. In International Conference on Learning Representations, volume 2024, pages 17352-17371, 2024.

[13] Botao Yu, Frazier N Baker, Ziqi Chen, Xia Ning, and Huan Sun. Llasmol: Advancing large language models for chemistry with a large-scale, comprehensive, high-quality instruction tuning dataset. In ACL 2024 Workshop Language+ Molecules, 2024.

[14] Kevin Bijan Givechian, João Felipe Rocha, Chen Liu, Edward Yang, Sidharth Tyagi, Kerrie Greene, Rex Ying, Etienne Caron, Akiko Iwasaki, and Smita Krishnaswamy. Immunostruct enables multimodal deep learning for immunogenicity prediction. Nature Machine Intelligence, 8:70-83, 2026.

[15] Patrick Reiser, Marlen Neubert, André Eberhard, Luca Torresi, Chen Zhou, Chen Shao, Houssam Metni, Clint van Hoesel, Henrik Schopmans, Timo Sommer, et al. Graph neural networks for materials science and chemistry. Communications Materials, 3(1):93, 2022.

[16] Michael A Skinnider. Invalid smiles are beneficial rather than detrimental to chemical language models. Nature Machine Intelligence, 6(4):437-448, 2024.

[17] David Weininger. SMILES, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of Chemical Information and Computer Sciences, 28(1):31-36, 1988.

[18] Yunhui Jang, Jaehyung Kim, and Sungsoo Ahn. Improving chemical understanding of llms via smiles parsing. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 15694-15709, 2025.

[19] Taicheng Guo, Kehan Guo, Bowen Nan, Zhenwen Liang, Zhichun Guo, Nitesh Chawla, Olaf Wiest, and Xiangliang Zhang. What indeed can GPT models do in chemistry? A comprehensive benchmark on eight tasks. Advances in Neural Information Processing Systems, 36, 2023.

[20] Li Hao, Liuzhenghao Lv, Zijing Liu, Zhiyuan Yan, Yu Wang, Yonghong Tian, Yu Li, Li Yuan, et al. How to detect and defeat molecular mirage: A metric-driven benchmark for hallucination in llm-based molecular comprehension. In NeurIPS 2025 AI for Science Workshop, 2025.

[21] Li Hao, He Cao, Bin Feng, Daniel Shao, Robert Tang, Zhiyuan Yan, Yonghong Tian, Li Yuan, and Yu Li. Beyond chemical qa: Evaluating llm’s chemical reasoning with modular chemical operations. Advances in Neural Information Processing Systems, 38, 2026.

[22] Xuan Liu, Siru Ouyang, Xianrui Zhong, Jiawei Han, and Huimin Zhao. Fgbench: A dataset and benchmark for molecular property reasoning at functional group-level in large language models. Advances in Neural Information Processing Systems, 38, 2026.

[23] Yuyang Wu, Jinhui Ye, Shuhao Zhang, Lu Dai, Yonatan Bisk, and Olexandr Isayev. Molerr2fix: Benchmarking llm trustworthiness in chemistry via modular error detection, localization, explanation, and correction. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 19365-19382, 2025.

[24] Zequn Liu, Wei Zhang, Yingce Xia, Lijun Wu, Shufang Xie, Tao Qin, Ming Zhang, and Tie-Yan Liu. Molxpt: Wrapping molecules with text for generative pre-training. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 1606-1616, 2023.

[25] Zipeng Zhong, Jie Song, Zunlei Feng, Tiantao Liu, Lingxiang Jia, Shaolun Yao, Min Wu, Tingjun Hou, and Mingli Song. Root-aligned smiles: a tight representation for chemical reaction prediction. Chemical Science, 13(31):9023-9034, 2022.

[26] Jiaje Zhang and Donald A Norman. Representations in distributed cognitive tasks. Cognitive science, 18(1):87-122, 1994.

[27] Jiajie Zhang. The nature of external representations in problem solving. Cognitive science, 21(2):179-217, 1997.

[28] David Eugene Smith and Louis Charles Karpinski. The hindu-arabic numerals. Ginn, 1911.

[29] John Olmsted and Gregory M Williams. Chemistry: the molecular science. Jones & Bartlett Learning, 1997.

[30] Vicente Talanquer. The complexity of reasoning about and with chemical representations. Jacs Au, 2(12):2658-2669, 2022.

[31] Mario Krenn, Florian Häse, AkshatKumar Nigam, Pascal Friederich, and Alan Aspuru-Guzik. Self-referencing embedded strings (selfies): A 100% robust molecular string representation. Machine Learning: Science and Technology, 1(4):045024, 2020.

[32] Juan-Ni Wu, Tong Wang, Yue Chen, Li-Juan Tang, Hai-Long Wu, and Ru-Qin Yu. t-smiles: a fragment-based molecular representation framework for de novo ligand design. Nature Communications, 15(1):4993, 2024.

[33] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In International Conference on Machine Learning, pages 1263-1272. PMLR, 2017.

[34] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017.

[35] Kristof T Schütt, Pieter-Jan Kindermans, Huziel E Sauceda, Stefan Chmiela, Alexandre Tkatchenko, and Klaus-Robert Müller. SchNet: A continuous-filter convolutional neural network for modeling quantum interactions. In Advances in Neural Information Processing Systems, volume 30, 2018.

[36] Gengmo Zhou, Zhifeng Gao, Qiankun Ding, Hang Zheng, Hongteng Xu, Zhewei Wei, Linfeng Zhang, and Guolin Ke. Uni-mol: A universal 3d molecular representation learning framework. In The Eleventh International Conference on Learning Representations, 2023.

[37] Hakim Hafidi, Mounir Ghogho, Philippe Ciblat, and Ananthram Swami. Graphcl: Contrastive self-supervised learning of graph representations. arXiv preprint arXiv:2007.08025, 2020.

[38] Shengchao Liu, Weili Nie, Chengpeng Wang, Jiarui Lu, Zhuoran Qiao, Ling Liu, Jian Tang, Chaowei Xiao, and Animashree Anandkumar. Multi-modal molecule structure-text model for text-based retrieval and editing. Nature Machine Intelligence, 5(12):1447-1457, 2023.

[39] Feiyang Cai, Jiahui Bai, Tao Tang, Guijuan He, Joshua Luo, Tianyu Zhu, Srikanth Pilla, Gang Li, Ling Liu, and Feng Luo. Mollangbench: A comprehensive benchmark for language-prompted molecular structure recognition, editing, and generation. arXiv preprint arXiv:2505.15054, 2025.

[40] Shengchao Liu, Hanchen Wang, Weiyang Liu, Joan Lasenby, Hongyu Guo, and Jian Tang. Pre-training molecular graph representation with 3d geometry. In International Conference on Learning Representations, 2022.

[41] Qiying Yu, Yudi Zhang, Yuyan Ni, Shikun Feng, Yanyan Lan, Hao Zhou, and Jingjing Liu. Multimodal molecular pretraining via modality blending. In The Twelfth International Conference on Learning Representations, 2024.

[42] Shikun Feng, Yuyan Ni, Minghao Li, Yanwen Huang, Zhi-Ming Ma, Wei-Ying Ma, and Yanyan Lan. Unicorn: A unified contrastive learning approach for multi-view molecular representation learning. arXiv preprint arXiv:2405.10343, 2024.

[43] Bing Su, Dazhao Du, Zhao Yang, Yujie Zhou, Jiangmeng Li, Anyi Rao, Hao Sun, Zhiwu Lu, and Ji-Rong Wen. A molecular multimodal foundation model associating molecule graphs with natural language. arXiv preprint arXiv:2209.05481, 2022.

[44] Dongki Kim, Wonbin Lee, and Sung Ju Hwang. Mol-llama: Towards general understanding of molecules in large molecular language model. Advances in Neural Information Processing Systems, 38:26921-26960, 2026.

[45] Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. DeepSeek-R1 incentivizes reasoning in llms through reinforcement learning. Nature, 645(8081):633-638, 2025.

[46] Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, et al. Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261, 2025.

[47] Google Deepmind. Gemini 3 pro model card, 2025.

[48] Sunghwan Kim, Jie Chen, Tiejun Cheng, Asta Gindulyte, Jia He, Siqian He, Qingliang Li, Benjamin A Shoemaker, Paul A Thiessen, Bo Yu, et al. Pubchem 2023 update. Nucleic acids research, 51(D1):D1373-D1380, 2023.

[49] Matt J Kusner, Brooks Paige, and José Miguel Hernández-Lobato. Grammar variational autoencoder. In International conference on machine learning, pages 1945-1954. PMLR, 2017.

[50] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In International conference on machine learning, pages 2323-2332. PMLR, 2018.

[51] Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin, Aiden Low, AJ Ostrow, Akhila Ananthram, et al. Openai gpt-5 system card. arXiv preprint arXiv:2601.03267, 2025.

[52] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837, 2022.

[53] Christopher Kuenneth and Rampi Ramprasad. polybert: a chemical language model to enable fully machine-driven ultrafast polymer informatics. Nature communications, 14(1):4099, 2023.

[54] Yajuan Li, Yatao Lang, Shu-Fan He, Daixi Li, Ke-Xin Liu, Wenying Ai, Yong Jiang, Chen Zhu, and Tao Shen. Programmable divergent electrochemical ring-opening multifunctionalization of strained rings. Nature Chemistry, pages 1-13, 2026.

[55] Ryan Paul WURZ, Michael Masaharu YAMANO, Stephen SARDINI JR., Wei ZHAO, Lalita TANWAR, Yunxiao LI, Brian Alan LANMAN, and Albert K. AMEGADZIE. Macrocyclic compounds as modulators of kras and uses thereof.

[56] Xi Fang, Jiankun Wang, Xiaochen Cai, Shangqian Chen, Shuwen Yang, Haoyi Tao, Nan Wang, Lin Yao, Linf eng Zhang, and Guolin Ke. Molparser: End-to-end visual recognition of molecule structures in the wild. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 24528-24538, 2025.

[57] Greg Landrum et al. RDKit: Open-source cheminformatics. http://www.rdkit.org, 2006. Version 2023.09.

[58] Jiatong Li, Junxian Li, Weida Wang, Yunqing Liu, Changmeng Zheng, Dongzhan Zhou, Xiao-yong Wei, and Qing Li. Speak-to-structure: Evaluating llms in open-domain natural language-driven molecule generation. arXiv preprint arXiv:2412.14642, 2024.

[59] Nicholas T Runcie, Charlotte M Deane, and Fergus Imrie. Assessing the chemical intelligence of large language models. Journal of Chemical Information and Modeling, 66(1):216-227, 2025.

[60] Shuan Chen, Ramil Babazade, Taewan Kim, Sunkyu Han, and Yousung Jung. A large-scale reaction dataset of mechanistic pathways of organic reactions. Scientific Data, 11(1):863, 2024.