<?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: Rendering Molecules with SVG on the Web</title>
    <link>http://depth-first.com/articles/2006/09/07/rendering-molecules-with-svg-on-the-web</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Walking the Web of Chemical Informatics</description>
    <item>
      <title>Rendering Molecules with SVG on the Web</title>
      <description>&lt;p&gt;&lt;a href="http://www.w3.org/Graphics/SVG/"&gt;Scalable Vector Graphics&lt;/a&gt; (SVG) is an XML-based language for encoding graphical content. Unlike raster image formats such as PNG, JPEG, and GIF, SVG images can be scaled to any resolution without pixelation. Given that 2-D structure diagrams are essentially line drawings, SVG seems like a natural fit for this type of representation. SVG also boasts several advanced features that make it an especially intriguing choice.&lt;/p&gt;

&lt;p&gt;In this first article of a series on SVG and chemical informatics, I'll start by showing some embedded SVG images of molecules (also see &lt;a href="http://www.adobe.com/svg/demos/devtrack/chemical.html"&gt;this demo&lt;/a&gt;). Later articles will discuss technical details such as writing, reading, animating, scripting, editing, annotating, and distributing 2-D structures encoded as SVG.&lt;/p&gt;

&lt;h4&gt;Now, the Bad News&lt;/h4&gt;

&lt;p&gt;SVG is a work in progress. Browser support and performance can vary widely. If you are using &lt;a href="http://www.mozilla.com/firefox/"&gt;Firefox&lt;/a&gt; version 1.5 or better, you should be able to see all of the images in this article without doing anything.&lt;/p&gt;

&lt;p&gt;Unfortunately for Internet Explorer users, Microsoft's browser lacks built-in SVG support. Still worse, IE 7 appears ready to continue this perplexing tradition. Fortunately, Adobe offers an &lt;a href="http://www.adobe.com/svg/viewer/install/main.html"&gt;SVG plugin for IE&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Although this page was tested in both IE 6 (with Adobe's plugin) and Firefox 1.5 (both Windows and Linux), your particular configuration may vary. Please feel free to post your experiences.&lt;/p&gt;

&lt;h4&gt;Some Simple SVG Structures&lt;/h4&gt;

&lt;p&gt;The examples below illustrate how SVG images of molecules can be embedded in an HTML document. These images just scratch the surface of what is possible. If you don't see 2-D structures, your browser may lack SVG support.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;strong&gt;Ascorbic Acid&lt;/strong&gt;&lt;/center&gt;
&lt;center&gt;
&lt;embed src="http://depth-first.com/demo/20060907/ascorbic_acid.svg" TYPE="image/svg+xml" width=350" height="400" /&gt;
&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;strong&gt;Alprazolam&lt;/strong&gt;&lt;/center&gt;
&lt;center&gt;
&lt;embed src="http://depth-first.com/demo/20060907/alprazolam.svg" TYPE="image/svg+xml" width=350" height="400" /&gt;
&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;strong&gt;Furosemide&lt;/strong&gt;&lt;/center&gt;
&lt;center&gt;
&lt;embed src="http://depth-first.com/demo/20060907/furosemide.svg" TYPE="image/svg+xml" width=350" height="300" /&gt;
&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;strong&gt;DDT&lt;/strong&gt;&lt;/center&gt;
&lt;center&gt;
&lt;embed src="http://depth-first.com/demo/20060907/ddt.svg" TYPE="image/svg+xml" width=350" height="300" /&gt;
&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: if your're viewing this article in a feed aggregator, the SVG images may have been stripped out. If so, please see the &lt;a href="http://depth-first.com/articles/2006/09/07/rendering-molecules-with-svg-on-the-web"&gt;original article&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 07 Sep 2006 13:56:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:3a3ac56e-c8a6-4853-8765-80ef16dec5a7</guid>
      <author>Rich Apodaca</author>
      <link>http://depth-first.com/articles/2006/09/07/rendering-molecules-with-svg-on-the-web</link>
      <category>Graphics</category>
      <category>web</category>
      <category>svg</category>
      <category>2d</category>
      <category>firefox</category>
    </item>
  </channel>
</rss>
