5
$\begingroup$

Short: How to get proton affinities for a large list of chemicals? A database? A programming API?

Longer:

I have ca. 2000 chemicals (downloaded from MCM, mostly organics that occur in the atmosphere and their reaction products). I would like to try to get proton affinities for as many of the 2000 chemicals as possible.

I know how to look up the proton affinity for a chemical in the NIST Chemistry WebBook (for example isoprene). But I would prefer to get a machine readable database, or a Python API (or any programming language), to get these nicely in a program code.

What options do I have?

(I am not going to get 2000 values by hand, so my last option would be to write a small web scraper to make these 2000 web queries)

$\endgroup$

1 Answer 1

5
$\begingroup$

To my knowledge, a (Python) API for the NIST chemistry WebBook does not exist.

Rather than filling out the Search for Species Data by CAS Registry Number by hand, you might want to use mechanize.

But since you're only interested in Gas phase ion energetics data anyway, you might want to construct the relevant URLs directly.

Isoprene:

http://webbook.nist.gov/cgi/cbook.cgi?ID=C78795&Units=SI&Mask=20#Ion-Energetics

Styrene:

http://webbook.nist.gov/cgi/cbook.cgi?ID=C100425&Units=SI&Mask=20#Ion-Energetics

The parameter pattern is obvious: ID is the CAS number of the compound minus the dashes, prefixed by C.

$\endgroup$
4
  • $\begingroup$ What is mechanize? $\endgroup$ Commented Sep 17, 2014 at 13:44
  • 3
    $\begingroup$ @SampoSmolander Mechanize is a Python module to emulate a browser and fill out forms, even the cgi stuff on the NISTwebBook sites. But you're probably better off to construct the URLs based on the CAS numbers, use urllib2 or requests to pull the data and process it with BeautifulSoup. A decent API would make our lives much easier! $\endgroup$ Commented Sep 17, 2014 at 13:47
  • 1
    $\begingroup$ Ah ok, 'mechanize' is a Python thing, not a chemistry thing. $\endgroup$ Commented Sep 17, 2014 at 13:49
  • $\begingroup$ Anyway, I am not limited to the NIST web data. If there would exist any other machine readable database containing this information, I could also use that. NIST is just the only thing (besides 19 pages in PDF from CRC Handbook) I found. $\endgroup$ Commented Sep 17, 2014 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.