Basic Examples
Basic Examples
Find the SMILES string from a chemical name:“AllowRadicals”:
["2-amino-14,16-dimethyloctadecan-3-ol"]
In[]:=
CCC(C)CC(C)CCCCCCCCCCC(O)C(C)N
Out[]=
Use a chemical name with defined stereochemistry:
["(2R,3S,4S,5R)-3-(dimethylamino)-2,4,5-trihydroxyhexanal"]
In[]:=
C[C@@H](O)[C@@H](O)[C@@H]([C@@H](O)C=O)N(C)C
Out[]=
Options
Options
Canonicalized SMILES strings will use aromatic bonds when possible. Use the “Canonicalize” option to toggle this behavior:
["benzene","Canonicalize"#]&/@{True,False}
In[]:=
{c1ccccc1,C1=CC=CC=C1}
Out[]=
Canonicalization will also make all SMILES strings referring to the same molecule equivalent:
Grid{{"Name","Canonicalized","Non-canonical"}}~Join~Functionname,Flatten@name,
[name,"Canonicalize"#]&/@{True,False}/@{"1,3-dichlorobenzene","2,4-dichlorobenzene","3,5-dichlorobenzene"},DividersCenter
In[]:=
Name | Canonicalized | Non-canonical |
1,3-dichlorobenzene | Clc1cccc(Cl)c1 | ClC1=CC(=CC=C1)Cl |
2,4-dichlorobenzene | Clc1cccc(Cl)c1 | ClC1=CC=CC(=C1)Cl |
3,5-dichlorobenzene | Clc1cccc(Cl)c1 | ClC=1C=CC=C(C1)Cl |
Out[]=
The “AllowRadicals” option controls how the name of chemical substituents are handled:
["methyl","AllowRadicals"#]&/@{True,False}
In[]:=
[CH3],Failure
Out[]=
["methyl","AddDummyAtoms"#]&/@{True,False}
In[]:=
{*C,[CH3]}
Out[]=