Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

Selfies

Guides

  • Selfies Functions

Tech Notes

  • Generating Molecules With SELFIES

Symbols

  • EncodingToSelfies
  • FromSelfies
  • SelfiesAlphabet
  • SelfiesCounts
  • SelfiesEncoding
  • SplitSelfies
  • ToSelfies
WolframChemistry`Selfies`
ToSelfies
​
ToSelfies
[smi]
converts the given SMILES to a SELFIES string.
​
​
ToSelfies
[mol]
generates a SMILES string from
mol
and converts to a SELFIES.
​
​
ToSelfies
[{
s
1
,
s
2
,…}]
returns a list of SELFIES strings.
​
Details and Options

Examples  
(3)
Basic Examples  
(2)
Convert a SMILES string to a SELFIES string:
In[1]:=
ToSelfies
["OC[C@H]1N(C[C@@H]([C@@H]1O)O)Cc1csc2c1ncnc2O"]
Out[1]=
[O][C][C@H1][N][Branch1][#Branch2][C][C@@H1][Branch1][Branch1][C@@H1][Ring1][Branch1][O][O][C][C][=C][S][C][=C][Ring1][Branch1][N][=C][N][=C][Ring1][=Branch1][O]
​
Convert a molecule to a SELFIES string:
In[1]:=
ToSelfies
Molecule
Formula:
C
9
H
11
N
O
2
Atoms:
23
Bonds:
24

Out[1]=
[N][C@@H1][C][C][=C][C][Branch1][C][O][=C][C][Branch1][C][O][=C][Ring1][Branch2][C][Ring1][O]
Options  
(1)

TechNotes
▪
Generating Molecules With SELFIES
RelatedGuides
▪
Selfies Functions
RelatedLinks
▪
Self-Referencing Embedded Strings (SELFIES): A 100% robust molecular string representationMario Krenn, Florian Haese, AkshatKumar Nigam, Pascal Friederich, Alan Aspuru-Guzik
See Also
FromSelfies
 ▪
SelfiesAlphabet
 ▪
SelfiesEncoding
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com