<?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 chemwriter</title>
    <link>http://depth-first.com/articles/tag/chemwriter</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Vector Markup Language for Cheminformatics</title>
      <description>&lt;p&gt;&lt;a href="http://depth-first.com/articles/2008/06/06/the-other-vector-graphics-markup-language"&gt;Vector Markup Language&lt;/a&gt; (VML, not to be confused with &lt;a href="http://en.wikipedia.org/wiki/VRML"&gt;VRML&lt;/a&gt;) is the XML-based vector graphics system that has been present in Internet Explorer for the last eight years. Although not as widely-documented or well-known as its younger cousin, &lt;a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics"&gt;SVG&lt;/a&gt;, VML is a capable system with all of the features needed to create dynamic images on the Web client.&lt;/p&gt;

&lt;p&gt;Nothing beats an example for discussing technologies. To clarify the modifications to the stylesheet and namespace required by VML, an example is given on a separate page:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://depth-first.com/demo/20080722/oxytocin.html"&gt;View the VML Image Here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Internet Explorer is the only major browser to support VML, so the image won't be visible on other clients. The image is hyperlinked to the &lt;a href="http://chempedia.com/monographs/oxytocin"&gt;Chempedia entry for Oxytocin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This example's VML was generated with a development version of &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 22 Jul 2008 09:19:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:277b7a75-c017-40d7-b742-cd5cabcb9d10</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/07/22/vector-markup-language-for-cheminformatics</link>
      <category>Tools</category>
      <category>chemwriter</category>
      <category>vml</category>
      <category>internetexplorer</category>
      <category>oxytocin</category>
    </item>
    <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>Chempedia.net: Mashing Up PubChem and Wikipedia</title>
      <description>&lt;p&gt;&lt;a href="http://chempedia.com"&gt;&lt;img src="http://chempedia.net/images/global/logo.png" align="right"&gt;&lt;/img&gt;&lt;/a&gt;&lt;a href="http://pubchem.ncbi.nlm.nih.gov/"&gt;PubChem&lt;/a&gt; and &lt;a href="http://wikipedia.net"&gt;Wikipedia&lt;/a&gt; represent two of the largest open repositories of chemical information in the world. And they complement each other very nicely. PubChem contains mainly low-level chemical structure information whereas Wikipedia contains free-text descriptions of chemical compounds in the form of &lt;a href="http://depth-first.com/articles/2008/04/02/wikipedia-for-cheminformatics-a-simple-web-api-for-finding-cas-numbers-in-compound-monographs"&gt;compound monographs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Both services offer permission and access to copy and reuse their contents. But neither service is, by itself, nearly as useful as it could be.&lt;/p&gt;

&lt;p&gt;Why not mash them up?&lt;/p&gt;

&lt;p&gt;To explore that question my company, &lt;a href="http://metamolecular.com"&gt;Metamolecular, LLC&lt;/a&gt; has launched &lt;a href="http://chempedia.com"&gt;Chempedia&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To my knowledge, Chempedia represents the first publicly-facing database of compounds to incorporate Wikipedia's collection of organic compound monographs. And it's one of the few cheminformatics services to make use of free-text descriptions generated by individual chemists.&lt;/p&gt;

&lt;p&gt;Chempedia has been somewhat selective about the compounds it includes. To date, it has spidered over 2,500 monographs, combining them with over 300,000 of the most interesting compounds from PubChem. Not every Chempedia.net molecule has a monograph, but now there's a tool that can actually make that absence apparent.&lt;/p&gt;

&lt;p&gt;Chempedia is both an experiment and a service. It's immediately useful for anyone in the business of making or doing things with organic molecules. It's created several unexpected moments of "Oh, that's actually a useful molecule!" It also will serve as a platform to test some of the ideas discussed in Depth-First over the last year or so on the advantages of the Web for collaboration in chemistry.&lt;/p&gt;

&lt;p&gt;Stay tuned for more details about how Chempedia was created and some of its applications in chemistry.&lt;/p&gt;</description>
      <pubDate>Fri, 04 Apr 2008 10:06:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:168432fb-c064-43c2-a60d-728c7c29c406</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/04/04/chempedia-net-mashing-up-pubchem-and-wikipedia</link>
      <category>Tools</category>
      <category>chempedia</category>
      <category>wikipedia</category>
      <category>pubchem</category>
      <category>rails</category>
      <category>ruby</category>
      <category>chemwriter</category>
      <category>applet</category>
      <category>java</category>
      <category>jruby</category>
    </item>
    <item>
      <title>Demystifying Java Applets Part 3: Failing Gracefully When Your Users Don't Have Java</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/brrtha/2099065164/"&gt;&lt;img src="http://depth-first.com/demo/20080312/wipeout.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Contrary to popular misconception, Java applets are a mature technology ideally suited for building highly interactive Web content. Although this hasn't always been the case, a lot has changed since Sun's introduction of Java over a decade ago. Previous articles in this series have discussed why &lt;a href="http://depth-first.com/articles/2008/02/20/demystifying-java-applets-part-1-cross-browser-standards-compliant-pure-html-deployment-using-the-object-tag"&gt;the object tag alone can and should be used to deploy applets&lt;/a&gt; and how &lt;a href="http://depth-first.com/articles/2008/03/10/demystifying-java-applets-part-2-dry-deployment-with-the-javay-method"&gt;using the Javay deployment method&lt;/a&gt; can make life easier if you do. This article will address one of the most important questions of all when using applets: what happens if your user doesn't have Java?&lt;/p&gt;

&lt;h4&gt;Assume Your Users Won't Have Java&lt;/h4&gt;

&lt;p&gt;Java is ubiquitous, but it's not universal. Some users simply won't have a Java Virtual Machine (JVM) installed at all on their systems. Some will have one, but it will be disabled. Still others may have been browsing the Web for years, never realizing that Microsoft &lt;a href="http://java.sun.com/j2se/1.4.2/docs/guide/deployment/deployment-guide/upgrade-guide/"&gt;installed a hopelessly obsolete JVM&lt;/a&gt; on their machines without their knowledge, rendering useless a large amount of Web content.&lt;/p&gt;

&lt;p&gt;Regardless of why they might not have the JVM your applet requires, assume that a good number of your users won't and plan accordingly.&lt;/p&gt;

&lt;p&gt;But how?&lt;/p&gt;

&lt;h4&gt;The Javay Method and Deployment Failsafes&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://depth-first.com/articles/2008/03/10/demystifying-java-applets-part-2-dry-deployment-with-the-javay-method"&gt;The Javay method&lt;/a&gt; for applet deployment can be broken down into three main parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Using the HTML 4 &lt;tt&gt;&amp;lt;object&amp;gt;&lt;/tt&gt; tag - period. Neither &lt;tt&gt;&amp;lt;applet&amp;gt;&lt;/tt&gt;, which is deprecated, nor &lt;tt&gt;&amp;lt;embed&amp;gt;&lt;/tt&gt;, which isn't even part of HTML, are needed any longer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using Microsoft's conditional comments to create an opening object tag that will work with its browsers, but keeping it DRY by re-using the rest of the tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Suppressing the ridiculous "Click to activate" message in IE 6/7 with &lt;a href="http://jactivating.sourceforge.net/en/"&gt;jActivating&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In contrast to other approaches, with the Javay method, we can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Know our applet will instantiate on all major browsers, and many niche browsers as well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Work only with standards-compliant HTML from start to finish.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stop using &lt;tt&gt;document.write&lt;/tt&gt; to create tags, a method which unless properly trapped will silently fail without any indication of what's wrong when JavaScript is disabled or if the script fails for some other reason.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But perhaps the biggest advantages of the Javay method are the ones most often overlooked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It offers a cross-browser method to display failsafe content should Java be disabled or not installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It provides a highly effective, cross-browser method for users to install Java directly from the page displaying the applet.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;How the Failsafe Works&lt;/h4&gt;

&lt;p&gt;When modern browsers such as Firefox and Internet Explorer encounter an &lt;tt&gt;&amp;lt;object&amp;gt;&lt;/tt&gt; tag requesting a plugin they don't understand, they do two very useful things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;They render any valid HTML appearing after the &lt;tt&gt;&amp;lt;object&amp;gt;&lt;/tt&gt; tag's child &lt;tt&gt;&amp;lt;param&amp;gt;&lt;/tt&gt; elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They prompt the user to install the correct plugin to view the content - without redirecting them to another page.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These two behaviors give us everything we need to gracefully fail if the Java plugin is unavailable. When the Java plugin is installed and enabled, users see the applet as planned. When the Java plugin is either not installed or disabled, users see both a placeholder of our choosing and a prompt, created by the browser itself, offering to install the missing plugin.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;&amp;lt;object&amp;gt;&lt;/tt&gt; tag lets us take this even further. We can specify, down to the revision level, the exact version of Java needed to run an applet. If that requirement changes, all we need to do is change the &lt;tt&gt;&amp;lt;object&amp;gt;&lt;/tt&gt; tag and users will be prompted to upgrade their JVM the next time they see our applet - if necessary.&lt;/p&gt;

&lt;h4&gt;Live Demo&lt;/h4&gt;

&lt;p&gt;Here's my company's 2D chemical structure editor, &lt;a href="http://metamolecular.com/chemwriter"&gt;ChemWriter&lt;/a&gt;, deployed with the Javay method:&lt;/p&gt;

&lt;p&gt;&lt;!--[if IE]&gt;&lt;object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"
width="480" height="350"&gt;&lt;script&gt;/*&lt;![endif]--&gt;&lt;script type="text/javascript"&gt;/**/&lt;/script&gt;
&lt;!--[if !IE]&gt;&lt;!--&gt;
&lt;object type="application/x-java-applet;version=1.4.2" width="480" height="350"&gt;
&lt;!--&lt;![endif]--&gt;
  &lt;param name="code" value="com/metamolecular/chemwriter/applet/EditorApplet.class"&gt;
  &lt;param name="archive" value="/applets/chemwriter.jar"&gt;
  &lt;param name="persistState" value="false"&gt;
  &lt;param name="licenseKey" value="4BC4-3C59-3E7D-182B-92B7-2E68"&gt;
  &lt;a href="http://metamolecular.com/java/"&gt;
    &lt;img src="http://depth-first.com/demo/20080310/chemwriter_plugin.png" style="padding: 125.0px 190.0px 125.0px 190.0px; border: 1px dashed red;"/&gt;&lt;/a&gt;
&lt;/object&gt;&lt;/p&gt;

&lt;p&gt;And here's what the failsafe code looks like when it's rendered:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://metamolecular.com/java/"&gt;
  &lt;img src="http://depth-first.com/demo/20080310/chemwriter_plugin.png" style="padding: 125.0px 190.0px 125.0px 190.0px; border: 1px dashed red;"/&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;One More Thing&lt;/h4&gt;

&lt;p&gt;We can take failsafes to yet another level, if we'd like. Let's say Joe comes to our site without the an installed Java plugin. Internet Explorer 6 informs him via a popup that Java is needed. Impatient to see the site's content, he closes the dialog. Without being redirected, Joe can see all of the site's content, except for the parts requiring Java, for which he sees a custom "Plugin Not Found" placeholder. Discovering that the site's content consists of highly-relevant information, he decides he wants to install the Java plugin after all. Clicking on placeholder image takes him to a Java installation page.&lt;/p&gt;

&lt;p&gt;Unlike other Java installation pages Joe may have seen, this one is specific to his browser, Internet Explorer 6.&lt;/p&gt;

&lt;p&gt;This approach work very well in practice. For example, my company's website, &lt;a href="http://metamolecular.com"&gt;metamolecular.com&lt;/a&gt; uses it. Try visiting the &lt;a href="http://metamolecular.com/java/"&gt;default Java installation page&lt;/a&gt;, and if your browser is included below, you'll be redirected to the browser-specific Java installation page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://metamolecular.com/java"&gt;Default Page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://metamolecular.com/java/firefox"&gt;Firefox Page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://metamolecular.com/java/ie6"&gt;Internet Explorer 6 Page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://metamolecular.com/java/ie7"&gt;Internet Explorer 7 Page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://metamolecular.com/java/safari"&gt;Safari Page&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More information can be found in &lt;a href="http://metamolecular.com/articles/chemwriter-deployment"&gt;this article on deploying ChemWriter&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Last Thoughts&lt;/h4&gt;

&lt;p&gt;Java applets gained a deserved reputation in the late '90s for being difficult to deploy, a view that's now worth reconsidering. Using some simple techniques, Web applications can fail gracefully if Java is unavailable and then take steps to quickly get users back on track.&lt;/p&gt;

&lt;p&gt;Getting software reliably and securely installed on any client system is difficult, especially on the open Web. But the Java plugin and the Javay deployment method make it about as straightforward as it can possibly be.&lt;/p&gt;

&lt;p&gt;It's time reconsider applets.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/brrtha/"&gt;brrtha&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 12 Mar 2008 23:26:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:fb9fb0dc-5102-4259-92bf-09b1cc73e740</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/03/12/demystifying-java-applets-part-3-failing-gracefully-when-your-users-dont-have-java</link>
      <category>Tools</category>
      <category>applet</category>
      <category>chemwriter</category>
      <category>deployment</category>
      <category>flashsatay</category>
      <category>jactivating</category>
      <category>java</category>
      <category>javay</category>
      <category>failsafe</category>
      <category>poka</category>
      <category>yoke</category>
    </item>
  </channel>
</rss>
