<?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: Simple 3D Conformer Generation with Smi23D</title>
    <link>http://depth-first.com/articles/2007/12/12/simple-3d-conformer-generation-with-smi23d</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Simple 3D Conformer Generation with Smi23D</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/42614915@N00/133799283/"&gt;&lt;img src="http://depth-first.com/demo/20071212/3d.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Three-dimensional conformer generation is a common problem in cheminformatics. The most convenient and generally-useful method for creating chemical structures is the &lt;a href="http://depth-first.com/articles/2007/11/27/chemwriter-chemical-structures-and-the-web"&gt;2D chemical structure editor&lt;/a&gt;; applications that require three-dimensional representations need a way to generate reasonable coordinates from 2D user input. &lt;a href="http://miningdrugs.blogspot.com/2007/10/open-source-conformer-generators-are.html"&gt;Until recently&lt;/a&gt;, there were no options for doing so with Open Source software. This article shows how the Open Source package &lt;a href="http://www.chembiogrid.org/cheminfo/smi23d/"&gt;smi23d&lt;/a&gt; can be used to convert ordinary SMILES strings into three-dimensional molfile representations.&lt;/p&gt;

&lt;h4&gt;About smi23d&lt;/h4&gt;

&lt;p&gt;smi23d uses a two-stage process to generate 3D coordinates.; an initial pass with &lt;tt&gt;smi2sdf&lt;/tt&gt; generates rough coordinates and subsequent refinement by &lt;tt&gt;mengine&lt;/tt&gt; results in the final coordinates. The package was originally written in C by Kevin Gilbert and updated by &lt;a href="http://cheminfo.informatics.indiana.edu/~rguha/index.html"&gt;Rajarshi Guha&lt;/a&gt;. As part of what appears to be a growing trend in cheminformatics, smi23d is licensed under the highly-permissive &lt;a href="http://opensource.org/licenses/apache2.0.php"&gt;Apache License&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On a related note, the source code for a program called &lt;a href="http://bioserv.rpbs.jussieu.fr/Help/Frog-Help.html"&gt;Frog&lt;/a&gt; is reportedly &lt;a href="http://baoilleach.blogspot.com/2007/10/ann-frog-donates-code-to-openbabel-for.html"&gt;on its way&lt;/a&gt; into the &lt;a href="http://openbabel.sf.net"&gt;Open Babel&lt;/a&gt; project.&lt;/p&gt;

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

&lt;p&gt;To build smi23d, you'll need to install &lt;a href="http://www.scons.org/"&gt;Scons&lt;/a&gt;, a Make-like build utility written in Python. I was able to install the &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=30337&amp;amp;package_id=22359"&gt;Scons rpm&lt;/a&gt; on my Linux system without a problem. smi23d uses no other dependencies.&lt;/p&gt;

&lt;h4&gt;Download smi23d&lt;/h4&gt;

&lt;p&gt;smi23d can be downloaded with Subversion:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ svn co https://cicc-grid.svn.sourceforge.net/svnroot/cicc-grid/cicc-grid/smi23d/trunk smi23d
&lt;/pre&gt;
&lt;/div&gt;

&lt;h4&gt;Building smi23d&lt;/h4&gt;

&lt;p&gt;With the source code in place, compilation is just a matter of running Scons:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ cd smi23d
$ scons
...
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Once the sources are compiled, we'll want to configure our system a bit:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ cd build
$ ls
mmff94.prm  mmxconst.prm

$ cp ../src/smi2sdf/smi2sdf .
$ cp ../src/mengine/mengine .
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The two files &lt;strong&gt;mmff94.prm&lt;/strong&gt; and &lt;strong&gt;mmxconst.prm&lt;/strong&gt; are parameter files needed by both &lt;tt&gt;smi2sdf&lt;/tt&gt; and &lt;tt&gt;mengine&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;With &lt;tt&gt;smi2sdf&lt;/tt&gt; and &lt;tt&gt;mengine&lt;/tt&gt; both in the &lt;strong&gt;build&lt;/strong&gt; directory, we can create a simple test with the SMILES for &lt;a href="http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=132999"&gt;Ivabradine&lt;/a&gt;:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ vi test.smi
...

$ cat test.smi
CN(CCCN1CCC2=CC(=C(C=C2CC1=O)OC)OC)C[C@H]3CC4=CC(=C(C=C34)OC)OC

&lt;/div&gt;

&lt;p&gt;With everything ready to go, we can begin Stage one:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ ./smi2sdf test.smi
Found 1 structures in test.smi
 field : MMX
 Atom Types: 169
 Bonds: 580 Bond3: 0 Bond4: 0 Bond5: 0
 Angle: 434 Angle3: 41 Angle4: 60 Angle5: 0
 Torsion: 697  Torsion4: 58 Torsion5: 0
 Vdw: 172 OOP: 91 Dipole: 474 Charge: 0 Improper: 0
 STBN: 26 ANGANG: 0 STRTOR: 0 VDWPR: 4


Input file  = test.smi
Output file = output.sdf
Param file  = mmxconst.prm
Log file    = error.log
Inorganic file = test_inorg.smi

Structure: 0 CN(CCCN1CCC2=CC(=C(C=C2CC1=O)OC)OC)C[C@H]3CC4=CC(=C(C=C34)OC)OC
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You can view the result in an application like &lt;a href="http://jmol.sf.net"&gt;Jmol&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20071212/smi23d.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;It's not much to look at, but we're not quite done yet.&lt;/p&gt;

&lt;p&gt;Stage two is accomplished by using the output of Stage one as input to &lt;tt&gt;mengine&lt;/tt&gt;:&lt;/p&gt;

&lt;div class="console"&gt;
&lt;pre&gt;
$ ./mengine -o optimized.sdf output.sdf
 field : MMX
 Atom Types: 169
 Bonds: 580 Bond3: 0 Bond4: 0 Bond5: 0
 Angle: 434 Angle3: 41 Angle4: 60 Angle5: 0
 Torsion: 697  Torsion4: 58 Torsion5: 0
 Vdw: 172 OOP: 91 Dipole: 474 Charge: 0 Improper: 0
 STBN: 26 ANGANG: 0 STRTOR: 0 VDWPR: 4
 field : MMFF94
 Atom Types: 181
 Bonds: 448 Bond3: 0 Bond4: 0 Bond5: 0
 Angle: 1801 Angle3: 21 Angle4: 61 Angle5: 0
 Torsion: 674  Torsion4: 38 Torsion5: 95
 Vdw: 182 OOP: 112 Dipole: 0 Charge: 0 Improper: 0
 STBN: 286 ANGANG: 0 STRTOR: 0 VDWPR: 0
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;We now have a file called &lt;strong&gt;output.sdf&lt;/strong&gt;. As you can see, it's a pretty good 3D representation of Ivabradine:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;img src="http://depth-first.com/demo/20071212/mengine.png"&gt;&lt;/img&gt;&lt;/center&gt;&lt;/p&gt;

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

&lt;p&gt;In this tutorial, we've seen how the Open Source program smi23d can be used to assign reasonable 3D coordinates to an arbitrary SMILES string. One very practical use of smi23d would be to process the output of 2D chemical structure editors prior to use in a 3D program. Future articles will discuss some of the possibilities.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/42614915@N00/"&gt;Mary Mactavish&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 12 Dec 2007 10:32:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5b691ae6-98d7-43ee-a652-0d81c5b576bb</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/12/12/simple-3d-conformer-generation-with-smi23d</link>
      <category>Tools</category>
      <category>smi23d</category>
      <category>2d</category>
      <category>3d</category>
      <category>structureeditor</category>
      <category>scons</category>
      <category>conformer</category>
      <category>chemwriter</category>
    </item>
    <item>
      <title>"Simple 3D Conformer Generation with Smi23D" by Geoffrey Hutchison</title>
      <description>&lt;p&gt;I don't know if this is the problem with mengine or not -- I didn't write the code.&lt;/p&gt;

&lt;p&gt;In the current Open Babel engine, 2D files cause headaches. Some of the optimization parameters (particularly torsions) are undefined. So you get back NaN  instead of a real coordinate.&lt;/p&gt;

&lt;p&gt;I suspect mengine hasn't been rigorously tested on purely 2D files.&lt;/p&gt;</description>
      <pubDate>Sun, 16 Dec 2007 09:52:11 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d078c552-4fe0-4489-ad8d-018666d55bd6</guid>
      <link>http://depth-first.com/articles/2007/12/12/simple-3d-conformer-generation-with-smi23d#comment-311</link>
    </item>
    <item>
      <title>"Simple 3D Conformer Generation with Smi23D" by Rich Apodaca</title>
      <description>&lt;p&gt;Antony, yes, I noticed that.&lt;/p&gt;

&lt;p&gt;It sounds like the problem is that you're using 2D coordinates with mengine. I tried the same thing and got either no output or strange output.&lt;/p&gt;

&lt;p&gt;Still, being able to submit a 2D molfile and get a 3D molfile back would be very convenient.&lt;/p&gt;</description>
      <pubDate>Wed, 12 Dec 2007 20:31:14 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:62360923-e116-4e1f-b929-ee2e470daec9</guid>
      <link>http://depth-first.com/articles/2007/12/12/simple-3d-conformer-generation-with-smi23d#comment-309</link>
    </item>
    <item>
      <title>"Simple 3D Conformer Generation with Smi23D" by ChemSpiderMan</title>
      <description>&lt;p&gt;Rich...we've been using smi23d on ChemSPider for a few weeks. &lt;a href="http://www.chemspider.com/news/?p=79" rel="nofollow"&gt;http://www.chemspider.com/news/?p=79&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It works...we use it in real time for every molecule so that it can be viewed in Jmol. I'd say our failure rates are about 10% of the time and this is explained over at the blog. We are feeding 2D SDFs rather than SMILEs and still need to fix it.&lt;/p&gt;</description>
      <pubDate>Wed, 12 Dec 2007 18:46:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fc1afc44-78c8-4475-bc2e-4e4287060216</guid>
      <link>http://depth-first.com/articles/2007/12/12/simple-3d-conformer-generation-with-smi23d#comment-306</link>
    </item>
  </channel>
</rss>
