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

MoleculeFingerprints

Guides

  • Molecule Fingerprints

Tech Notes

  • Substructure Screening

Symbols

  • AtomPairFingerprint
  • ExtendedConnectivityFingerprint
  • LayeredFingerprint
  • MACCSKeysFingerprint
  • MoleculeDistanceMatrix
  • MoleculeDistance
  • MoleculeNearest
  • PatternFingerprint
  • SubstructureKeyFingerprint
  • TopologicalFingerprint
  • $DefaultFingerprintFormat
  • $DefaultFingerprintType
WolframChemistry`MoleculeFingerprints`
SubstructureKeyFingerprint
​
SubstructureKeyFingerprint
[mol,patts,"format"]
returns a molecule fingerprint in the given format using the provided patterns as keys.
​
​
SubstructureKeyFingerprint
[patts,"format"]
returns a function that can be applied to molecules.
​
Details and Options

Examples  
(3)
Basic Examples  
(2)
The simplest substructure patterns to use would be the elements of the periodic table:
In[1]:=
(patts=Map[MoleculePattern[{#},{}]&,ElementData[]])//Short
Out[1]//Short=
MoleculePattern
Atoms: 1
Bonds: 0
,MoleculePattern
Atoms: 1
Bonds: 0
,115,MoleculePattern
Atoms: 1
Bonds: 0

Using this list of patterns we can find the elemental composition of a molecule:
In[2]:=
SubstructureKeyFingerprint
Molecule
Formula:
C
19
H
16
BrN
O
3
S
Atoms:
41
Bonds:
43
,MoleculePattern[{#},{}]&/@ElementData[],"CountVector"
Out[2]=
MoleculePattern
Atoms: 1
Bonds: 0
19,MoleculePattern
Atoms: 1
Bonds: 0
1,MoleculePattern
Atoms: 1
Bonds: 0
3,MoleculePattern
Atoms: 1
Bonds: 0
1,MoleculePattern
Atoms: 1
Bonds: 0
1
​
The above example shows clearly how this fingerprint function works, but it is really just an inefficient way to get the elemental composition. A more interesting set of keys is included in the paclet assets:
In[1]:=
patts=Get[PacletObject["WolframChemistry/MoleculeFingerprints"]["AssetLocation","FP3 Substructure Keys"]];​​Keys@patts
Out[1]=
{cation,anion,aldehyde or ketone,aldehyde,ketone,thioaldehyde or thioketone,thioaldehyde,thioketone,imine,hydrazone,semicarbazone,thiosemicarbazone,oxime,oxime ether,ketene,keten acetyl derivative***,carbonyl hydrate,hemiacetal,acetal,hemiaminal,aminal,thiohemiaminal,thioacetal,enamine,enol,enol ether,hydroxy compound,alcohol,primary alcohol,secondary alcohol,tertiary alcohol,1,2-diol,1,2-aminoalcohol,phenol,1,2-diphenol,enediol,ether,dialkyl ether,alkylaryl ether,diaryl ether,thioether,disulfide,peroxide,hydroperoxide,aryl,heteroatom,HBA,HBD,ring,carboxylic acid,ester,nitro,nitrile,aniline,urea}
In[2]:=
SubstructureKeyFingerprint
[patts]/@Molecule
Formula:
C
23
H
28
N
2
O
4
Atoms:
57
Bonds:
59
,Molecule
Formula:
C
10
H
16
S
Atoms:
27
Bonds:
28
,Molecule
Formula:
C
10
H
15
Cl
O
3
S
Atoms:
30
Bonds:
31
,Molecule
Formula:
C
10
H
19
NO
Atoms:
31
Bonds:
31
,Molecule
Formula:
C
9
H
12
O
3
Atoms:
24
Bonds:
24

Out[2]=
NumericArray
Type: Integer8
Dimensions: {55}
,NumericArray
Type: Integer8
Dimensions: {55}
,NumericArray
Type: Integer8
Dimensions: {55}
,NumericArray
Type: Integer8
Dimensions: {55}
,NumericArray
Type: Integer8
Dimensions: {55}

In[3]:=
Total/@%
Out[3]=
{7,4,4,4,10}
Neat Examples  
(1)

SeeAlso
Molecule
 
▪
FeatureExtract
 
▪
TopologicalFingerprint
 
▪
MoleculeDistance
 
▪
AtomPairFingerprint
RelatedGuides
▪
Molecule Fingerprints
""

© 2025 Wolfram. All rights reserved.

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