<?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: Tag chemruby</title>
    <link>http://depth-first.com/articles/tag/chemruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>ChemRuby First Look</title>
      <description>&lt;p&gt;&lt;a href="http://ruby-lang.org/en"&gt;Ruby&lt;/a&gt; is a dynamic object oriented scripting language. First released in 1995 by a Japanese programmer, it has recently begun to attract a worldwide audience.&lt;/p&gt;

&lt;p&gt;The use of Ruby in chemical informatics, although currenly rare, can be expected to increase. One especially interesting project is &lt;a href="http://chemruby.org"&gt;ChemRuby&lt;/a&gt;. Although the website is written in Japanese, there is enough English to get a feel for what ChemRuby is all about.&lt;/p&gt;

&lt;p&gt;I was unsuccessful in installing the 1.0 source due to a failed dependency on the Ruby library "dbm". I was, however, able to install version 0.9.3 via RubyGems (&lt;code&gt;sudo gem install chemruby&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The code snippet below creates cyclohexane from the corresponding SMILES string, and then prints out the the number of atoms and molecular weight.&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;require&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;rubygems&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;span class="ident"&gt;require_gem&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;chemruby&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;

&lt;span class="ident"&gt;mol&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;SMILES&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;C1CCCCC1&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;

&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;mol&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;nodes&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;size&lt;/span&gt;
&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="ident"&gt;mol&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;molecular_weight&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Browsing the API documentation shows some interesting functionality, including ring perception, cannonical SMILES, and isomorphism detection.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Aug 2006 18:19:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:aa9331d7-438f-4906-ba06-71444eb1ca6a</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2006/08/13/chemruby-first-look</link>
      <category>Tools</category>
      <category>ruby</category>
      <category>chemruby</category>
      <category>smiles</category>
    </item>
  </channel>
</rss>
