Function Repository Resource:

CommonChemistrySearch

Source Notebook

Search the CAS Common Chemistry database for a substance

Contributed by: Jan Mangaldan

ResourceFunction["CommonChemistrySearch"]["chem"]

searches the CAS Common Chemistry database for the chemical "chem".

Details and Options

The "chem" is a query string representing the name of a substance. The query string accepts the asterisk (*) as a wildcard character.
ResourceFunction["CommonChemistrySearch"] also accepts Entity objects with the "Chemical" type.
ResourceFunction["CommonChemistrySearch"] returns a Dataset listing the substances found, and their corresponding CAS Registry Numbers.
ResourceFunction["CommonChemistrySearch"]["chem",MaxItemsn] limits the results to the first n found.

Examples

Basic Examples (1) 

Search the Common Chemistry database for water:

In[1]:=
ResourceFunction["CommonChemistrySearch"]["water"]
Out[1]=

Scope (2) 

Search with a chemical Entity:

In[2]:=
ResourceFunction["CommonChemistrySearch"][
 Entity["Chemical", "Imatinib"]]
Out[2]=

Search with a wildcard:

In[3]:=
ResourceFunction["CommonChemistrySearch"]["cef*"]
Out[3]=

Options (1) 

MaxItems (1) 

Limit the results to the first 10:

In[4]:=
ResourceFunction["CommonChemistrySearch"]["cef*", MaxItems -> 10]
Out[4]=

Properties and Relations (2) 

The resource function ValidCASNumberQ can be used to validate CAS numbers:

In[5]:=
ds = ResourceFunction["CommonChemistrySearch"]["glyphosate"]
Out[5]=
In[6]:=
ResourceFunction["ValidCASNumberQ"] /@ Normal[ds[All, "CASRegistryNumber"]]
Out[6]=

CommonChemistrySearch returns CAS numbers paired with substance names:

In[7]:=
ds = ResourceFunction["CommonChemistrySearch"]["tartrazine"]
Out[7]=

Use the resource function CommonChemistryLookup to get more information:

In[8]:=
ResourceFunction["CommonChemistryLookup"][
 First[Normal[ds[All, "CASRegistryNumber"]]]]
Out[8]=

Version History

  • 1.0.0 – 08 December 2022

Related Resources

License Information