Skip to main content
Chemistry LibreTexts

Programmatic Access to Web-Based Chemical Information – Examples

  • Page ID
    95660
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    ualrimage_burned.png

     UALR 4399/5399: ChemInformatics
    Spring 2017: Belford
    LibreText

    Complete-edge-coloring.svg.png

      The above links brings you to a page where you can access and discuss examples created by faculty.

      Sources

      File types available from sources are given in parentheses.

      [CDK] https://ws1.bmc.uu.se/cdk (XML)
      [CDKD] CDK-Depict (SVG)
      [CIR] NCI/CADD Chemical Identifier Resolver (TXT, SDF, GIF)
      [CIP] TOXNET ChemicalIDplus (HTML only; no API)*
      [CS] ChemSpider (XML, PNG)*
      [NWB] NIST Web Book (HTML only; no API)*
      [PCE] PubChem E-Util (JSON, XML)
      [PCR] PubChem PUG REST (TXT, CSV, XML, JSON, JSONP, SDF, PNG)
      [WK] Wikipedia (JSON, JSONP, XML)

      * no direct JavaScript access (site does not allow direct access via AJAX; JavaScript and JSmol both use a proxy server)

      Examples

      1. Tasks that are solved with a single API call which returns the response in plain text or as a single object without any need of parsing or further processing

      1.1 Obtaining an InChI from a name or other chemical identifier
      1.1.1 [CIR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...D_InChI_JS.htm
      1.1.2 [CIR] JSmol: https://chemapps.stolaf.edu/olcc/exa...InChI_Jmol.htm
      1.1.3 [PCR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...m_InChI_JS.htm
      1.1.4 [PCR] JSmol: https://chemapps.stolaf.edu/olcc/exa...InChI_Jmol.htm
      1.1.5 [CIR] MS Excel (from 2013): https://drive.google.com/file/d/0B5l...UVmOTZmWWJiS2c
      1.1.6 [CIR] LO Calc: https://drive.google.com/file/d/0B5l...FgyanNrVlN3ME0
      1.1.7 [CIR] Google Sheets: https://docs.google.com/spreadsheets...0cyyggJPo/copy
      1.1.8 [CIR] Google Scripts: https://docs.google.com/spreadsheets...lxYcHEOj0/copy
      1.1.9 [PCR] Google Scripts: https://docs.google.com/spreadsheets...swPc_3Vrk/copy
      1.1.10 [CIR] Python: http://www.codeskulptor.org/#user41_g77tnnbEBT_2.py

      1.2 Obtaining a list of known chemical names from a name or other chemical identifier
      1.2.1 [CIR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...D_Names_JS.htm
      1.2.2 [CIR] JSmol: https://chemapps.stolaf.edu/olcc/exa...Names_Jmol.htm
      1.2.3 [PCR] JavaScript: https://drive.google.com/file/d/0B5l...VV5NXlxcVI2dU0

      1.3 Obtaining an SDF file from a name or other chemical identifier
      1.3.1 [CIR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...ADD_SDF_JS.htm
      1.3.2 [CIR] JSmol: https://chemapps.stolaf.edu/olcc/exa...D_SDF_Jmol.htm
      1.3.3 [PCR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...hem_SDF_JS.htm
      1.3.4 [PCR] JSmol: https://chemapps.stolaf.edu/olcc/exa...m_SDF_Jmol.htm

      1.4 Obtaining a chemical structure drawing as an image from a name or other chemical identifier
      1.4.1 [CIR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...D_image_JS.htm
      1.4.2 [CIR] JSmol: https://chemapps.stolaf.edu/olcc/exa...image_Jmol.htm
      1.4.3 [PCR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...m_image_JS.htm
      1.4.4 [PCR] JSmol: https://chemapps.stolaf.edu/olcc/exa...image_Jmol.htm

      1.5 Obtaining a chemical structure drawing as a vector image from a SMILES:
      1.5.1 [CDKD] JavaScript: https://chemapps.stolaf.edu/olcc/exa...K_image_JS.htm (SVG from SMILES)

      2. Tasks that are solved with a single API call that returns the response as a structured text file (tablular data, CSV, HTML) or data structure (XML, JSON)

      2.1 Find a CAS Registry Number from a name or other chemical identifier
      2.1.1 [NWB] MS Excel: https://drive.google.com/file/d/0B5l...UdkWWd5SlpTRUk
      2.1.2 [NWB] LO Calc: https://drive.google.com/file/d/0B5l...Vd0R2xHeFYwWlk
      2.1.3 [NWB] JavaScript: https://chemapps.stolaf.edu/olcc/exa...T_CASRN_JS.htm

      2.2 Find the boiling point from a CAS Registry Number
      2.2.1 [CIP] Google Sheets: https://docs.google.com/spreadsheets...WEGLOqc0Q/copy (as XML)
      2.2.2 [CIP] VBA: https://drive.google.com/file/d/0B5l...FR5aGVOUTB0aHc (as string data)
      2.2.3 [CIP] Javascript: https://chemapps.stolaf.edu/olcc/exa.../CIP_BP_JS.htm (as XML)

      3. Tasks that are solved using more than one API call in sequence

      3.1 Information for compounds with specific properties or ranges of properties
      3.1.1 [PCE] JavaScript: https://chemapps.stolaf.edu/olcc/exa...m_EUtil_JS.htm
      3.1.2 [PCE/PCR] Google Script: https://docs.google.com/spreadsheets...aFuae6QUg/copy

      3.2 Obtaining a ChemSpider ID from a name or other chemical identifier
      3.2.1 [CIR/CS] MS Excel (from 2013): https://drive.google.com/file/d/0B5l...UJscFNGQ0pqQU0
      3.2.2 [CIR/CS] JSmol: https://chemapps.stolaf.edu/olcc/exa..._image2_JS.htm

      3.3 Download an IR spectrum from a compound name (using NIST)
      3.3.1 [NWB] JavaScript: https://chemapps.stolaf.edu/olcc/exa...NIST_IR_JS.htm

      3.4 Download a IR/Mass/UVVis spectrum from a SMILES (using NIST)
      3.4.1 [PCR/CIP/NWB] Google Sheets: https://docs.google.com/spreadsheets...voywEOY4I/copy
      (note the document includes a minimal script with a user-defined function to do URI-encoding)

      3.5 Do two SMILES correspond to the same molecule?
      3.5.1 [CIR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...S_Match_JS.htm

      4. Tasks that involve using a single API that returns multiple responses, which need to be processed using an array, list, or object

      4.1 Information for compounds with specific properties or ranges of properties
      4.1.1 [PCE] JavaScript: https://chemapps.stolaf.edu/olcc/exa...m_EUtil_JS.htm

      4.2 Search for the translation of a compound name to a different languages
      4.2.1 [WK] JavaScript: https://drive.google.com/file/d/0B5l...UlOMjZzTHptZ28

      5. Tasks that involve an asynchronous queued request that requires polling of the server to determine completion

      5.1 Find the isomers of a compound from a name or molecular formula

      5.1.1 [PCR] VBA: https://drive.google.com/file/d/0B5l...jZTVkw5RlZkc0k
      5.1.2 [PCR] JavaScript: https://chemapps.stolaf.edu/olcc/exa...Polling_JS.htm

      (but see nonpolling example that accomplishes the same: https://chemapps.stolaf.edu/olcc/exa...em_Fast_JS.htm)

      Useful Web Tools

      Structure drawings from SMILES, with SMARTS-based highlighting https://chemapps.stolaf.edu/olcc/exa...cdk_depict.htm

      Interconverting 2D and 3D using SMILES https://chemapps.stolaf.edu/jmol/jsmol/jsmetest2.htm

      Contributors:

      Sunghwan Kim, National Center for Biotechnology Information
      Jordi Cuadros, IQS Universitat Ramon Llull
      Bob Hanson, St. Olaf
      Herman Bergwerf, TU Delft


      Programmatic Access to Web-Based Chemical Information – Examples is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.

      • Was this article helpful?