Use of SVG in Chemistry and xml2svg Transformations
Some discussion on another list (the SVG developers) has prompted me (and others) to summarise progress in the "XML" solution to handling and in particular displaying of chemical content. Unlike HTML, which is predominantly a display and text-based format where chemical content has to be included via "legacy" formats such as eg Molfiles, or via images, XML is designed for essentially complete semantic markup of content. Because no browser could easily handle such a broad scope, the concept is that XML documents will be displayed by appropriate transformation of the content into a small set of generic display formats which the browser CAN handle. The pre-eminent XML-based graphical format is SVG (scalable vector graphics) and hence the issue now resolves to how to transform any particular XML component to eg SVG, generically referred to here as xml2svg (although this does not preclude transformation to older non-XML formats such as Molfile and hence use of eg Chime). Listed below are some useful sites which cover issues of handling XML, and converting it to SVG 1. http://www.adobe.com/svg/demos/main.html which has an XSLT-based cml2svg converter 2. http://www.xml-cml.org/jumbo3/jumbo3-JS/ being a JavaScript based dynamic cml2svg converter. The http://www.xml-cml.org/ site has much other information about XML and CML. Also there you will find XACE (eXtensible annotating chemical editor), based on JME, but with "XML" wrappers. Work on XACE Mk II is well under way. 3. The cml2xbl2svg concept, originally part of Croczilla (http://www.croczilla.com/svg/), now part of one of the builds of Mozilla 0.9.8, and expected to be a permanent part of the Mozilla 1.0 release. 4. http://www.schemasoft.com/MathML/ which is a mathml2svg converter based on XSLT 5. See http://www.web3d.org/TaskGroups/source/xj3d.html being an XML version of VRML, and for which a viewer is now available. ( http://www.adobe.com/svg/demos/main.html also does 3D rotations) 6. http://www.ch.ic.ac.uk/rzepa/xml/ where the process of converting cml2svg, and in general then on to PDF using FOP, is described A XSLT stylesheet for the conversion is at http://www.ch.ic.ac.uk/rzepa/xml/fop.html The above article was published as G. V. Gkoutos, P. Murray-Rust, H. S. Rzepa, and M. Wright, Internet J. Chemistry, 2001, article 13. 7. Jiri.Jirat has written a custom CML2SVG converter (XSLT), the results can be viewed at: http://zvon.org/xxl/CML1.0/Output/index.html 8. Marvin outputs SVG, and reads, inter alia, CML http://www.chemaxon.com/marvin/ There is no doubt much more out there. This collection also illustrates one very powerful aspect of XML, which is the re-usability of various generic tools in a chemical context, a phenomenon that is largely new (previously the chemical community had to pretty much write its own tools!). If anyone in their travels comes across other interesting examples of xml2xml (in the generic sense) tools, and interesting examples say from the bio-informatics and other physical sciences, do please let this list know. -- Henry Rzepa. +44 (0870) 132 3747 (eFax) http://www.ch.ic.ac.uk/rzepa/ Dept. Chemistry, Imperial College, London, SW7 2AY, UK. chemweb: A list for Chemical Applications of the Internet. To post to list: mailto:chemweb@ic.ac.uk Archived as: http://www.lists.ic.ac.uk/hypermail/chemweb/ To (un)subscribe, mailto:majordomo@ic.ac.uk the following message; (un)subscribe chemweb List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From a colleague: If you want, you can forward the paragraph below to your list. The Batik toolkit from Apache at http://xml.apache.org/batik/index.html contains many useful SVG tools. Specifically, any Java application that paints graphics to the screen can instead paint to SVG using the SVGGraphics2D object. Also, any SVG file can be read in and displayed on an JSVGCanvas. I worked on a chemistry application that already had code to paint chemical structures. It was trivial to use the SVGGraphics2D object to generate SVG images instead and save them to XML files. We used this capability to generate reports based on what the user was seeing in the GUI. Mark ------------------------------------------------------------- Mark J. Balbes, Ph.D. mark@balbes.com Principal Software Engineer (314) 579-0066 Object Computing, Inc Visit us on the web at http://www.ociweb.com Visit the Wireless SIG at http://stlwebdev.org/sigs/wireless/ ------------------------------------------------------------- chemweb: A list for Chemical Applications of the Internet. To post to list: mailto:chemweb@ic.ac.uk Archived as: http://www.lists.ic.ac.uk/hypermail/chemweb/ To (un)subscribe, mailto:majordomo@ic.ac.uk the following message; (un)subscribe chemweb List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
On Wednesday 06 March 2002 17:37, Lisa M. Balbes, Ph.D. wrote:
From a colleague:
If you want, you can forward the paragraph below to your list.
The Batik toolkit from Apache at http://xml.apache.org/batik/index.html contains many useful SVG tools. Specifically, any Java application that paints graphics to the screen can instead paint to SVG using the SVGGraphics2D object. Also, any SVG file can be read in and displayed on an JSVGCanvas. I worked on a chemistry application that already had code to paint chemical structures. It was trivial to use the SVGGraphics2D object to generate SVG images instead and save them to XML files. We used this capability to generate reports based on what the user was seeing in the GUI.
JChemPaint (http://jchempaint.sourceforge.net/) uses this mechanism as well. Egon chemweb: A list for Chemical Applications of the Internet. To post to list: mailto:chemweb@ic.ac.uk Archived as: http://www.lists.ic.ac.uk/hypermail/chemweb/ To (un)subscribe, mailto:majordomo@ic.ac.uk the following message; (un)subscribe chemweb List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
participants (3)
- 
                
                E.L. Willighagen
- 
                
                Lisa M. Balbes, Ph.D.
- 
                
                Rzepa, Henry