<?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 2d</title>
    <link>http://depth-first.com/articles/tag/2d</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>ChemWriter 1.3.1</title>
      <description>&lt;p&gt;&lt;a href="http://metamolecular.com/chemwriter/"&gt;ChemWriter&lt;/a&gt; 1.3.1 can now be &lt;a href="http://metamolecular.com/downloads/"&gt;downloaded&lt;/a&gt;. This version resolves an &lt;tt&gt;&lt;a href="http://metamolecular.com/chemwriter/draw/"&gt;EditorApplet&lt;/a&gt;&lt;/tt&gt; issue in which molfiles containing two or more atoms with exactly the same 2D coordinates were not displayed properly.&lt;/p&gt;

&lt;p&gt;Details are available on the &lt;a href="http://metamolecular.com/blog/2008/06/30/chemwriter-1-3-1-resolves-issue-with-overlapping-atoms/"&gt;Metamolecular Company Blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;ChemWriter is the 2D chemical structure editor designed for Web applications. Lightweight and intuitive, ChemWriter makes an &lt;a href="http://depth-first.com/articles/2007/11/27/chemwriter-chemical-structures-and-the-web"&gt;excellent choice&lt;/a&gt; for both creating and displaying 2D chemical structures on the Web.&lt;/p&gt;</description>
      <pubDate>Mon, 30 Jun 2008 14:54:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:6a2ff3ca-cec8-41bb-a4c1-8e2d002b8b40</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/30/chemwriter-1-3-1</link>
      <category>Tools</category>
      <category>chemwriter</category>
      <category>2d</category>
      <category>java</category>
      <category>applet</category>
      <category>structureeditor</category>
    </item>
    <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 -0400</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 -0400</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>Chemistry, The Web, and Netflix</title>
      <description>&lt;p&gt;&lt;img src="http://depth-first.com/demo/20080611/python.png" align="right"&gt;&lt;/img&gt;If you've ever rented movies from &lt;a href="http://netflix.com"&gt;Netflix&lt;/a&gt;, you've probably noticed the information box that pops up when you hover over a movie image. If you just want a quick peek at what a movie is all about, this simple feature can save a great deal of time and effort in mousing around, clicking, and general navigation annoyance. It turns out that chemical compounds have a lot in common with movies in that they both can be referred to through one or more identifiers and they both have a lot of interesting metadata linked to them. This article shows that what works for Netflix can also work for chemistry.&lt;/p&gt;

&lt;h4&gt;The Problem&lt;/h4&gt;

&lt;p&gt;Interpreting IUPAC nomenclature and references to compound numbers is a major chore when working with chemistry experimental sections. When paper documents are used, this typically involves flipping pages back and forth many times between the narrative and the experimental section. With Web documents, this is usually either impossible or very inconvenient, and so the PDF is printed to paper.&lt;/p&gt;

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

&lt;p&gt;The following text is an edited and re-formatted passage taken from &lt;a href="http://www.beilstein-journals.org/bjoc/content/supplementary/1860-5397-4-5-S1.doc"&gt;the experimental section&lt;/a&gt; of &lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5"&gt;a paper&lt;/a&gt; published in &lt;a href="http://www.beilstein-journals.org/bjoc/home/home.htm"&gt;&lt;em&gt;Beilstein Journal of Organic Chemistry&lt;/em&gt;&lt;/a&gt;. If you hover over any hyperlink for half a second or more, a balloon will pop up showing you the chemical structure of the substance being referred to. Mousing away from the link hides the balloon.&lt;/p&gt;

&lt;script type="text/javascript" src="http://depth-first.com/demo/20080611/js/balloon.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript" src="http://depth-first.com/demo/20080611/js/yahoo-dom-event.js"&gt;&lt;/script&gt; 

&lt;script&gt; var balloon = new Balloon;&lt;/script&gt;

&lt;blockquote&gt;
&lt;p&gt;
&lt;strong&gt;&lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5" onmouseover="balloon.showTooltip(event,'load:34')"&gt;1-[(1R)-1-(2- {[tert-Butyl(dimethyl)silyl]oxy}ethylhexyl] -2-piperidinone&lt;/a&gt; (34)&lt;/strong&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5" onmouseover="balloon.showTooltip(event,'load:rbr')"&gt;5-Bromopentanoyl chloride&lt;/a&gt; (1.84&amp;nbsp;g, 9.25&amp;nbsp;mmol) was added to a stirred solution of &lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5" onmouseover="balloon.showTooltip(event,'load:32')"&gt;primary amine &lt;strong&gt;32&lt;/strong&gt;&lt;/a&gt; (2.00&amp;nbsp;g, 7.71 mmol) in dry 1,2-dichloroethane (30&amp;nbsp;cm&lt;sup&gt;3&lt;/sup&gt;), followed by anhydrous NaHCO&lt;sub&gt;3&lt;/sub&gt; (0.78&amp;nbsp;g, 9.25&amp;nbsp;mmol). The reaction mixture was left to stir at room temperature for 16&amp;nbsp;h. The resulting mixture was filtered through a pad of celite, which was then washed with CH&lt;sub&gt;2&lt;/sub&gt;Cl&lt;sub&gt;2&lt;/sub&gt;. The combined filtrate and washings were then evaporated in vacuo to yield a crude orange oil (4.06&amp;nbsp;g), which was purified by column chromatography on silica gel with hexane-EtOAc (7:3) as eluent to give the &lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5" onmouseover="balloon.showTooltip(event,'load:33')"&gt;5-bromo-N-[(1R)-1- (2-{[tert-butyl(dimethyl)silyl]oxy}ethyl)hexyl pentanamide&lt;/a&gt; &lt;strong&gt;33&lt;/strong&gt; as an orange oil (2.92&amp;nbsp;g, 89%).
&lt;/p&gt;
&lt;p&gt;
A portion of the &lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5" onmouseover="balloon.showTooltip(event,'load:33')"&gt;bromoamide&lt;/a&gt; &lt;strong&gt;33&lt;/strong&gt; (0.20&amp;nbsp;g, 0.47&amp;nbsp;mmol) was dissolved in dry THF (3&amp;nbsp;cm&lt;sup&gt;3&lt;/sup&gt;) containing a suspension of potassium tert-butoxide (587&amp;nbsp;mg, 0.52&amp;nbsp;mmol), and the mixture was stirred at room temperature for 25&amp;nbsp;min before being diluted with EtOAc (10&amp;nbsp;cm&lt;sup&gt;3&lt;/sup&gt;). The mixture was then washed with saturated aqueous sodium chloride solution (5 x 2&amp;nbsp;cm&lt;sup&gt;3&lt;/sup&gt;). The combined organic extracts were dried (MgSO&lt;sub&gt;4&lt;/sub&gt;), filtered and evaporated in vacuo to yield a crude yellow oil (0.16&amp;nbsp;g), which was purified by column chromatography on silica gel with hexane-EtOAc (85:15) as eluent to give &lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5" onmouseover="balloon.showTooltip(event,'load:34')"&gt;1-[(1R)-1-(2-{[tert- butyl(dimethyl)silyl]oxy}ethylhexyl]-2-piperidinone&lt;/a&gt; &lt;strong&gt;34&lt;/strong&gt; as a pale yellow oil (0.13&amp;nbsp;g, 81%).
&lt;/p&gt;
&lt;cite&gt;-Michael, Accone, Koning, and Westhuyzen, &lt;a href="http://dx.doi.org/10.1186/1860-5397-4-5"&gt;Beilstein J. Org. Chem. &lt;strong&gt;2008&lt;/strong&gt;, 4, 5&lt;/a&gt;&lt;/cite&gt;
&lt;/blockquote&gt;

&lt;p&gt;This demo has been tested on Internet Explorer 6/7, Firefox 2, and Safari 3.&lt;/p&gt;

&lt;h4&gt;Technologies&lt;/h4&gt;

&lt;p&gt;Although this demonstration is built on numerous Web technologies, two are at the top of the stack: the vector graphics rendering engine of &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt; and the open source Javascript library &lt;a href="http://www.gmod.org/wiki/index.php/Popup_Balloons"&gt;Balloon.js&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Chemical structures are displayed as lightweight Adobe Flash SWF files, as described in a &lt;a href="http://depth-first.com/articles/2008/06/10/adobe-flash-for-cheminformatics-fast-scalable-and-attractive-2d-depiction-of-chemical-structures-with-vector-graphics"&gt;previous Depth-First article&lt;/a&gt;. Software based on ChemWriter converts a molecular connection table into vector graphics commands for the Flash runtime with the help of the open source &lt;a href="http://www.flagstonesoftware.com/transform/"&gt;Transform SWF&lt;/a&gt; library.&lt;/p&gt;

&lt;h4&gt;Playing to the Web's Strengths&lt;/h4&gt;

&lt;p&gt;The Web is a new medium with a completely different set of rules compared to print media. One of its biggest strengths is interactivity: the ability to see something of interest and to immediately be able to find out more about it. One of its biggest weaknesses, even today, is technology standards. It's not enough to create interactivity; that interactivity must also fit within the technical constraints imposed by a medium that is still a work in progress.&lt;/p&gt;

&lt;p&gt;As journal publishers and others grapple with &lt;a href="http://depth-first.com/articles/2008/05/08/building-a-unique-chemistry-journal-responses-to-questions-from-nature-chemistry"&gt;how to approach&lt;/a&gt; the inevitable transition to purely Web-based scientific communication, it's important to keep both the strengths and limitations of the Web in mind. To date, nearly all attempts to create Web-based versions of chemistry journals have simply tried to duplicate the form of the print medium. This has resulted, if anything, on an even greater reliance on paper, resulting in valuable information being used well below its full potential.&lt;/p&gt;

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

&lt;p&gt;This article has demonstrated a simple labor-saving technique in which chemical structures can be visualized by hovering the cursor over specially-designated chemical identifiers. There's quite a bit more that can be done with chemical vector graphics, chemical information, and Web technologies commonly used in consumer services like Netflix. Future articles will discuss some possibilities.&lt;/p&gt;

&lt;div id="32" style="display:none"&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="200" height="200"&gt;
&lt;param name="movie" value="http://depth-first.com/demo/20080611/flash/32.swf"&gt;
&lt;embed src="http://depth-first.com/demo/20080611/flash/32.swf" quality="high" width="200" height="200" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/div&gt;

&lt;div id="33" style="display:none"&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="200" height="200"&gt;
&lt;param name="movie" value="http://depth-first.com/demo/20080611/flash/33.swf"&gt;
&lt;embed src="http://depth-first.com/demo/20080611/flash/33.swf" quality="high" width="200" height="200" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/div&gt;

&lt;div id="34" style="display:none"&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="200" height="200"&gt;
&lt;param name="movie" value="http://depth-first.com/demo/20080611/flash/34.swf"&gt;
&lt;embed src="http://depth-first.com/demo/20080611/flash/34.swf" quality="high" width="200" height="200" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/div&gt;

&lt;div id="rbr" style="display:none"&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/20080611/flash/rbr.swf"&gt;
&lt;embed src="http://depth-first.com/demo/20080611/flash/rbr.swf" quality="high" width="150" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 11 Jun 2008 21:03:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:7ef7cc4c-8dbe-42f3-b608-23d18c889efe</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/11/chemistry-the-web-and-netflix</link>
      <category>Tools</category>
      <category>netflix</category>
      <category>popup</category>
      <category>balloon</category>
      <category>tooltip</category>
      <category>chemwriter</category>
      <category>swf</category>
      <category>flash</category>
      <category>vectorgraphics</category>
      <category>2d</category>
      <category>balloonjs</category>
      <category>scientificpublication</category>
      <category>web</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 -0400</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 -0400</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 -0400</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>Five Open Tools for 2D Structure Layout (aka Structure Diagram Generation)</title>
      <description>&lt;p&gt;&lt;a href="http://metamolecular.com/chemwriter"&gt;&lt;img src="http://depth-first.com/demo/20070411/difficult.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Given a molecular representation without 2D coordinates, how would you display a human-readable view?&lt;/p&gt;

&lt;p&gt;This problem can arise in many situations, one of the most common of which is the parsing of &lt;a href="http://depth-first.com/articles/tag/linenotation"&gt;line notations&lt;/a&gt; such as &lt;a href="http://depth-first.com/articles/2007/10/19/easily-convert-iupac-nomenclature-to-smiles-inchi-or-molfile-with-rubidium"&gt;IUPAC nomenclature&lt;/a&gt;, SMILES, or &lt;a href="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"&gt;InChI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And then there are the cases when you have 2D coordinates, but they're &lt;a href="http://depth-first.com/articles/2008/02/12/the-art-and-science-of-chemical-structure-diagrams-double-trouble"&gt;not very aesthetically pleasing&lt;/a&gt;. Maybe the coordinates were created by people either in a hurry or working with low quality editors, or maybe they were generated as distorted 2D projections of 3D coordinates. Whatever the reason, simply having 2D coordinates may not be the same as having &lt;em&gt;good&lt;/em&gt; 2D coordinates.&lt;/p&gt;

&lt;p&gt;Last year, a Depth-First article &lt;a href="http://depth-first.com/articles/2007/04/11/structure-diagram-generation"&gt;discussed the Structure Diagram Generation (SDG) problem&lt;/a&gt; and how it can be solved with Open Source software. Given that nearly a year has passed, it seemed appropriate to revisit the topic.&lt;/p&gt;

&lt;p&gt;The good news is that there are at least four independent Open Source implementations of SDG algorithms, and one potential open database approach. They are, in no particular order:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://sourceforge.net/projects/mcdl"&gt;MCDL&lt;/a&gt; Written in Java, the emphasis of this software appears to be facilitating the use of &lt;a href="http://depth-first.com/articles/2006/08/19/a-first-look-at-modular-chemical-descriptor-language-mcdl"&gt;Modular Chemical Descriptor Language&lt;/a&gt;. Unfortunately, no new releases of this intriguing software package have been made in the last year.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://sf.net/projects/cdk"&gt;Chemistry Development Kit (CDK)&lt;/a&gt; This useful package handles about 70-80% of a typical assortment of chemical structures well. The large amount of activity on the CDK project in general makes this a particularly good SDG system to contribute to, especially in the areas of refactoring and handling special cases. See also &lt;a href="http://www.steinbeck-molecular.de/steinblog/index.php/2007/08/14/structure-diagram-generation-sdg-2d-layout-in-the-chemistry-development-kit-part-1/"&gt;Christoph Steinbeck's overview of CDK's layout system&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://bkchem.zirael.org/"&gt;BKChem&lt;/a&gt; A 2D structure editor written in Python. Give it an InChI and it will display the structure, courtesy of SDG. The system worked remarkably well with the molecules I tested. BKChem has also been reported to work in &lt;a href="http://bkchem.zirael.org/batch_mode_en.html"&gt;batch mode&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.rdkit.org/"&gt;RDKit&lt;/a&gt; Written in Python and C++, this package is the newest of the bunch. Although &lt;a href="http://sourceforge.net/mailarchive/message.php?msg_id=360844.35824.qm%40web34206.mail.mud.yahoo.com"&gt;I haven't had much luck compiling RDKit&lt;/a&gt;, it still looks quite promising. Any chance of switching to &lt;a href="http://www.gnu.org/software/make/"&gt;make&lt;/a&gt; as a build system?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://pubchem.ncbi.nlm.nih.gov/"&gt;PubChem&lt;/a&gt; PubChem? Maybe. With a database of small molecules now numbering well over ten million, there's a good chance that the molecule for which you need to assign coordinates is already in PubChem. And if it's in PubChem, 2D coordinates have already been assigned. Use an InChI as a hash key, and voila - instant SDG without much software. Given the novelty of large, publicly-available databases of small molecules such as PubChem, this approach may have a great deal of untapped potential.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SDG is one of those issues that can stay off the radar for some only to become an instant, nagging problem with no clear way out. The tools cited here offer an excellent place to begin working toward a comprehensive solution.&lt;/p&gt;</description>
      <pubDate>Wed, 26 Mar 2008 09:11:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:5441d3fc-3dc2-4f2d-b740-5cad16dd454b</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/03/26/five-open-tools-for-2d-structure-layout-aka-structure-diagram-generation</link>
      <category>Tools</category>
      <category>sdg</category>
      <category>2d</category>
      <category>mcdl</category>
      <category>cdk</category>
      <category>bkchem</category>
      <category>rdkit</category>
      <category>pubchem</category>
      <category>coordinates</category>
      <category>java</category>
      <category>python</category>
      <category>cplusplus</category>
      <category>layout</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 -0500</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>The Chemically-Enabled User Interface: An Introduction to Leafcutter</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/gavatron/2204140552/"&gt;&lt;img src="http://depth-first.com/demo/20080206/leafcutter.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;&lt;a href="http://metamolecular.com/products/chemwriter"&gt;ChemWriter&lt;/a&gt; is a 2D chemical structure editor for the Web. Because it's written in Java and uses both the Swing and Java2D APIs, ChemWriter could be plugged into a variety of chemically-enabled user interfaces deployed within a browser, on the desktop, or in other contexts. The availability of this kind of developer tool would open the door to a large new area of interactive cheminformatics applications. This article, the first in a series, introduces Leafcutter, a new product designed to make this possible.&lt;/p&gt;

&lt;h4&gt;About the Software&lt;/h4&gt;

&lt;p&gt;Leafcutter is a framework consisting of reusable Swing components and supporting libraries for building chemically-enabled user interfaces. Based on ChemWriter, Leafcutter will contain most of the functionality of the 2D structure editor, but packaged as a set of highly customizable components. Whereas ChemWriter consists of configurable but finished applets for editing and rendering, Leafcutter will consist of components that can be used to build entirely new applets, desktop applications and other Rich Clients.&lt;/p&gt;

&lt;p&gt;An alpha-stage developer preview is now &lt;a href="http://metamolecular.com/contact/"&gt;available by request from Metamolecular&lt;/a&gt;. The package contains API documentation and source code for a sample Swing application (shown below).&lt;/p&gt;

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

&lt;p&gt;The design constraints for tools used to build custom chemically-enabled user interfaces can vary significantly, but fine-grained control over appearance and behavior are top considerations. Depending on the specific use, controlling deployment footprint can also be critical. Leafcutter's design and implementation will address these needs uniquely.&lt;/p&gt;

&lt;h4&gt;What's New Here?&lt;/h4&gt;

&lt;p&gt;Although Leafcutter can be used to build traditional Cheminformatics applications, its main purpose will be to enable new kinds of applications that speak the language of 2D chemical structures natively.&lt;/p&gt;

&lt;p&gt;Many of today's cheminformatics applications accept 2D chemical structures as input and render the same as output. But they're not generally designed to combine 2D chemical structures with their associated information in an interactive way.&lt;/p&gt;

&lt;p&gt;For example, consider "Retro," a hypothetical application that enables Curt, a synthetic chemist, to plan his next synthetic route. Curt would draw his target molecule into a ChemWriter-like editor, as is typical for most reaction databases. But unlike other applications, Retro would interactively give Curt information about possible synthetic routes.&lt;/p&gt;

&lt;p&gt;Clicking on a bond displays a side panel summarizing the number of published synthetic procedures that might be applicable. Clicking on the "Accept" button makes the bond disconnection and records the procedure hitset for later retrieval. Clicking on a "Suggest" button, highlights bonds representing viable disconnections, some of which might not have occurred to Curt otherwise.&lt;/p&gt;

&lt;p&gt;Most synthetic organic chemistry databases are designed to be maps; Retro is designed to be a GPS device. A &lt;a href="http://membership.acs.org/S/Sdiego/chemist/jan08.pdf"&gt;recent talk&lt;/a&gt; at the &lt;a href="http://membership.acs.org/S/Sdiego/"&gt;San Diego section of the ACS&lt;/a&gt; by Jun Xu offered some useful insight into the difference between these two approaches.&lt;/p&gt;

&lt;p&gt;In addition, Curt communicates with Retro in his native language, the language of 2D chemical structures, by drawing, pointing and listening. It's the same way he communicates with his colleagues about chemistry.&lt;/p&gt;

&lt;p&gt;The same concept could be applied to areas as diverse NMR and IR spectrum assignment and query, mass spectrometry, analyte detection, molecular mechanics calculations, and teaching reaction mechanisms.&lt;/p&gt;

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

&lt;p&gt;If you plan to develop custom user interfaces that draw or manipulate 2D chemical structures, regardless of their design, Leafcutter will provide a powerful new tool for doing so.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://www.flickr.com/photos/gavatron"&gt;Gavatron&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:15:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e6cfcaa9-5a3c-4867-8358-44f77693e881</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/02/06/the-chemically-enabled-user-interface-an-introduction-to-leafcutter</link>
      <category>Tools</category>
      <category>leafcutter</category>
      <category>chemwriter</category>
      <category>java</category>
      <category>2d</category>
      <category>filthyrichclients</category>
      <category>richclients</category>
      <category>ria</category>
    </item>
  </channel>
</rss>
