<?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 chemicalstructure</title>
    <link>http://depth-first.com/articles/tag/chemicalstructure</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Screencast: Drawing Structures Quickly With ChemWriter</title>
      <description>&lt;p&gt;&lt;center&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="499" height="327"&gt; &lt;param name="movie" value="http://content.screencast.com/bootstrap.swf"&gt;&lt;/param&gt; &lt;param name="quality" value="high"&gt;&lt;/param&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;/param&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/media/fa8ec0ce-c407-4865-bde6-e7516415eeab_b9ab823a-eaff-486a-b654-0eb60b088326_static_0_0_Thumbnail.gif&amp;amp;content=http://content.screencast.com/media/d668e3f9-6130-441e-978a-420d7d267afb_b9ab823a-eaff-486a-b654-0eb60b088326_static_0_0_00000005.swf&amp;amp;width=499&amp;amp;height=327"&gt;&lt;/param&gt; &lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt; &lt;param name="scale" value="showall"&gt;&lt;/param&gt; &lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;  &lt;embed src="http://content.screencast.com/bootstrap.swf" quality="high" bgcolor="#FFFFFF" width="499" height="327" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/media/fa8ec0ce-c407-4865-bde6-e7516415eeab_b9ab823a-eaff-486a-b654-0eb60b088326_static_0_0_Thumbnail.gif&amp;amp;content=http://content.screencast.com/media/d668e3f9-6130-441e-978a-420d7d267afb_b9ab823a-eaff-486a-b654-0eb60b088326_static_0_0_00000005.swf&amp;amp;width=499&amp;amp;height=327" allowFullScreen="true" scale="showall"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;This short video shows how to use &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; to draw structures quickly with &lt;a href="http://metamolecular.com/articles/chemwriter-keyboard"&gt;keyboard shortcuts&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 18 Jun 2008 13:55:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:19fa9cb2-e757-4091-aae3-394ff9258046</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/18/screencast-drawing-structures-quickly-with-chemwriter</link>
      <category>Tools</category>
      <category>chemwriter</category>
      <category>2d</category>
      <category>java</category>
      <category>screencast</category>
      <category>editor</category>
      <category>chemicalstructure</category>
      <category>jing</category>
    </item>
    <item>
      <title>Better Structure Drawing With ChemWriter 1.3.0</title>
      <description>&lt;p&gt;&lt;a href="http://metamolecular.com/chemwriter"&gt;&lt;img src="http://depth-first.com/demo/20080610/chemwriter_small.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;&lt;a href="http://metamolecular.com/chemwriter/"&gt;ChemWriter&lt;/a&gt; 1.3.0 has been released and is ready for &lt;a href="http://metamolecular.com/downloads/"&gt;download&lt;/a&gt;. This version makes it possible to change the mouse cursor hover radius for more accurate drawing. It also adds a setting to disable heteroatom keyboard shortcut events occurring away from a molecule node, reducing the possibility of an off-atom label being inadvertently drawn.&lt;/p&gt;

&lt;p&gt;For details, see the &lt;a href="http://metamolecular.com/blog/2008/06/16/better-drawing-with-chemwriter-1-3-0/"&gt;Metamolecular Company Blog&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 16 Jun 2008 16:18:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9767a41c-4766-41d4-a3db-abf8176ca407</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/16/better-structure-drawing-with-chemwriter-1-3-0</link>
      <category>Tools</category>
      <category>chemwriter</category>
      <category>2d</category>
      <category>chemicalstructure</category>
      <category>java</category>
      <category>editor</category>
    </item>
    <item>
      <title>Adobe Flash for Cheminformatics: Fast, Scalable, and Attractive 2D Depiction of Chemical Structures with Vector Graphics</title>
      <description>&lt;p&gt;&lt;a href="http://metamolecular.com/chemwriter"&gt;&lt;img src="http://depth-first.com/demo/20080610/chemwriter_small.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;The previous article in this series &lt;a href="http://depth-first.com/articles/2008/06/06/the-other-vector-graphics-markup-language"&gt;discussed the use of vector graphics markup languages for cheminformatics&lt;/a&gt;, in particular for the display of 2D chemical structures. Although vector graphics are well-suited for creating responsive and appealing cheminformatics Web applications, the lack of universal native browser support makes both &lt;a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics"&gt;Scalable Vector Graphics&lt;/a&gt; (SVG) and its cousin &lt;a href="http://www.w3.org/TR/1998/NOTE-VML-19980513"&gt;Vector Markup Language&lt;/a&gt; (VML) unattractive at this time. This article highlights Adobe Flash as a 2D chemical structure renderer for Web applications, and features a fully-functional proof of concept based on the &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; rendering engine.&lt;/p&gt;

&lt;h4&gt;About Adobe Flash&lt;/h4&gt;

&lt;p&gt;Although Adobe Flash is practically an industry unto itself today, at it's core, Flash is a lightweight vector graphics renderer. Introduced in 1996, the Flash Player can be found on millions of Internet-enable devices today. According to a &lt;a href="http://www.adobe.com/products/player_census/flashplayer/"&gt;study by Adobe&lt;/a&gt;, the Flash Player was running on nearly 99% of Internet-enabled desktops as of March 2008. The player has also found its way onto a host of handheld devices and phones.&lt;/p&gt;

&lt;p&gt;Many technologies have been layered on top of the Flash Player. One of the first was the &lt;a href="http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html"&gt;ActionScript&lt;/a&gt; scripting language. More recently, Adobe has introduced &lt;a href="http://depth-first.com/articles/2007/05/25/flex-rich-internet-applications-and-cheminformatics"&gt;Flex&lt;/a&gt;, a full-fledged application development framework.&lt;/p&gt;

&lt;p&gt;Unlike SVG and other vector graphics systems, Flash is ready today, proven, and about as close to universal as is possible on the Web. If you want to do vector graphics on the Web with the most convenient user and developer experience, Flash is your tool.&lt;/p&gt;

&lt;p&gt;But what can Flash do for cheminformatics?&lt;/p&gt;

&lt;h4&gt;A Demonstration&lt;/h4&gt;

&lt;p&gt;The table below is composed of twelve cells, each of which display a chemical structure through the Flash Player.&lt;/p&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
      .cells a {display: block; text-align: center;}
    &lt;/style&gt;
    &lt;table class="cells" cellpadding="3" border="2"&gt;
    &lt;tr&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/bicalutamide.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/bicalutamide.swf" quality="high"
             width="150" height="150" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/bicalutamide.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/budesonide.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/budesonide.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/budesonide.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/buproprion.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/buproprion.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/buproprion.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/clopidogrel.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/clopidogrel.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/clopidogrel.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/docetaxel.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/docetaxel.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/docetaxel.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/escitalopram.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/escitalopram.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/escitalopram.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/fluticasone.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/fluticasone.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/fluticasone.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/lopinavir.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/lopinavir.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/lopinavir.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/omega_conotoxin_gvia_16132374.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/omega_conotoxin_gvia_16132374.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/omega_conotoxin_gvia_16132374.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/oseltamivir.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/oseltamivir.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/oseltamivir.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/sertraline.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/sertraline.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/sertraline.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;td&gt;
    &lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
            width="150" height="150"&gt;
      &lt;param name="movie" value="http://depth-first.com/demo/20080610/sildenafil.swf"&gt;
      &lt;embed src="http://depth-first.com/demo/20080610/sildenafil.swf" quality="high"
             width="150" height="150" name="movie" type="application/x-shockwave-flash"
             pluginspage="http://www.macromedia.com/go/getflashplayer"&gt; 
    &lt;/object&gt;
    &lt;a href="http://depth-first.com/demo/20080610/sildenafil.swf"&gt;zoom&lt;/a&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt; &lt;/p&gt;

&lt;p&gt;Several points are worth mention:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Each of the structures can be zoomed by clicking on its 'zoom' link.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each cell contains a lightweight embedded "SWF" file, or "ShockWave File," and the zoomed view displays exactly the same file. No matter how the SWF file is resized, it will always be proportionally-scaled to its smallest dimension and centered.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The size of each SWF file ranges from a low of 563 bytes to a high of 8.5 KB, with an average of around 1.5KB. The larger the molecule, the more space is required. A comparable PNG with a resolution of 150x150 pixels would require on average for each structure about 6-8 KB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each image was generated from a molfile using a development version of the &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; rendering engine via the open source &lt;a href="http://www.flagstonesoftware.com/transform/"&gt;Transform SWF&lt;/a&gt; Java toolkit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SWF Files, unlike applets, are highly optimized for multiple instance display on all major platforms and browsers. In every case, startup will be nearly instantaneous and scrolling will be smooth. The performance of Flash should be at least as good as, if not better than, raster images.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;The Right Tool for the Job (is Probably not a Raster Image)&lt;/h4&gt;

&lt;p&gt;One of the first challenges developers of cheminformatics Web applications are faced with is how to render 2D chemical structures. For an overview of the technologies now in use, see the &lt;a href="http://depth-first.com/articles/2008/06/06/the-other-vector-graphics-markup-language"&gt;previous article&lt;/a&gt; in this series. Each option has its own set of trade-offs.&lt;/p&gt;

&lt;p&gt;The most widely-used 2D structure rendering option, raster images, is both inflexible and inefficient. Unlike a vector image, a raster image by definition has only one resolution, which is fixed at creation time. If image dimensions need to change, then all structures must be re-imaged. Given the size of many of today's &lt;a href="http://depth-first.com/articles/2007/01/24/thirty-two-free-chemistry-databases"&gt;chemistry databases&lt;/a&gt;, such a system-wide re-imaging of structures can involve a non-trivial amount of processor power and bandwidth.&lt;/p&gt;

&lt;p&gt;To compensate, many sites store relatively large images, say 300x300 pixel, and then use the HTML &lt;tt&gt;&amp;lt;img&amp;gt;&lt;/tt&gt; tag to shrink it as needed. But this creates problems of its own: both storage and bandwidth requirements are far larger than they need to be, resulting in the need for more powerful server hardware and poorer application scalability. And then there are the application's users, who must wait through a 30KB or higher download for each 2D image.&lt;/p&gt;

&lt;p&gt;A significant number of structures in any compound collection will be so large that even a 300x300 pixel image will be insufficient to render the necessary detail. For example, &lt;a href="http://depth-first.com/articles/2008/05/19/building-chempedia-resizable-structures-with-chemwriter"&gt;a recent Depth-First article&lt;/a&gt; discussed a vector graphics solution this problem within the context of &lt;a href="http://chempedia.com"&gt;Chempedia&lt;/a&gt;, the free chemical encyclopedia. Vector graphics simply eliminate this issue.&lt;/p&gt;

&lt;p&gt;Many cheminformatics applications would benefit from being able to show 50 or more structures at a time, with each structure having a zoom view for closer inspection. To a non-chemist, this might seem unnecessary. But for today's chemists dealing with large chemical catalogs and high-throughput screens, it's not only possible, but a routine part of the practice of chemistry. The raster image approach makes it extremely difficult to meet this important need on the Web. Vector graphics, possibly delivered through the Flash Player, offer a much simpler and more efficient way to do it.&lt;/p&gt;

&lt;p&gt;2D chemical structures are vectorial in nature; using raster images to depict them is in most cases the more costly and lower quality option.&lt;/p&gt;

&lt;h4&gt;Summary&lt;/h4&gt;

&lt;p&gt;Vector graphics are a near-perfect match for the job of depicting 2D chemical structures on the Web. Although there are many vector graphics platforms to choose from, the Flash Player is by far the most universal option. This article has demonstrated a working example of multiple 2D chemical structures rendered as lightweight vector images via the Adobe Flash Player, the first and only such demonstration of which I'm aware.&lt;/p&gt;

&lt;p&gt;The key technologies behind this demonstration are the &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; rendering engine and the open source Flash developer toolkits available from &lt;a href="http://www.flagstonesoftware.com/transform/"&gt;Flagstone Software&lt;/a&gt;. If you're interested in learning more about how vector graphics and Flash can improve both the user and developer experience in your cheminformatics Web applications, I'd be happy to &lt;a href="http://mailhide.recaptcha.net/d?k=01_5KIPZyZx-bysSnY0HEqIw==&amp;amp;c=9ppCEFFs3OESfeieiRz1LAgTPkQmMhWOQm4RKDRkFI8=" onclick="window.open('http://mailhide.recaptcha.net/d?k=01_5KIPZyZx-bysSnY0HEqIw==&amp;amp;c=9ppCEFFs3OESfeieiRz1LAgTPkQmMhWOQm4RKDRkFI8=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address"&gt;hear from you&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 10 Jun 2008 11:05:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9a0ab422-6515-446f-a0ef-a765519d8dd1</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/10/adobe-flash-for-cheminformatics-fast-scalable-and-attractive-2d-depiction-of-chemical-structures-with-vector-graphics</link>
      <category>Tools</category>
      <category>flash</category>
      <category>adobe</category>
      <category>svg</category>
      <category>vml</category>
      <category>chemwriter</category>
      <category>vectorgraphics</category>
      <category>2d</category>
      <category>chemicalstructure</category>
      <category>java</category>
      <category>swf</category>
    </item>
    <item>
      <title>The Other Vector Graphics Markup Language</title>
      <description>&lt;p&gt;&lt;img src="http://depth-first.com/demo/20080606/toucan.png" align="right"&gt;&lt;/img&gt;&lt;a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics"&gt;Scalable Vector Graphics&lt;/a&gt; (SVG) is a technology that enables the creation and publication of high quality images that can be scaled to any resolution. SVG is ideally suited for the Web, and all major browsers now support it - except Internet Explorer (IE). This poses a problem: vector graphics are by far superior to raster images for many applications, but the lack of native IE support makes SVG a non-starter for most developers. This article discusses a little known IE capability that might provide a solution.&lt;/p&gt;

&lt;h4&gt;Oh Brother, Where Art Thou?&lt;/h4&gt;

&lt;p&gt;Way back in 1998 a group of companies including Microsoft submitted a proposal for a vector graphics language called &lt;a href="http://www.w3.org/TR/1998/NOTE-VML-19980513"&gt;Vector Markup Language&lt;/a&gt; (VML) to the W3C. This set in motion a series of events that culminated in the development of what we know today as SVG. But while use of SVG quickly expanded, VML remained almost exclusively limited to Microsoft products.&lt;/p&gt;

&lt;p&gt;Soon after, IE 5 &lt;a href="http://www.infoloom.com/gcaconfs/WEB/granada99/wu.HTM"&gt;introduced the ability&lt;/a&gt; to decode and display VML - a capability that exists today in IE 7.&lt;/p&gt;

&lt;p&gt;SVG and VML are two vector graphics languages, each designed to do essentially the same thing. For basic shape rendering, their similarities outweigh their differences.&lt;/p&gt;

&lt;h4&gt;About VML&lt;/h4&gt;

&lt;p&gt;To understand why VML never caught on, you need look no further than the documentation - or the lack thereof. The &lt;a href="http://www.w3.org/TR/1998/NOTE-VML-19980513"&gt;original VML submission&lt;/a&gt; is a decade old and has not been updated.&lt;/p&gt;

&lt;p&gt;For the most part, VML documentation is scattered and incomplete. Nevertheless, there are some useful resources. Here, in no particular order are some of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb250524(VS.85).aspx"&gt;Microsoft Documentation&lt;/a&gt; Authoritative, but lacking in examples.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://weborama.blogspot.com/2006/01/vml-svg-and-canvas.html"&gt;VML, SVG, and Canvas&lt;/a&gt; Discusses some of the differences between VML and SVG.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.robweir.com/blog/2006/07/cum-mortuis-in-lingua-mortua.html"&gt;Cum mortuis in lingua mortua&lt;/a&gt; Good history of VML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.sjsu.edu/faculty/watkins/vml.htm"&gt;Examples of the Vector Markup Lanugauge&lt;/a&gt; There are far too few of this kind of site.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://vitali.web.cs.unibo.it/Progetti/VectorConverter"&gt;VectorConverer&lt;/a&gt;
A PHP library that uses XSLT to interconvert SVG and VML. Unfortunately, the stylesheet didn't work in my hands under &lt;a href="http://vitali.web.cs.unibo.it/Progetti/VectorConverter"&gt;Xalan&lt;/a&gt; or Ruby/xslt - and I know almost nothing about PHP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.cs.sjsu.edu/faculty/pollett/masters/Semesters/Fall03/JulieNabong/index.shtml?cs298proposal.html"&gt;Julie Nabong's Masters Thesis&lt;/a&gt; Julie wrote and documented an SVG/VML XSLT for interconverting the two languages.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;JSDrawing: Interconverting Vector Languages on the Fly&lt;/h4&gt;

&lt;p&gt;One VML resource deserves special note - &lt;a href="http://www.kevlindev.com/projects/jsdrawing/index.htm"&gt;JSDrawing&lt;/a&gt;. This library seems to be capable of generating Flash, VML, or SVG from a common vector graphics language precursor. I'm not sure how practical this approach would be, but it does provide some food for thought.&lt;/p&gt;

&lt;h4&gt;Why It Matters&lt;/h4&gt;

&lt;p&gt;Chemistry is in a good position to take advantage of vector graphics. Chemical structures, being closely based on graph theoretical constructs, would seem to be a perfect match for vector languages like SVG and VML, especially on the Web. So far it hasn't happened, primarily for the reasons outlined above.&lt;/p&gt;

&lt;p&gt;Currently, if you want to display 2D chemical structures in Web pages you're faced with some tradeoffs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Raster Images.&lt;/strong&gt; This is by far the most common practice. This option unfortunately makes it very difficult to redesign the layout of a site or support multiple views of the same structure, especially with databases of one million plus compounds becoming commonplace. Even if images are never regenerated, they need to be stored and retrieved, adding to cost and complexity. Images could be dynamically generated, but at the expense of substantial memory and CPU requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Applets.&lt;/strong&gt; This is the approach currently taken by &lt;a href="http://chempedia.com"&gt;Chempedia&lt;/a&gt;, the free chemical encyclopedia, and gives complete flexibility in page layout and structure appearance. Changing the dimensions of a structure is as simple as changing the size of a div. Unfortunately, some browsers handle multiple applets better than others. Firefox on OS X is very slow at refreshing applets while scrolling, and IE requires a &lt;a href="http://depth-first.com/articles/2007/11/02/eolas-and-jactivating-working-around-a-workaround"&gt;Javascript trick&lt;/a&gt; to remove the 'click to active' message that causes some flashing when in progress.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vector Graphics Through Plugins&lt;/strong&gt; There are at least two SVG plugins for IE (&lt;a href="http://www.adobe.com/svg/viewer/install/main.html"&gt;one by Adobe&lt;/a&gt; and &lt;a href="http://www.examotion.com/index.php?id=product_player"&gt;the other from Examotion&lt;/a&gt;). Will all of your users be able to find and install them? Unless the answer to both questions is 'yes', this option is probably best left as a last resort. Another option is to render SVG on IE through the Flash or &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; plugins. But as far as I can tell, neither approach is ready for prime-time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Native Vector Graphics&lt;/strong&gt; Available on all major browsers including Internet Explorer 5/6/7, Firefox 1/2, and Opera 8/9. Combines the flexibility, lossless depiction, inlineability and low data storage/retrieval overhead of applets with the speed of images. Interactivity and other special effects can be achieved through DOM manipulation. All of this depends, of course, on the vector graphics format being compatible with the rendering engine.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In some circumstances, serving VML to IE clients and SVG to everyone else would be a viable option - if it were possible to generate VML.&lt;/p&gt;

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

&lt;p&gt;Vector graphics have a lot to offer chemistry, especially when used with Web applications. The combination of VML and SVG offers a proven technology platform that's ready today, but only if you can generate VML.&lt;/p&gt;</description>
      <pubDate>Fri, 06 Jun 2008 14:39:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:48c29183-75ae-4e3f-b4f7-e99de2a52048</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/06/the-other-vector-graphics-markup-language</link>
      <category>Tools</category>
      <category>svg</category>
      <category>vml</category>
      <category>vectorgraphics</category>
      <category>silverlight</category>
      <category>flash</category>
      <category>chemicalstructure</category>
      <category>2d</category>
      <category>chemwriter</category>
      <category>chempedia</category>
    </item>
    <item>
      <title>Building Chempedia: Resizable Structures With ChemWriter</title>
      <description>&lt;p&gt;&lt;a href="http://chempedia.com"&gt;&lt;img src="http://depth-first.com/demo/20080513/chempedia.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;One of the difficulties in viewing 2D chemical structures is that molecules vary in size. In particular, larger molecules become difficult to read when confined to a small section of a screen. This article shows how this problem has been addressed in &lt;a href="http://chempedia.com"&gt;Chempedia&lt;/a&gt; using the 2D rendering capabilities of the &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; package.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://chempedia.com/monographs/aluminon"&gt;&lt;img src="http://depth-first.com/demo/20080519/screen.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;As an example, consider Chempedia's entry for &lt;a href="http://chempedia.com/monographs/aluminon"&gt;Aluminon&lt;/a&gt;. Although the summary box at the right shows the structure for Aluminon, it may not be completely readable due to the large size of the molecule.&lt;/p&gt;

&lt;p&gt;To solve this problem, Chempedia has implemented a "zoom" link for all monographs containing a chemical structure. Clicking on the zoom link for Aluminon gives a magnified, scaled, stretchable, and resizable view of the molecule.&lt;/p&gt;

&lt;p&gt;To implement this feature, Chempedia uses the &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; &lt;tt&gt;PainterApplet&lt;/tt&gt;. Simply setting the &lt;tt&gt;width&lt;/tt&gt; and &lt;tt&gt;height&lt;/tt&gt; attributes of the &lt;a href="http://depth-first.com/articles/2008/03/10/demystifying-java-applets-part-2-dry-deployment-with-the-javay-method"&gt;&lt;tt&gt;&amp;lt;object&amp;gt;&lt;/tt&gt; tag&lt;/a&gt; to "100%" gives an applet that resizes itself as the surrounding window is resized.&lt;/p&gt;

&lt;p&gt;Implementing a resizable 2D structure image window using AJAX and dynamic images is possible, but would be much more difficult to implement. It could also potentially produce a much higher, and unpredictable demand on server memory, CPU cycles, and bandwidth.&lt;/p&gt;

&lt;p&gt;ChemWriter makes it possible for the server to delegate resizable image processing to the client, resulting in a much more responsive feature with minimal effect on the server.&lt;/p&gt;</description>
      <pubDate>Mon, 19 May 2008 09:42:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:97ac70b9-bb2d-491a-9f08-ca71d796ce75</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/05/19/building-chempedia-resizable-structures-with-chemwriter</link>
      <category>Tools</category>
      <category>chempedia</category>
      <category>chemwriter</category>
      <category>2d</category>
      <category>resize</category>
      <category>chemicalstructure</category>
    </item>
    <item>
      <title>The Art and Science of Chemical Structure Diagrams: ChemWriter as Chemically-Aware Vector Graphics System</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/aligraney/1874964319/"&gt;&lt;img src="http://depth-first.com/demo/20080214/zoom.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Of the many problems to be solved when &lt;a href="http://depth-first.com/articles/2008/02/12/the-art-and-science-of-chemical-structure-diagrams-double-trouble"&gt;building software to view and manipulate 2D chemical structures&lt;/a&gt;, one of the trickiest is getting all features to scale proportionally. This problem is widespread because it can seldom be predicted at which resolution a chemical structure will be viewed.&lt;/p&gt;

&lt;p&gt;This article describes some ways in which this problem was addressed in the Web-based chemical structure editor &lt;a href="http://metamolecular.com/products/chemwriter"&gt;ChemWriter&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Chemically-Aware Vector Graphics&lt;/h4&gt;

&lt;p&gt;ChemWriter is at its a core chemically-aware vector graphics system. It was designed with the belief that chemical structures should remain readable regardless of size.&lt;/p&gt;

&lt;p&gt;The ability to scale 2D chemical structures to any resolution and retain readability is essential when creating cheminformatics systems because magnification factors are so varied. For example, in many cases, structures are user-resizable. In others, the size of the structure is statically set by the developer. In others, the bond length needs to remain fixed and the overall image size needs to adapt accordingly. Even when a chemical structure display context may seem static, future design constraints may force a change.&lt;/p&gt;

&lt;p&gt;A robust chemical structure graphics system needs to gracefully enable the resizing of its output.&lt;/p&gt;

&lt;h4&gt;A Demonstration&lt;/h4&gt;

&lt;p&gt;&lt;center&gt;&lt;applet code="com/metamolecular/chemwriter/applet/EditorApplet.class" name= "editor" mayscript="true" archive="/applets/chemwriter.jar" width="490" height="330"&gt;&lt;param name="licenseKey" value="4BC4-3C59-3E7D-182B-92B7-2E68" /&gt;&lt;param name="molfile" value="[NO NAME]|  CHEMWRIT          2D|Created with ChemWriter - http://metamolecular.com/products/chemwriter| 23 25  0  0  0  0  0  0  0  0  0 V2000|   -6.5772   -1.0796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -5.7112   -1.5796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -4.8451   -1.0796    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -4.8451   -0.0796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -5.7112    0.4204    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.5772   -0.0796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -3.8941   -1.3886    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -3.3063   -0.5796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -3.8941    0.2295    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -2.3063   -0.5796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -1.8063   -1.4456    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -0.8063   -1.4456    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -0.3063   -0.5796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -0.8063    0.2865    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -1.8063    0.2865    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|    0.6937   -0.5796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -7.4432   -1.5796    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -3.5851   -2.3396    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -4.2542   -3.0828    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -3.9452   -4.0338    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -5.2324   -2.8749    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -2.9670   -4.2417    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -4.6143   -4.7770    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  1  2  2  0  0  0  0|  2  3  1  0  0  0  0|  3  4  1  0  0  0  0|  4  5  1  0  0  0  0|  5  6  2  0  0  0  0|  6  1  1  0  0  0  0|  3  7  1  0  0  0  0|  7  8  2  0  0  0  0|  8  9  1  0  0  0  0|  9  4  2  0  0  0  0| 10 11  2  0  0  0  0| 11 12  1  0  0  0  0| 12 13  2  0  0  0  0| 13 14  1  0  0  0  0| 14 15  2  0  0  0  0| 15 10  1  0  0  0  0| 10  8  1  0  0  0  0| 13 16  1  0  0  0  0|  1 17  1  0  0  0  0|  7 18  1  0  0  0  0| 18 19  1  0  0  0  0| 19 20  1  0  0  0  0| 19 21  2  0  0  0  0| 20 22  1  0  0  0  0| 20 23  1  0  0  0  0|M  END" /&gt;Your system needs &lt;a href="http://www.java.com/en/download/index.jsp"&gt;Java&lt;/a&gt; to display this image.&lt;/applet&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;The live applet shown above lets you scale a chemical structure using the "&gt;" and "&amp;lt;" keys, or the View-&gt;Zoom In and View-&gt;Zoom Out menu items.&lt;/p&gt;

&lt;p&gt;Note: if you haven't installed and activated &lt;a href="http://www.java.com/en/download/index.jsp"&gt;Java&lt;/a&gt; in your browser, you'll need to do so before viewing the above demonstration.&lt;/p&gt;

&lt;h4&gt;Scaling Chemical Structure Features&lt;/h4&gt;

&lt;p&gt;Properly scaling 2D chemical structure diagrams may not seem that difficult, but consider some of the properties involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Atom Label Size.&lt;/strong&gt; Hardcoding font sizes is simply not an option.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Atom Label Padding.&lt;/strong&gt; The empty space around a heteroatom bond label prevents bonds from making direct contact with the atoms they connect.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Line Thickness.&lt;/strong&gt; Lines have variable absolute thickness that ensure they're visible at lower magnification and not too thin at higher magnification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiple Bond Offset Distance.&lt;/strong&gt; Double and triple bonds contain lines that are offset from the center bond line.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stereo Bond Maximum Width&lt;/strong&gt; Wedge and hash bonds have a maximum thickness.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To retain readability, each of these properties must proportionally scale when a chemical structure is reduced or enlarged.&lt;/p&gt;

&lt;h4&gt;The ChemWriter System&lt;/h4&gt;

&lt;p&gt;What does it mean to resize a chemical structure?&lt;/p&gt;

&lt;p&gt;The dimensions of a structure are determined by its underlying atom coordinates. Resizing a chemical structure scales these coordinates. It's convenient to think of this process as a proportional change in the absolute length of the bonds between atoms; relative bond lengths, and relative atom positions remain fixed.&lt;/p&gt;

&lt;p&gt;Given that only bond lengths change during scaling, it's useful to adopt bond length as a yardstick. Although not all bonds in a molecule will have the same length, for the most part these values will be tightly clustered around a median.&lt;/p&gt;

&lt;p&gt;For this reason, a molecule's median bond length is the standard unit of measurement in ChemWriter.&lt;/p&gt;

&lt;p&gt;As an example, setting atom label height can be done by calling ChemWriter's &lt;tt&gt;setAtomLabelHeight&lt;/tt&gt; method (or using the &lt;tt&gt;atomLabelHeight&lt;/tt&gt; &lt;a href="http://metamolecular.com/products/chemwriter/documentation/developer-guide/#parameters"&gt;parameter&lt;/a&gt;). The double-precision value represents a fraction of the median bond length. To make atom labels appear half as high as the median bond length, use a value of 0.5. To make them appear smaller by half, use a value of 0.25.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;applet code="com/metamolecular/chemwriter/applet/PainterApplet.class" name= "editor" mayscript="true" archive="/applets/chemwriter.jar" width="240" height="240"&gt;&lt;param name="atomLabelHeight" value="0.5" /&gt;&lt;param name="licenseKey" value="4BC4-3C59-3E7D-182B-92B7-2E68" /&gt;&lt;param name="molfile" value="[NO NAME]|  CHEMWRIT          2D|Created with ChemWriter - http://metamolecular.com/products/chemwriter| 22 22  0  0  0  0  0  0  0  0  0 V2000|   -7.7639   -0.4008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979   -0.9008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.0319   -0.4008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.0319    0.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979    1.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -7.7639    0.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -5.1658    1.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -8.6300    1.0992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -8.6300   -0.9008    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979   -1.9008    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -8.6300    2.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -9.4960    2.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -7.7639    2.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  -10.3620    2.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979    2.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -9.4960   -0.4008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  -10.3620   -0.9008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -9.4960    0.5992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -4.2998    0.5992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -5.1658    2.0992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -3.4338    1.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -2.5678    0.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  1  2  1  0  0  0  0|  2  3  1  0  0  0  0|  3  4  1  0  0  0  0|  4  5  2  0  0  0  0|  5  6  1  0  0  0  0|  6  1  1  0  0  0  0|  4  7  1  0  0  0  0|  6  8  1  6  0  0  0|  1  9  1  1  0  0  0|  2 10  1  6  0  0  0|  8 11  1  0  0  0  0| 11 12  1  0  0  0  0| 11 13  1  0  0  0  0| 12 14  1  0  0  0  0| 13 15  1  0  0  0  0|  9 16  1  0  0  0  0| 16 17  1  0  0  0  0| 16 18  2  0  0  0  0|  7 19  1  0  0  0  0|  7 20  2  0  0  0  0| 19 21  1  0  0  0  0| 21 22  1  0  0  0  0|M  END" /&gt;Your system needs &lt;a href="http://www.java.com/en/download/index.jsp"&gt;Java&lt;/a&gt; to display this image.&lt;/applet&gt;&lt;applet code="com/metamolecular/chemwriter/applet/PainterApplet.class" name= "editor" mayscript="true" archive="/applets/chemwriter.jar" width="240" height="240"&gt;&lt;param name="licenseKey" value="4BC4-3C59-3E7D-182B-92B7-2E68" /&gt;&lt;param name="atomLabelHeight" value="0.25" /&gt;&lt;param name="molfile" value="[NO NAME]|  CHEMWRIT          2D|Created with ChemWriter - http://metamolecular.com/products/chemwriter| 22 22  0  0  0  0  0  0  0  0  0 V2000|   -7.7639   -0.4008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979   -0.9008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.0319   -0.4008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.0319    0.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979    1.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -7.7639    0.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -5.1658    1.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -8.6300    1.0992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -8.6300   -0.9008    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979   -1.9008    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0|   -8.6300    2.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -9.4960    2.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -7.7639    2.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  -10.3620    2.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -6.8979    2.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -9.4960   -0.4008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  -10.3620   -0.9008    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -9.4960    0.5992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -4.2998    0.5992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -5.1658    2.0992    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0|   -3.4338    1.0992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|   -2.5678    0.5992    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0|  1  2  1  0  0  0  0|  2  3  1  0  0  0  0|  3  4  1  0  0  0  0|  4  5  2  0  0  0  0|  5  6  1  0  0  0  0|  6  1  1  0  0  0  0|  4  7  1  0  0  0  0|  6  8  1  6  0  0  0|  1  9  1  1  0  0  0|  2 10  1  6  0  0  0|  8 11  1  0  0  0  0| 11 12  1  0  0  0  0| 11 13  1  0  0  0  0| 12 14  1  0  0  0  0| 13 15  1  0  0  0  0|  9 16  1  0  0  0  0| 16 17  1  0  0  0  0| 16 18  2  0  0  0  0|  7 19  1  0  0  0  0|  7 20  2  0  0  0  0| 19 21  1  0  0  0  0| 21 22  1  0  0  0  0|M  END" /&gt;Your system needs &lt;a href="http://www.java.com/en/download/index.jsp"&gt;Java&lt;/a&gt; to display this image.&lt;/applet&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;The demonstration above shows the effect of each of these settings.&lt;/p&gt;

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

&lt;p&gt;ChemWriter uses a vector graphics system that can create consistent, readable output for a wide range of image sizes. This flexibility is essential in creating cheminformatics systems that work well across a &lt;a href="http://depth-first.com/articles/2007/11/27/chemwriter-chemical-structures-and-the-web"&gt;broad range of platforms and output formats&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/aligraney/"&gt;cattypumkinhead&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 14 Feb 2008 13:13:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0855bd3a-5ed6-4dce-8991-abb93f84188f</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/02/14/the-art-and-science-of-chemical-structure-diagrams-chemwriter-as-chemically-aware-vector-graphics-system</link>
      <category>Tools</category>
      <category>chemwriter</category>
      <category>vectorgraphics</category>
      <category>leafcutter</category>
      <category>chemicalstructure</category>
    </item>
    <item>
      <title>Testing Automatic Chemical Structure Recognition with OSRA</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/jspad/375980619/"&gt;&lt;img src="http://depth-first.com/demo/20080207/books.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Countless chemical structures exist only in a raster image format such as JPG, GIF, BMP, or on a printed page or PDF. While perfectly readable to humans, they are very difficult for machines to read. Given the sheer number of these structures that have been produced over the last few decades, the only hope of excavating them from their current &lt;a href="http://depth-first.com/articles/2008/02/04/raiding-chemistrys-data-tombs"&gt;data tombs&lt;/a&gt; is with computer recognition of some kind. This article discusses &lt;a href="http://cactus.nci.nih.gov/osra/"&gt;OSRA&lt;/a&gt;, an open source software package designed to do for chemical structures what Optical Character Recognition did for the printed word.&lt;/p&gt;

&lt;p&gt;An &lt;a href="http://cactus.nci.nih.gov/cgi-bin/osra/index.cgi"&gt;online version of OSRA&lt;/a&gt; was used to read PNG images of chemical structures produced by an application based on &lt;a href="http://depth-first.com/articles/2007/11/27/chemwriter-chemical-structures-and-the-web"&gt;ChemWriter&lt;/a&gt;. Both aliased and antialiased images were used and atom coloring was disabled:&lt;/p&gt;

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

&lt;p&gt;Structure interpretation failed for the antialiased image at both 300 and 72 DPI resolution. &lt;a href="http://www.daylight.com/daycgi/depict?4343434328432943284f2943363d432843353d43434328434331434328434343293d43432843432943344328433129434328433343432843432943323d4343434343324333293d4343344329433d4335294343434336"&gt;This&lt;/a&gt; was the SMILES that was produced at 72 DPI; the one produced at the 300 DPI setting was not much more encouraging.&lt;/p&gt;

&lt;p&gt;However, using the aliased imaged at 72 DPI produced the correct structure.&lt;/p&gt;

&lt;p&gt;Could the failure to recognize the antialiased image be due to a problem with the ChemWriter application's rasterization method? Apparently, not. When a screen capture utility was used to produce the image from the ChemWriter application window, the wrong structure was again produced. Here, the PNG encoding was not through a Java program but rather the underlying operating system (Linux) using a standard screen capture utility.&lt;/p&gt;

&lt;p&gt;To test the idea that line thickness might play a role in determining the quality of OSRA's interpretation, the antialiased image below was submitted:&lt;/p&gt;

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

&lt;p&gt;Still, the &lt;a href="http://www.daylight.com/daycgi/depict?43434343363d4328432943333d43284329433d432843323d434343313d4328433d43433d4331294328432943324329433d4333434328434343353d43433d432843343d432843283d4f294e283d4f293d4f29433d43433d433429433d4335294336"&gt;incorrect structure&lt;/a&gt; was produced.&lt;/p&gt;

&lt;p&gt;Apparently, images of 2D structures in which antialiasing has been applied cause difficulties for OSRA.&lt;/p&gt;

&lt;p&gt;Fortunately, the ChemWriter-based application &lt;a href="http://depth-first.com/articles/2007/08/01/never-draw-the-same-molecule-twice-image-metadata-for-cheminformatics"&gt;embedded the full connection table of the molecule into all of its images as metadata&lt;/a&gt;, so an optical recognition step is unnecessary.&lt;/p&gt;

&lt;p&gt;Provided that no antialiasing has been applied to images, OSRA would seem to be a capable tool for converting rasterized 2D chemical structures into machine-readable format.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/jspad/"&gt;jspad&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:45:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8d105d2e-2550-4ab8-be8b-5dec6c80a9f0</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/02/07/testing-automatic-chemical-structure-recognition-with-osra</link>
      <category>Tools</category>
      <category>osra</category>
      <category>chemwriter</category>
      <category>png</category>
      <category>rasterimage</category>
      <category>2d</category>
      <category>chemicalstructure</category>
      <category>antialias</category>
    </item>
    <item>
      <title>Editable and Searchable 2D Molecular Images</title>
      <description>&lt;p&gt;&lt;a href="http://depth-first.com/articles/tag/firefly"&gt;&lt;img src="http://depth-first.com/demo/20070730/fluoxetine.png" align="right" border="0"&gt;&lt;/img&gt;&lt;/a&gt;Word processing replaced the typewriter for the simple reason that documents could be prepared and edited so much more quickly. If Web authoring replaces conventional word processors, it will be for the simple reason that Web documents can be found, distributed, reprocessed, and combined with other content so much more effectively. The peculiar nature of chemical structure information complicates chemistry's transition to Web authoring. This article, the first in a series, discusses some of the challenges that lie ahead.&lt;/p&gt;

&lt;h4&gt;State of the Art: Word/ChemDraw&lt;/h4&gt;

&lt;p&gt;Microsoft Word allows 2D molecular graphics, typically created with ChemDraw, to be embedded in documents and later edited. Those images can then be copied into Power Point presentations and reused in a variety of other Windows-specific products. This practice has become so widespread throughout industry and academics, that few chemists even think about the technology that many of them rely on several times a week.&lt;/p&gt;

&lt;h4&gt;Chemical Structures are Peculiar&lt;/h4&gt;

&lt;p&gt;A 2D molecular image, like the one depicting fluoxetine at the top of this article, is a peculiar beast. On one level, it's a picture that anybody can look at. But on another level, it's a type of object for which manipulation by humans and computers is extremely useful. The combination of Microsoft Word and ChemDraw lets chemists conveniently manage the dual nature of chemical structures.&lt;/p&gt;

&lt;h4&gt;Live Molecular Images&lt;/h4&gt;

&lt;p&gt;Why would anybody want to create editable and searchable 2D molecular graphics such as JPGs, PNGs, and SVGs? Alas, technology has a way of moving on just when we're getting comfortable with it (an especially difficult concept for typewriter manufacturers who went bust during the 1980s, and the dedicated word processor manufacturers who followed).&lt;/p&gt;

&lt;p&gt;Consider the number of Word and PowerPoint documents you read last week compared to the number of Web pages. Chances are the ratio is at least 1:10. The trend shows no signs of reversing itself.&lt;/p&gt;

&lt;p&gt;Although Web authoring tools have been very slow to reach the average user, the blogging explosion has led to rapid evolution in the field. As tools like &lt;a href="http://wordpress.com"&gt;WordPress&lt;/a&gt;, &lt;a href="http://movabletype.com"&gt;Movable Type&lt;/a&gt;, and even &lt;a href="http://wikipedia.org"&gt;Wikipedia&lt;/a&gt; race to satisfy the needs of power authors, the average user will rather unexpectedly discover that they have access to perfectly capable tools that let them abandon their over-engineered (and expensive) word processors to experiment with Web publishing.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Chemistry/Structure_drawing_workgroup/Archive_Jun_2007#63303826060"&gt;Wikipedia Chemisty/Structure Drawing Workgroup&lt;/a&gt; hints at what lies ahead for chemistry. Two tools, &lt;a href="http://www.nongnu.org/gchempaint/"&gt;GChemPaint&lt;/a&gt; and &lt;a href="http://www.acdlabs.com/download/chemsk.html"&gt;ACD ChemSketch&lt;/a&gt;, now enable molecular structure information to be embedded in images.&lt;/p&gt;

&lt;p&gt;As chemistry turns to the Web as its primary publication medium, chemists will need the same ability to deal with chemical structures offered by their current tools of choice. In articles to follow, I'll discuss some ways this could happen.&lt;/p&gt;</description>
      <pubDate>Mon, 30 Jul 2007 08:01:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ff926bd1-3a51-4b3e-afe2-7b165b5bbb67</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2007/07/30/editable-and-searchable-2d-molecular-images</link>
      <category>Meta</category>
      <category>2d</category>
      <category>firefly</category>
      <category>image</category>
      <category>png</category>
      <category>chemicalstructure</category>
      <category>publication</category>
    </item>
  </channel>
</rss>
