SteinBlog

Even better HTML Slidy presentations with Marvin Applets

Putting chemistry into presentations can be a pain in the neck. Keeping it up-to-date is even worse. When I access elderly presentations of mine, where I put ChemOffice stuff into Powerpoint via OLE, I can be absolutely sure that the information is lost, after moving to Linux, Open Office and free structure editors. But there is hope for the future …

… and this hope is called (surprise!): Open Standards and Free Software. In this particular case, the latters come down to free as in beer, but that’s another story.
I’ve blogged about using HTMLSlidy together with ASCIIMathML, which proved to be an invaluable tool for authoring lectures ever since.

Another obvious advantage of HTMLSlidy is the possible use of applets in your slides. In one of my recent lectures on QSAR descriptors, I wanted to reproduce a table with chemical structures and descriptor values. First I had these structures as SMILES in a column but then quickly realized that rendering these SMILES as “real” 2D diagrams would be easy with the right applet. JChemPaint proved to be out of order once more 🙂 and I therefore turned to MarvinView for this pupose (Rich – how is FireFly doing?).

The result is online a few slides after this link. The performance could be better of course. It definitely takes too long to load slide number 15 of this lecture, containing the 5 applet instances, but it is a step forward.
The HTML for the inclusion into the page is follows. It requires a java script library declaration at the beginning of your Slidy source code as:

<script language="JavaScript1.1" src="applet/marvin.js"></script>

Where ever you want your structure now, you put:

    <script language="JavaScript1.1">
    /<!--
    // marvin_jvm = "builtin"; // "builtin" or "plugin"
    mview_begin("applet/", 100, 100);
    mview_param("molFormat", "smiles");
    mview_param("mol", "CC(C)(C)CC");
    mview_end();
    //-->
</script>

I also found it handy to include an addendum slide with a MarvinSketch applet instance at the end of my presentation which I can use for producing SMILES, mol files and SVG graphics for my presentation while I’m authoring. puttygen


Categorised as: Open Science, Publishing, Teaching


3 Comments

  1. Christoph, you did use the view only JCP applet, right?

Leave a Reply

Your email address will not be published. Required fields are marked *