ChemSpider is a free chemical database that contains information on millions of chemical compounds. It is maintained by the Royal Society of Chemistry and is one of the largest public databases of its kind.
It provides users with a wealth of information on chemical compounds, including their names, formulas, properties, and structures. The database also includes links to other resources, such as scientific articles and patents, that provide additional information on the compounds.
One of the key features of ChemSpider is its search functionality. Users can search for compounds based on a wide range of criteria, including their name, formula, structure, and properties. This makes it easy to find information on specific compounds or to explore the properties of a group of related compounds.
In addition to registering basic names and structural data, it is also possible to refer to physical property values and spectral data, as well as information on suppliers that can be purchased. Structural formulas can also be converted to SMILES, InChI, etc.
ChemSpiPy is a Python library that provides a simple interface for accessing the ChemSpider web service, which is a repository of chemical compounds and their associated data. With ChemSpiPy, users can search for compounds by name, chemical structure, or identifier, and retrieve various pieces of information about them, such as molecular weight, melting point, boiling point, and so on.
RSC publishes WEB API, and it can be used by registering as a user. By using this API via python, it becomes possible to automate various tasks. The library for that is ChemSpiPy
we will look at how to obtain compound data by accessing ChemSpider, a chemical database managed by The Royal Society of Chemistry (RSC), using python.
To use it, you need to register as a user on the ChemSpider website and apply for API usage. Please create an account from the Developers Portal and follow tutorials here https://developer.rsc.org/get-started
In your notebook, install using pip!
chemspipy.ChemSpider()
Then connect to ChemSpider by creating a ChemSpider instance using your API key in the code below. Since the API key is linked to the personal information entered during user registration, don't share it with others. Even when you publish your code, be careful not to expose your API key.
This code assigns the compound with ID 2424 to the variable "caff" and then returns the value of "caff" which is Caffeine
Here is a summary of the major records and properties that can be accessed from the Compound object.
we propose here that the compound is assigned to caff
The get_details method is used to obtain various information at the same time when you acquire the compound.
ChemSpider. convert( input , input_format , output_format )
Converts the input format to the specified format.
Allowed conversions:
From InChI to InChIKey
From InChI to Mol
From InChI to SMILES
From InChIKey to InChI
From InChIKey to Mol
From Mol to InChI
From Mol to InChIKey
From SMILES to InChI
See the following example: