Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
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
Create a Paclet
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`
S
e
l
f
i
e
s
E
n
c
o
d
i
n
g
S
e
l
f
i
e
s
E
n
c
o
d
i
n
g
[
s
e
l
f
i
e
s
,
a
l
p
h
a
b
e
t
]
c
o
n
v
e
r
t
s
a
S
E
L
F
I
E
S
s
t
r
i
n
g
t
o
a
n
i
n
t
e
g
e
r
-
l
a
b
e
l
e
d
e
n
c
o
d
i
n
g
.
S
e
l
f
i
e
s
E
n
c
o
d
i
n
g
[
s
e
l
f
i
e
s
,
a
l
p
h
a
b
e
t
,
"
O
n
e
H
o
t
"
]
r
e
t
u
r
n
s
a
l
i
s
t
o
f
b
o
o
l
e
a
n
v
e
c
t
o
r
s
f
o
r
e
a
c
h
t
o
k
e
n
i
n
t
h
e
S
E
L
F
I
E
S
s
t
r
i
n
g
.
Examples
(
1
)
Basic Examples
(
1
)
Create an alphabet from a SELFIES string:
I
n
[
1
]
:
=
a
l
p
h
a
b
e
t
=
S
e
l
f
i
e
s
A
l
p
h
a
b
e
t
s
e
l
f
i
e
s
=
T
o
S
e
l
f
i
e
s
[
"
C
C
1
(
C
)
C
C
(
C
1
)
[
C
@
H
]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