1. SMILES & SELFIES has to go : Representation of Molecules via Algebraic Data Types
- Author
-
Goldstein, Oliver and March, Samuel
- Subjects
Computer Science - Programming Languages ,Computer Science - Machine Learning - Abstract
The Algebraic Data Type (ADT) can be used as a computational framework for molecular representation for the purpose of advancing tasks in cheminformatics. This can include generative modles in the context of Bayesian machine learning via probabilistic programming. The ADT that we put forward, implements the 'Dietz' representation for molecular constitution via multigraphs of electron valence information, and uses 3D coordinate data to provide stereochemical information, easily enabling the representation of complex molecular phenomena such as organometallics, multi-center bonds, delocalized electrons, and resonant structures. Unlike traditional string-based representations such as SMILES and SELFIES, the ADT is much more flexible, yet retains desirable qualities from type-safety to seamless integration with Bayesian Probabilistic Programming. An extensive criticism of both SMILES and SELFIES, in this article, is given, along with criticisms of the so-called Future of SELFIES. An open-source library implemented in Haskell demonstrates the ADT along with experimental extensions demonstrating its use in reaction modelling, group theoretic applications, and integration with LazyPPL, a lazy probabilistic programming library. Also provided as an extension is the ability to represent electronic structures, including shells, subshells, and orbitals, significantly expanding its representational scope compared to other representations in the literature. These features position the proposed ADT as a robust alternative to existing molecular representations, addressing limitations such as inadequate support for 3D information and syntactic invalidity while offering a platform for innovative cheminformatics research. Accompanying discussions about the meaning of a `representation' are included. The fully functioning GitHub library can be found at https://github.com/oliverjgoldstein/chemalgprog., Comment: 1 Figure
- Published
- 2025