Encapsulated PostScript for Cheminformatics
Previous articles have discussed ways to display chemical structures in a variety of vector graphics formats, including Scalable Vector Graphics (SVG), Vector Markup Language (VML), and Shockwave Flash (SWF, or "Flash"). There is one other vector graphics format still in common use that has so far not been discussed: Encapsulated PostScript (EPS).
EPS is a vector graphics format developed by Adobe Systems specifically for desktop publishing. Apparently, the last revision to the EPS Specification, Version 3.0, was published in 1992. Although ancient as technologies go, EPS can still be found in use today. Like the other vector graphics formats discussed here, EPS has all of the features necessary to create high-quality 2D images of chemical structures.
To demonstrate, a development version of ChemWriter was used to convert a molfile representing rosuvastatin (Crestor) into the corresponding color EPS file. The result can be downloaded here.
An open source library, jlibeps, can be used to encode EPS in Java. The business end of the library is an EPS encoding class that extends Graphics2D, enabling most Java2D rendering to be converted into EPS. If you've worked with the Batik SVG toolkit, the concept is similar.
Although jlibeps is a good solution, EPS shares enough similarities to other vector graphics languages that directly encoding EPS output is also a viable option, and the one that was used in the rosuvastatin example above.