AI Insight
Researchers introduce MoleCode, a new molecular representation language designed specifically for large language models (LLMs) that encodes molecular graphs explicitly — with typed entities, persistent identifiers, and direct relational links — rather than relying on linear string formats like SMILES, where topology is implicit. By making molecular structure directly readable within the language context, MoleCode allows LLMs to operate on chemical structure rather than first reconstructing it from compact syntax. Empirical results show improvements across molecular reasoning, editing, generation, and optimization tasks, particularly for unfamiliar molecules, topology-sensitive operations, larger structures, and polymers, while also producing shorter and more chemically focused inference traces.
Why it matters
MoleCode could meaningfully accelerate AI-assisted drug discovery, materials science, and chemical patent analysis by enabling LLMs to handle complex molecular structures more reliably and efficiently without requiring additional model training. The framework's extension to polymers, Markush structures, and scientific documents suggests broad practical applicability across chemistry and related industries.
arXiv:2605.16480v1 Announce Type: new
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.
Source: MoleCode unlocks structural intelligence in large language models