<?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 vectorgraphics</title>
    <link>http://depth-first.com/articles/tag/vectorgraphics</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <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 +0000</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 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9a0ab422-6515-446f-a0ef-a765519d8dd1</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/10/adobe-flash-for-cheminformatics-fast-scalable-and-attractive-2d-depiction-of-chemical-structures-with-vector-graphics</link>
      <category>Tools</category>
      <category>flash</category>
      <category>adobe</category>
      <category>svg</category>
      <category>vml</category>
      <category>chemwriter</category>
      <category>vectorgraphics</category>
      <category>2d</category>
      <category>chemicalstructure</category>
      <category>java</category>
      <category>swf</category>
    </item>
    <item>
      <title>The Other Vector Graphics Markup Language</title>
      <description>&lt;p&gt;&lt;img src="http://depth-first.com/demo/20080606/toucan.png" align="right"&gt;&lt;/img&gt;&lt;a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics"&gt;Scalable Vector Graphics&lt;/a&gt; (SVG) is a technology that enables the creation and publication of high quality images that can be scaled to any resolution. SVG is ideally suited for the Web, and all major browsers now support it - except Internet Explorer (IE). This poses a problem: vector graphics are by far superior to raster images for many applications, but the lack of native IE support makes SVG a non-starter for most developers. This article discusses a little known IE capability that might provide a solution.&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;Vector graphics have a lot to offer chemistry, especially when used with Web applications. The combination of VML and SVG offers a proven technology platform that's ready today, but only if you can generate VML.&lt;/p&gt;</description>
      <pubDate>Fri, 06 Jun 2008 14:39:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:48c29183-75ae-4e3f-b4f7-e99de2a52048</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/06/06/the-other-vector-graphics-markup-language</link>
      <category>Tools</category>
      <category>svg</category>
      <category>vml</category>
      <category>vectorgraphics</category>
      <category>silverlight</category>
      <category>flash</category>
      <category>chemicalstructure</category>
      <category>2d</category>
      <category>chemwriter</category>
      <category>chempedia</category>
    </item>
    <item>
      <title>The Art and Science of Chemical Structure Diagrams: ChemWriter as Chemically-Aware Vector Graphics System</title>
      <description>&lt;p&gt;&lt;a href="http://flickr.com/photos/aligraney/1874964319/"&gt;&lt;img src="http://depth-first.com/demo/20080214/zoom.jpg" align="right"&gt;&lt;/img&gt;&lt;/a&gt;Of the many problems to be solved when &lt;a href="http://depth-first.com/articles/2008/02/12/the-art-and-science-of-chemical-structure-diagrams-double-trouble"&gt;building software to view and manipulate 2D chemical structures&lt;/a&gt;, one of the trickiest is getting all features to scale proportionally. This problem is widespread because it can seldom be predicted at which resolution a chemical structure will be viewed.&lt;/p&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

&lt;p&gt;&lt;em&gt;Image Credit: &lt;a href="http://flickr.com/photos/aligraney/"&gt;cattypumkinhead&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 14 Feb 2008 13:13:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0855bd3a-5ed6-4dce-8991-abb93f84188f</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2008/02/14/the-art-and-science-of-chemical-structure-diagrams-chemwriter-as-chemically-aware-vector-graphics-system</link>
      <category>Tools</category>
      <category>chemwriter</category>
      <category>vectorgraphics</category>
      <category>leafcutter</category>
      <category>chemicalstructure</category>
    </item>
  </channel>
</rss>
