Jmol goes JavaScript

JmolAbout 10 years ago, I turned the Jmol project over to a series of fantastic lead developers (Jmol programmers regenerate in different bodies just like Doctor Who does).  Since then, the aspect of the new work on Jmol that has most delighted me is the Jmol applet, which allows the program to be embedded in web pages.   The Jmol applet transformed Jmol from a niche application into a way of broadly disseminating and interacting with chemical structures.  It has become the de facto standard for showing protein structures at the RCSB Protein Data Bank, as well as in a number of chemistry journals.

The problem with Java applets is that many new tablet and phone web browsers don’t support them (and it looks like Java applets are being slowly disabled on Mac browsers as well).  Java has always been an elegant but relatively heavy-weight solution to dynamic content, but I think its time as a widely-used language for web content is coming to a close.

So, how do you interact with chemical structures without Java or Flash?

The Jmol team has been hard at work converting the Jmol source so that the same source code that produces the Jmol applet can also be run through Java2Script to create the entire Jmol applet in JavaScript.   The new beast is called JSmol and has almost all of the functionality of Jmol itself (file IO, scripting, etc.)    Bob Hanson’s demo pages give a taste of this work.

This is amazing work.  The same Java code is compiled to create the Jmol applet, a WebGL version of JSmol, and the HTML5 version of JSmol that can run on my phone. Almost all of Jmol is there – the ability to display orbitals, crystals, and van der Waals surfaces.  Some menu interaction is still missing, but if the goal is to display and interact with a chemically meaningful structure on a web page,  JSmol looks like a great solution.

The credit for this work largely goes to a number of people:  The GLmol interface was written by Takanori Nakane.  Java2Script was written by Zhou Renjian.  The Jmol code conversion to JavaScript was done by the current Doctor Who,  Bob Hanson.

Octopus – A cool open source TDDFT code

OctopusI just found out about Octopus, a quantum mechanics package that does time-dependent density functional theory (TDDFT) calculations using pseudopotential approximations.

It works in parallel using MPI and OpenMP and scales to tens of thousands of processors. It also has support for graphical processing units (GPUs) through OpenCL.

The Octopus code can be browsed freely, and it has been released under the GPL.

Particularly cool is the ability to use the time dependent electron localization function (TDELF) to look at orbitals dynamically during a chemical reaction.

Why aren’t voting machines required to be Open Source?

If ever there was a need for the transparency that open source software brings it is in the realm of voting machine technology.    This story makes that point crystal clear.   There may or may not be shenanigans going on in Ohio.  The point is that we have no way of knowing what the patches on those Ohio voting machines actually do, and no faith in the code reading, debugging, and auditing ability of elected officials.   If we want to be confident in the workings of our democracy, closed-source voting machines should be banned.

For that matter, why aren’t voting systems required to leave a physical paper trail so that we can check up on the tabulating algorithms?

Open source fonts

Adobe released an open source font today called Source Sans Pro.   It looks super clean and nearly perfect for user interfaces.  Right now it comes in six weights, but a monowidth version is coming soon.  (I’m most excited about this, as the sample of the monowidth font on the Adobe blog post is gorgeous).    Adobe did this right – they have made all source files used in the production of the fonts available for download at SourceForge.

Maybe we’ll get more scientists using Source Sans Pro instead of releasing their important results in Comic Sans.

Data visualization and Digital Research tools

Two new collections of tools that may be of interest to the OpenScience community.  Not everything on these lists is Open Source, but many of the visualization and research tools look to be very useful.   Hat tip to Eric Lease Morgan (@ericleasemorgan) for pointing these out:

  1. – A collection of tools that the people behind, work with on a daily basis and recommend. This is not a list of everything out there, but instead a thoughtfully curated selection of our favourite tools that will make your life easier creating meaningful and beautiful data visualizations.
  2. Bamboo DiRT is a tool, service, and collection registry of digital research tools for scholarly use. Developed by Project Bamboo, Bamboo DiRT makes it easy for digital humanists and others conducting digital research to find and compare resources ranging from content management systems to music OCR, statistical analysis packages to mind mapping software.

PLoS ONE News and Blog Round-Up

Researchers find a possible cure for the common cold and more – in this week’s media digest.

Human Pathogen Shown to Cause Disease in the Threatened Eklhorn Coral Acropora palmata was covered by The NewsHour, The New York Times, NPR, and CNN.

CNET, Hindustan Times, and Okezone covered Automatic Prediction of Facial Trait Judgments: Appearance vs. Structural Models.

The paper, Predator Cat Odors Activate Sexual Arousal Pathways in Brains of Toxoplasma gondii Infected Rats, received coverage from The New York Times, Scientific American, TIME’s Healthland, and The Loom.

Broad-Spectrum Antiviral Therapeutics received media coverage from Voice of America, LA Times, and Forbes.

Large Recovery of Fish Biomass in a No-Take Marine Reserve was covered by National Geographic (nice slideshow too), The Christian Science Monitor, Nature News, and KGTV San Diego. The image above, is taken from Figure 4 of this manuscript.

80 Beats covered the article, Artificial Skin – Culturing of Different Skin Cell Lines for Generating an Artificial Skin Substitute on Cross-Weaved Spider Silk Fibres. So did Treehugger.

The article entitled, Scientists Want More Children received media coverage from The Wall Street Journal, TIME’s Ecocentric, Science Career Blog, and Inside Higher Ed.

Elevated Non-Esterified Fatty Acid Concentrations during Bovine Oocyte Maturation Compromise Early Embryo Physiology was covered by Reuters, The Guardian, and The Press Association.

10 years of CDK

Today marks (roughly) the tenth birthday of a fantastically successful open science project called the Chemical Development Kit (CDK).  At the time the skeleton of the project was set down on my office whiteboard, I was still the lead developer of Jmol, and Egon Willighagen and Christoph Steinbeck had contributed code to the Jmol project. Christoph’s pet code was a neat 2-d structure editor called JChemPaint, and Egon was working largely on the Chemical Markup Language (CML), although his code contributions were showing up nearly everywhere. Egon and Christoph were in the US for a “Chemistry and the Internet” conference and made a side trip by train to visit me so we could figure out how to unify these projects and to make a more general and reusable set of chemical objects.

The CDK waterfall whiteboard

The CDK waterfall whiteboard

The CDK design session was a fun weekend. In retrospect, they were some of the purest days of collaborative creativity I’ve ever experienced. We spent many hours and a lot of coffee hashing out some of the basic classes of CDK. The final picture of the whiteboard shows a classic waterfall diagram of what we were going to implement.

I’m the first to admit that my contributions to CDK were minimal. Egon & Chris ran with the design, expanded and improved it, implemented all the missing pieces, and released it to the world. It has become an important piece of scientific software, particularly in the bioinformatics community. Beyond Egon & Chris, Rajarshi Guha has been one of the prime developers of the software.

CDK is, by all objective standards a fantastic success story of open source scientific software. It has a large and vibrant user community, active developers, and a number of people (including myself) who browse the code just to see how it does something difficult. Egon has written a thoughtful piece on where CDK should go from here.

Happy Birthday CDK!


Packmol One of the biggest issues you face when you first start doing molecular dynamics (MD) simulations is how to create an initial geometry that won’t blow up in the first few time steps. Repulsive forces are very steep if the atoms are too close to each other, and if you are trying to simulate a condensed phase (liquid, solid, or interfacial) system, it can be hard to know how to make a sensible initial structure.

Packmol is a cool program that appears to solve this problem. It creates an initial point for molecular dynamics simulations by packing molecules in defined regions of space. The packing guarantees that short range repulsive interactions do not disrupt the simulations. The great variety of types of spatial constraints that can be attributed to the molecules, or atoms within the molecules, makes it easy to create ordered systems, such as lamellar, spherical or tubular lipid layers. It works with PDB and XYZ files and appears to be available under the GPL. Very, very cool!

Gwyddion – Open Source SPM analysis

Gwyddion We just discovered a very cool open source program for analyzing scanning probe microscopy (SPM) data files. There a number of incompatible and proprietary file formats for surface microscopies (AFM, MFM, STM, SNOM/NSOM) and getting data out from a microscope for further processing (including baseline leveling, profile analysis, and statistical analysis) can be a difficult task. Gwyddion is a Gtk+ based package that runs on Linux, Mac OS X (with MacPorts) and Windows and appears to do nearly everything that some expensive commercial packages (and some free closed-source packages) can do. Some of our colleagues were very happy to discover this piece of wizardry!

If you’re going to do good science, release the computer code too

A very nice aarticle by Darrel Ince has just been posted over at the Guardian. It deals with the climate-gate email theft and the quality of academic science code has just been . An excerpt:

Computer code is also at the heart of a scientific issue. One of the key features of science is deniability: if you erect a theory and someone produces evidence that it is wrong, then it falls. This is how science works: by openness, by publishing minute details of an experiment, some mathematical equations or a simulation; by doing this you embrace deniability. This does not seem to have happened in climate research. Many researchers have refused to release their computer programs — even though they are still in existence and not subject to commercial agreements. An example is Professor Mann’s initial refusal to give up the code that was used to construct the 1999 “hockey stick” model that demonstrated that human-made global warming is a unique artefact of the last few decades. (He did finally release it in 2005.)