<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Depth-First: An Introduction to the Rubidium Cheminforamtics Toolkit: Interconvert SMILES, InChI, and Molfile with an Open Babel-Like Interface</title>
    <link>http://depth-first.com/articles/2007/10/15/an-introduction-to-the-rubidium-cheminforamtics-toolkit-interconvert-smiles-inchi-and-molfile-with-an-open-babel-like-interface</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>An Introduction to the Rubidium Cheminforamtics Toolkit: Interconvert SMILES, InChI, and Molfile with an Open Babel-Like Interface</title>
      <description>&lt;p&gt;&lt;img src="http://depth-first.com/demo/20071015/rubidium.png" align="right"&gt;&lt;/img&gt;Interconverting molecular languages is a very common operation in cheminformatics, so convenient conversion tools are desirable. Recent articles have discussed JRuby as a &lt;a href="http://depth-first.com/articles/tag/ruby"&gt;functional cheminformatics scripting environement&lt;/a&gt;. In this article, we'll see how this functionality can be combined with convenience for molecular language conversions.&lt;/p&gt;

&lt;p&gt;In addition to illustrating a technique, this article is the first in a series aimed at documenting a new cheminformatics toolkit for Ruby called "Rubidium". Rubidium will provide a unified set of Ruby APIs for working with diverse Open Source cheminformatics tools.&lt;/p&gt;

&lt;p&gt;Rubidium will be distributed under the highly permissive &lt;a href="http://www.opensource.org/licenses/mit-license.php"&gt;MIT License&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Prerequisites&lt;/h4&gt;

&lt;p&gt;This Rubidium library requires &lt;a href="http://jruby.codehaus.org/"&gt;JRuby&lt;/a&gt; and the &lt;a href="http://cdk.sf.net"&gt;Chemistry Development Kit&lt;/a&gt; (CDK). Copying the &lt;a href="http://downloads.sourceforge.net/cdk/cdk-1.0.1.jar?modtime=1182877138&amp;amp;big_mirror=0"&gt;CDK jarfile&lt;/a&gt; into your JRuby &lt;tt&gt;lib&lt;/tt&gt; directory is all that's needed.&lt;/p&gt;

&lt;h4&gt;The Library&lt;/h4&gt;

&lt;p&gt;The goal of this library is to provide a simple, yet flexible way to interconvert SMILES, InChI, and molfile formats. It was inspired the &lt;a href="http://openbabel.sf.net"&gt;Open Babel&lt;/a&gt; library, in which an &lt;tt&gt;OBConversion&lt;/tt&gt; object is configured with input and output formats prior to performing one or more conversions. In today's library, a similar Ruby interface is created for the CDK. Because of it's length, it won't be presented in its entirety. Instead, it can be &lt;a href="http://depth-first.com/demo/20071015/cdk.rb"&gt;downloaded here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Testing the Library&lt;/h4&gt;

&lt;p&gt;The library can be tested by saving it as a file called &lt;strong&gt;cdk.rb&lt;/strong&gt; and invoking &lt;tt&gt;jirb&lt;/tt&gt;. We can then convert a SMILES for benzene into the InChI for benzene:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ jirb
irb(main):001:0&gt; require 'cdk'
=&gt; true
irb(main):002:0&gt; c=CDK::Conversion.new
=&gt; #&amp;lt;CDK::Conversion:0x4c6320 ... &amp;gt;
irb(main):003:0&gt; c.set_formats 'smi', 'inchi'
=&gt; "inchi"
irb(main):004:0&gt; c.convert 'c1ccccc1'
=&gt; "InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H"
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Upcoming articles will show more examples of interconversions using this library, and discuss some of its limitations.&lt;/p&gt;

&lt;h4&gt;An Aside&lt;/h4&gt;

&lt;p&gt;It might be useful for Rubidium to support multiple &lt;tt&gt;Conversions&lt;/tt&gt;, each using its own cheminformatics toolkit. For example, a recent article discussed &lt;a href="http://depth-first.com/articles/2007/06/25/interconvert-almost-any-smiles-and-inchi-with-ruby-open-babel"&gt;SMILES and InChI interconversion with Ruby Open Babel&lt;/a&gt;. With a little tweaking, the Ruby Open Babel &lt;tt&gt;OBConversion&lt;/tt&gt; interface could be make identical to the Ruby interface used in today's tutorial. We could also configure &lt;a href="http://joelib.sf.net"&gt;JOELib&lt;/a&gt; and &lt;a href="http://sf.net/projects/rosetta"&gt;Rosetta&lt;/a&gt; &lt;tt&gt;Conversions&lt;/tt&gt; in an analogous fashion.&lt;/p&gt;

&lt;p&gt;Rubidium would then offer a family of molecular language converters, each of which used exactly the same API. We could then pick the best converter based on the situation at hand.&lt;/p&gt;

&lt;h4&gt;Conclusions&lt;/h4&gt;

&lt;p&gt;With just a little Ruby code, we've created a convenient Ruby interface for interconverting SMILES, InChI, and molfile formats. JRuby supports even more interconversions through the CDK as well as other Java and Java Native Interface libraries. Future articles will discuss some of the possibilities.&lt;/p&gt;</description>
      <pubDate>Mon, 15 Oct 2007 10:59:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fbde8b22-25ba-498c-8ade-b9a74738d560</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/10/15/an-introduction-to-the-rubidium-cheminforamtics-toolkit-interconvert-smiles-inchi-and-molfile-with-an-open-babel-like-interface</link>
      <category>Tools</category>
      <category>rubidium</category>
      <category>jruby</category>
      <category>java</category>
      <category>cdk</category>
    </item>
    <item>
      <title>"An Introduction to the Rubidium Cheminforamtics Toolkit: Interconvert SMILES, InChI, and Molfile with an Open Babel-Like Interface" by Rich Apodaca</title>
      <description>&lt;p&gt;Kim,&lt;/p&gt;

&lt;p&gt;Thanks for that reminder about Mac. You might try working with Sam Adams to get a Mac OS binary distributed w/ the JNI-InChI library. You can reach him via the &lt;a href="https://lists.sourceforge.net/lists/listinfo/cdk-devel" rel="nofollow"&gt;cdk-devel&lt;/a&gt; mailing list.&lt;/p&gt;

&lt;p&gt;Thanks for info about Safari and this site. Safari for Windows also can't be used to post comments. At least its consistent...&lt;/p&gt;</description>
      <pubDate>Tue, 16 Oct 2007 08:45:55 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8c288f51-f569-44ab-88a2-ba9742626df4</guid>
      <link>http://depth-first.com/articles/2007/10/15/an-introduction-to-the-rubidium-cheminforamtics-toolkit-interconvert-smiles-inchi-and-molfile-with-an-open-babel-like-interface#comment-219</link>
    </item>
    <item>
      <title>"An Introduction to the Rubidium Cheminforamtics Toolkit: Interconvert SMILES, InChI, and Molfile with an Open Babel-Like Interface" by Kim Hanjo</title>
      <description>&lt;p&gt;One more report on this blog. I can't leave a comment in Safari browser, while Firefox and IE works well. I don't know why and how to fix it. I have tried several times to write comments on your posts but to fail, which was the problem of Safari (3 beta version).&lt;/p&gt;</description>
      <pubDate>Tue, 16 Oct 2007 01:33:03 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:be456733-e57f-4fae-a683-791b9f909f5b</guid>
      <link>http://depth-first.com/articles/2007/10/15/an-introduction-to-the-rubidium-cheminforamtics-toolkit-interconvert-smiles-inchi-and-molfile-with-an-open-babel-like-interface#comment-218</link>
    </item>
    <item>
      <title>"An Introduction to the Rubidium Cheminforamtics Toolkit: Interconvert SMILES, InChI, and Molfile with an Open Babel-Like Interface" by Kim Hanjo</title>
      <description>&lt;p&gt;Just a trivial report on Mac OS.&lt;/p&gt;

&lt;p&gt;It seems that Rubidium requires the JNI-InCHI wrapper, which in turn requires InCHI itself. As InCHI is available on Windows and Linux, but not on MacOS right now, I coudn't use this library on my Macbook. Of course, I can modify (delete InCHI-related stuffs in) cdk.rb file to work on Mac OS.&lt;/p&gt;</description>
      <pubDate>Tue, 16 Oct 2007 01:27:42 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ab8e5da5-ac26-4266-ad7c-b3b7af841427</guid>
      <link>http://depth-first.com/articles/2007/10/15/an-introduction-to-the-rubidium-cheminforamtics-toolkit-interconvert-smiles-inchi-and-molfile-with-an-open-babel-like-interface#comment-217</link>
    </item>
    <item>
      <title>"An Introduction to the Rubidium Cheminforamtics Toolkit: Interconvert SMILES, InChI, and Molfile with an Open Babel-Like Interface" by Egon Willighagen</title>
      <description>&lt;p&gt;Rich, Bioclipse will have Ruby scripting support in Bioclipse, and looking forward to the Rubidium plugin ! Cheers!&lt;/p&gt;</description>
      <pubDate>Mon, 15 Oct 2007 23:49:56 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:36835e7b-06f4-4a3e-a348-82445652fd06</guid>
      <link>http://depth-first.com/articles/2007/10/15/an-introduction-to-the-rubidium-cheminforamtics-toolkit-interconvert-smiles-inchi-and-molfile-with-an-open-babel-like-interface#comment-216</link>
    </item>
  </channel>
</rss>
