{"id":3780,"date":"2011-06-20T16:11:35","date_gmt":"2011-06-20T14:11:35","guid":{"rendered":"http:\/\/18.198.170.41\/?p=3780"},"modified":"2021-12-22T11:30:09","modified_gmt":"2021-12-22T09:30:09","slug":"a-quick-way-to-programmatically-check-compound-availability","status":"publish","type":"post","link":"https:\/\/blog.molport.com\/archive\/a-quick-way-to-programmatically-check-compound-availability\/","title":{"rendered":"A Quick Way To Programmatically Check Compound Availability"},"content":{"rendered":"<p>If you work in virtual compound screening, you need a compound database. Of course, testing a compound is a lot easier if you can select compounds that can be quickly ordered, that are in stock. You can collect and regularly update supplier catalogs, but to do so comprehensively is a full time job. There are several ready to use commercial, academic and government databases, example,\u00a0<a href=\"http:\/\/zinc.docking.org\/\">ZINC<\/a>,\u00a0<a href=\"http:\/\/cococo.unimore.it\/tiki-index.php\">CoCoCo<\/a>. A number of our partners are using the Molport database of commercially available compounds in their in-house chemical databases. But no matter which database you use, by the time you download it, it is out of date.<\/p>\n<p>Choose a database that is regularly updated. I already wrote\u00a0<a href=\"http:\/\/blog.molport.com\/2011\/05\/is-this-compound-in-stock.html\">on the importance of supplier catalog update<\/a>\u00a0previously. While building blocks may be sold by a supplier for many years, screening compounds sell out often in a year or two. So if you work with a database that hasn\u2019t updated a supplier\u2019s catalog in over a year \u2013 expect that a significant fraction of compounds will no longer be available. No matter which database you use, however, by the time you download it, it is out of date. Of course, if you carefully select 100 compounds for testing, you would prefer for most of them \u00a0to be in stock. What to do then?<\/p>\n<p>We have been thinking about this problem for a while and have discussed it with several of you. Besides updating our database frequently, we are now providing monthly incremental database updates: newly added compounds and no longer available compounds. We are also testing a tool that will enable you to programmatically and instantly check the latest compound availability information in the Molport database. In a special URL you can specify the Molport compound ID and get back XML data from the database:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3781\" src=\"http:\/\/18.198.170.41\/wp-content\/uploads\/2021\/12\/molport-hml-data-from-database.gif\" alt=\"\" width=\"834\" height=\"232\" \/><\/p>\n<ul>\n<li>The\u00a0<i>status\u00a0<\/i>field returns values\u00a0<b>shop\u00a0<\/b>(compound can be ordered online),\u00a0<b>source\u00a0<\/b>(compound\u00a0can be ordered by requesting a quote) or\u00a0<b>unavailable\u00a0<\/b>(it is sold out).<\/li>\n<li>The\u00a0<i>type\u00a0<\/i>filed returns values\u00a0<b>stock\u00a0<\/b>(supplier has\u00a0already\u00a0made this compound and it is in \u00a0his warehouse) or\u00a0<b>virtual\u00a0<\/b>(these are compounds that can be made on your request).<\/li>\n<li>The field\u00a0<i>available_mg\u00a0<\/i>lists the largest\u00a0<b>amount\u00a0<\/b>of a \u00a0compound available (in miligrams).<\/li>\n<\/ul>\n<p>It works similarly to\u00a0<a href=\"http:\/\/cactus.nci.nih.gov\/chemical\/structure\">NCI Chemical\u00a0Identifier\u00a0Resolver<\/a>. You can write a simple code that goes through the list of compounds and checks which of them are available in the needed quantity. So if you need \u00a010 miligrams each of 100 compounds, maybe out of the first 100 only 84 will be available. You can immediately add more compounds until you have 100.<\/p>\n<p>This can even be done without programming in Google Spreadsheet. Here is an example of a table that uses\u00a0<a href=\"https:\/\/docs.google.com\/support\/bin\/answer.py?answer=75507\">ImportXML function<\/a>\u00a0and parses two fields from the XML data:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3783 aligncenter\" src=\"http:\/\/18.198.170.41\/wp-content\/uploads\/2021\/12\/google-spreadsheet-xml-data.gif\" alt=\"\" width=\"256\" height=\"607\" \/><\/p>\n<p>The syntax to get the value sourced in the cell\u00a0<b>B2<\/b>\u00a0is as follows:<br \/>\n=ImportXml(&#8220;molportURL&amp;molecule=&#8221;&amp;<b>A2<\/b>;&#8221;data\/<b>status<\/b>&#8220;)<br \/>\nwhere\u00a0<i>molportURL<\/i>\u00a0is an abbreviation of the full URL of this service.<\/p>\n<h3><span class=\"Apple-style-span\">Can this be potentially useful to you?<\/span><\/h3>\n<p>If you would like to know more about this new Molport service or the available compound database, write me through\u00a0<a href=\"http:\/\/www.molport.com\/buy-chemicals\/contact-us\">Molport contact us form<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you work in virtual compound screening, you need a compound database. Of course, testing a compound is a lot easier if you can select compounds that can be quickly ordered, that are in stock. You can collect and regularly update supplier catalogs, but to do so comprehensively is a full time job. There are<\/p>\n","protected":false},"author":6,"featured_media":4002,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[29],"tags":[],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/posts\/3780"}],"collection":[{"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/comments?post=3780"}],"version-history":[{"count":2,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/posts\/3780\/revisions"}],"predecessor-version":[{"id":4056,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/posts\/3780\/revisions\/4056"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/media\/4002"}],"wp:attachment":[{"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/media?parent=3780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/categories?post=3780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.molport.com\/wp-json\/wp\/v2\/tags?post=3780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}