Back to directory

MoleCode

An LLM-native molecular representation that writes molecules as an explicit, typed graph of atoms and bonds instead of a linear SMILES string, so a language model can read, write and edit chemical structure directly.

MoleCode

MoleCode is an LLM-native, graph-explicit molecular language. Where SMILES encodes a molecule's graph implicitly in a linear string that a model must first reconstruct before it can reason about chemistry, MoleCode writes every atom and bond as a typed declaration with a persistent identifier, serialized as a graph the model can read, write and edit directly.

It converts deterministically and losslessly to and from SMILES and MOL formats through RDKit, with no learned model and no information loss, and the same node-and-edge grammar covers small molecules, polymers, Markush structures, reaction mechanisms and multimodal document parsing.

In the project's benchmarks, SMILES-based accuracy collapses from about 42% on familiar molecules to about 20% on novel ones, while MoleCode holds around 76-80% across all familiarity levels, and its chain-of-thought length grows sub-linearly with molecule size rather than the super-linear growth seen with SMILES.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.