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`
EncodingToSelfies
​
EncodingToSelfies
[encoding,alphabet]
converts a label or one-hot
encoding
into a SELFIES string
​
Examples  
(2)
Basic Examples  
(1)
Convert an encoding to a SELFIES string:
In[1]:=
EncodingToSelfies
[{3,3,2,3,3,3,3,2,6,3,1,2,0,4,5,1,1,3,2,3,3,3,3,1,6},{"[C@H1]","[Ring1]","[Branch1]","[C]","[O]","[C@@H1]","[Ring2]"},"Label"]
Out[1]=
[C][C][Branch1][C][C][C][C][Branch1][Ring2][C][Ring1][Branch1][C@H1][O][C@@H1][Ring1][Ring1][C][Branch1][C][C][C][C][Ring1][Ring2]
In[2]:=
FromSelfies
@%
Out[2]=
CC1(C)CC(C1)[C@H1]2O[C@@H1]2C3(C)CC3
In[3]:=
MoleculePlot@%
Out[3]=
Neat Examples  
(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
SelfiesEncoding
 ▪
ToSelfies
 ▪
FromSelfies
""

© 2025 Wolfram. All rights reserved.

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