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`
SelfiesCounts
​
SelfiesCounts
[{
s
2
,
s
2
,..}]
returns an
Association
of SELFIES tokens and their counts in the input selfies.
​
Examples  
(1)
Basic Examples  
(1)
Find the frequency of SELFIES tokens in an entity class:
In[1]:=
SelfiesCounts

ToSelfies

lipids
CHEMICALS
["SMILES"]
Out[1]=
[C]738,[=C]14,[=Branch1]53,[=O]51,[Ring1]10,[O]48,[Branch1]13,[F]1,[#Branch2]2,[#Branch1]3,[N]2,[Branch2]6,[Ring2]2,[=N]1,[=Branch2]2,[O-1]5,.4,[Na+1]2,[K+1]2,[P]1,[N+1]1
Compare this to the tokens found in thiazoles:
In[2]:=
SelfiesCounts

ToSelfies

thiazoles
CHEMICALS
["SMILES"]
Out[2]=
[C]2237,[=C]935,[S]352,[=N]231,[Ring1]595,[Branch1]651,[N]349,[=Branch1]650,[Ring2]271,[#N]8,[=O]254,[O]180,[=Branch2]102,[Branch2]85,[N+1]27,[O-1]40,[Cl]30,.46,[F]22,[Si]1,[#Branch1]51,[Br]25,[#Branch2]22,[S-1]3,[Na+1]9,[#C]7,[P]8,[=S]2,[Br-1]3,[Cl-1]2,[=N+1]10,[I-1]6,[B]1,[Sn]1,[Zn+2]1,[NH3+1]1,[=Ring1]2,[Cl+3]2
Compare this to the tokens found in mineral acids:
In[3]:=
SelfiesCounts

ToSelfies

mineral acids
CHEMICALS
["SMILES"]
Out[3]=
[F]1,[S]4,[Cl]2,[N]2,[=N+1]1,[=N-1]1,[=Branch1]13,[C]21,[=O]13,[O]28,[B]1,[Branch1]8,[N+1]2,[O-1]2,[Br]2,[P]4,[Cr]1,[I]2
SeeAlso
ToSelfies
 
▪
FromSelfies
 
▪
Molecule
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
""

© 2025 Wolfram. All rights reserved.

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