Grammar-driven SMILES standardization with TokenSMILES

Luis Armando González-Ortiz, Lisset Noriega, Filiberto Ortíz‐Chi, Gabriela Vidales-Ayala, Emmanuel Soberanis-Cáceres, Amilcar Meneses‐Viveros, Alán Aspuru‐Guzik, Gabriel MerinoChemical 2025

Abstract

The redundancy of <i>SMILES</i> notation, where multiple strings can describe the same molecule, remains a challenge in computational chemistry and cheminformatics. To mitigate this issue, we introduce <i>TokenSMILES</i>, a grammatical framework that standardizes <i>SMILES</i> into structured sentences composed of context-free words. By applying five syntactic constraints (including branch limitations, balanced parentheses, and aromaticity exclusion), <i>TokenSMILES</i> minimizes redundant <i>SMILES</i> enumerations for alkanes while maintaining valence and octet compliance through semantic parsing rules. <i>TokenSMILES</i> does not replace <i>SMILES</i> but rather formalizes its syntax into a standardized, machine-interpretable form. This grammatical structure enables controlled generation and manipulation of valid <i>SMILES</i> strings, ensuring syntactic and semantic consistency while substantially reducing redundancy. Implemented into <i>SmilX</i>, an open-source tool, <i>TokenSMILES</i> generates valid <i>SMILES</i> with accuracy comparable to existing computational implementations for molecules with low hydrogen deficiency (HDI ≤ 4). Its applicability extends beyond alkanes through stoichiometric modifications such as bond insertion, cyclization, and heteroatom substitution. Nevertheless, challenges remain for highly unsaturated systems, where canonicalization artifacts highlight the need for dynamic feasibility checks. By integrating linguistic principles with cheminformatics, <i>TokenSMILES</i> establishes a scalable framework for systematic chemical space exploration, supporting applications in drug discovery, materials design, and machine learning-driven molecular innovation.
BibTeX
@inproceedings{gonzalezortiz2025grammar,
  author = {Luis Armando González-Ortiz and Lisset Noriega and Filiberto Ortíz‐Chi and Gabriela Vidales-Ayala and Emmanuel Soberanis-Cáceres and Amilcar Meneses‐Viveros and Alán Aspuru‐Guzik and Gabriel Merino},
  title = {{Grammar-driven SMILES standardization with <i>TokenSMILES</i>}},
  booktitle = {Chemical},
  year = {2025},
  doi = {10.1039/d5sc05004a},
}

Loading related content...

Figure