-
See Also
- ServiceExecute
- ServiceConnect
-
- Service Connections
- PubChem
-
-
See Also
- ServiceExecute
- ServiceConnect
-
- Service Connections
- PubChem
-
See Also
"ChemSpider" (Service Connection)
Connecting & Authenticating
Requests
Search Compounds
"Search" — search by chemical identifier (name, SMILES, InChI, or InChIKey), molecular formula, or mass
| "Query" | (required) | search query |
| "SortBy" | None | fields to order by | |
| "StartIndex" | 1 | start index | |
| MaxItems | 10 | number of elements to return |
| "Formula" | (required) | formula to search by | |
| "Databases" | (required) | list of databases to use | |
| "StartIndex" | 1 | start index | |
| MaxItems | 10 | number of elements to return |
| "Mass" | (required) | mass value to search by | |
| "Range" | (required) | range of mass used for the search | |
| "Databases" | (required) | list of databases to use | |
| "StartIndex" | 1 | start index | |
| MaxItems | 10 | number of elements to return |
Compound Information
"CompoundInformation" — get record details (CSID, StdInChIKey, StdInChI, SMILES) by ID
| "ID" | (required) | ChemSpider ID | |
| "Fields" | All | list of fields to return |
Compound Thumbnail
"CompoundThumbnail" — get an image of the compound
| "ID" | (required) | ChemSpider ID |
Find Corresponding Chemical Identifiers
"Convert" — translate between identifier types
| "Query" | (required) | search query | |
| "InputFormat" | (required) | input format | |
| "OutputFormat" | (required) | output format |
List of Data Sources
"Databases" — get a list of all data sources used in ChemSpider
Validate an InChIKey
"InChIKeyQ" — check if the specified argument is a valid InChIKey
| "InChIKey" | (required) | InChIKey string to validate |
Compound Molecule
"CompoundMOL" — get the molecule of a compound
| "ID" | (required) | ChemSpider ID |
Parameter Details
| string | simple string | |
| {"InChI",string} | International Chemical Identifier | |
| {"InChIKey",string} | International Chemical Identifier key | |
| {"Name",string} | compund name | |
| {"SMILES",string} | SMILES string |
| "ID" | identifier | |
| "MolecularWeight" | molecular weight | |
| "ReferenceCount" | reference count | |
| "DataSourceCount" | data source count | |
| "PubMedCount" | PubMed count | |
| "RSCCount" | RSC count |
| "AverageMass" | average mass | |
| "CommonName" | common name | |
| "DataSourceCount" | data source count | |
| "Formula" | formula | |
| "InChI" | International Chemical Identifier | |
| "InChIKey" | International Chemical Identifier key | |
| "MOL2D" | 2D MDL MOL file | |
| "MOL3D" | 3D MDL MOL file | |
| "MolecularWeight" | molecular weight | |
| "MonoisotopicMass" | monoisotopic mass | |
| "NominalMass" | nominal mass | |
| "PubMedCount" | PubMed count | |
| "ReferenceCount" | reference count | |
| "RSCCount" | RSC count | |
| "SMILES" | SMILES string | |
| "StdInChI" | standard InChI | |
| "StdInChIKey" | standard InChI key |
| "InChI" | International Chemical Identifier | |
| "InChIKey" | International Chemical Identifier key | |
| "SMILES" | SMILES string |
| "InChI" | International Chemical Identifier | |
| "InChIKey" | International Chemical Identifier key | |
| "MOL" | MDL MOL file | |
| "SMILES" | SMILES string |
Examples
open all close allBasic Examples (5)
Create a new connection to ChemSpider:
cs = ServiceConnect["ChemSpider"]Get a sample of available databases:
RandomSample[cs["Databases"], 10]Search for a structure by name or keyword:
ServiceExecute["ChemSpider", "Search", <|"Query" -> "phenol"|>]Search for a compound ID by InChI:
ServiceExecute["ChemSpider", "Search", <|"Query" -> {"InChI", "InChI=1/C2H6O/c1-2-3/h3H,2H2,1H3"}|>]Search for a compound ID by SMILES:
ServiceExecute["ChemSpider", "Search", <|"Query" -> {"SMILES", "[Li+].[N-]=C=C"}|>]ServiceExecute["ChemSpider", "Search", <|"Formula" -> "C6H8", "Databases" -> {"BioCyc", "ChemBank", "SORD", "Wikipedia", "Wolfram|AlphaTM"}, MaxItems -> 10|>]Scope (7)
Search for compounds with a molecular mass within a given range:
ServiceExecute["ChemSpider", "Search", <|"Mass" -> 48, "Range" -> 2, "Databases" -> {"BioCyc", "ChemBank", "SORD", "Wikipedia", "Wolfram|AlphaTM"}, MaxItems -> 5|>]Get full information about a compound:
ServiceExecute["ChemSpider", "CompoundInformation", <|"ID" -> 9095684|>]Get specific fields about a compound's information:
ServiceExecute["ChemSpider", "CompoundInformation", <|"ID" -> 9095684, "Fields" -> {"AverageMass", "InChI", "SMILES", "Mol2D"}|>]ServiceExecute["ChemSpider", "CompoundThumbnail", <|"ID" -> 70659|>]ServiceExecute["ChemSpider", "Convert", <|"Query" -> "InChI=1/C2H6O/c1-2-3/h3H,2H2,1H3", "InputFormat" -> "InChI", "OutputFormat" -> "SMILES"|>]For a given InChI code, get the corresponding MOL file:
mol = ServiceExecute["ChemSpider", "Convert", <|"Query" -> "InChI=1S/C6H3BrClF/c7-4-1-5(8)3-6(9)2-4/h1-3H", "InputFormat" -> "InChI", "OutputFormat" -> "MOL"|>]Check if an InChIKey is valid:
ServiceExecute["ChemSpider", "InChIKeyQ", <|"InChIKey" -> "LFQSCWFLJHTTHZ-UHFFFAOYNA-N"|>]Neat Examples (1)
Create a new connection to ChemSpider:
cs = ServiceConnect["ChemSpider"]Get the molecule of a compound:
id = First@Lookup[Normal@cs["Search", <|"Query" -> {"InChI", "InChI=1S/C6H3BrClF/c7-4-1-5(8)3-6(9)2-4/h1-3H"}|>], "ID"]molecule = First[cs["CompoundMOL", <|"ID" -> id|>]]Get a 2D and 3D plots of the molecule:
Grid[{{"Molecule 2D", MoleculePlot[molecule]}, {"Molecule 3D", MoleculePlot3D[molecule]}}]