Making 3D Collada files for iBooks Author from PDB files

TIR1 complex structure involved in auxin signaling
This is a ribbon diagram of the TIR1 complex, a collection of proteins that acts as an auxin receptor.

While messing around with iBooks Author, working on graphics and other media supplements for my book project, I noticed the ‘3D’ type of widget. I would love to be able to include a few structures of proteins in my project, so I started reading up on what kinds of files it supports. In short, it takes only 3D Collada files (short for collaborative design activity) and would allow the viewer to manipulate the structure on the iPad. Sounds great, but how do I make a 3D Collada (.dae) file?

The standard for storing 3D data for biomolecules is the PDB file, short for Protein Data Bank, and available for download from sites like the Research Collaboratory for Structural Bioinformatics (RCSB) PDB. Pretty much every protein that has been crystallized has had its coordinates deposited as a PDB file there. The great thing about PDB files is that they are not static images, they are a set of instructions for drawing a structure, and therefore can be interactively manipulated if opened with the right software.

The problem is, iBooks Author is not the ‘right’ software – it does not read PDB files. But fancy 3D modeling software like Maya or Blender, both of which export 3D Collada files, do not have a clue how to open a PDB file. Oh bother. A little searching around, though, led me to an open source plug-in called the embedded Python Molecular Viewer, ePMV. This nifty software loads within the fancy 3D modeling environment and gives you access to those PDB files.

After installing the version of Blender from the ePMV site and enabling the plug-in, I could open PDB files and begin playing around with the many, many settings available for coloring, lighting, and displaying the structure. I have a lot to learn as far as using the software to customize all of these features, but at least I’ve successfully exported a Collada file and inserted it into my iBook project. Now that I have a way to use them, it’s time to think about which structures I want to include and where.

iBooks, HyperCard, and creating beautiful things

Back in January I wrote about using iBooks Author to create a companion “textbook” for a course I teach regularly. The term textbook is in quotes because I don’t really think of this as a true textbook, but something new – smaller, more focused, less encyclopedic, targeted to my class. I somehow managed to (mostly) keep up with writing a summary of each topic we discussed as the semester progressed, publishing them on the web for students to use as study aids. At the end of the term they told me these overviews were very helpful, which I found satisfying. My plan was to compile these into a single stand-alone iBook for next year’s class, and probably also produce an ePub and/or PDF.

Then something awful happened. I downloaded an iBook called Paperless by David Sparks, of MacSparky fame, and it made me realize I’m doing it wrong.

Paperless is so beautiful. Sparks has paid so much attention to every single detail that he has succeeded in setting the bar incredibly high for self-publishing in this new form. This would be easy to dismiss as the work of a full-time freelance writer/publisher, but Sparks has a full-time job – he’s done all this in his spare time. You would never know this, though, given the exquisite care he’s taken to create something that communicates his points powerfully and effectively.

Last week I came across this article about HyperCard that reminded me of my time as a HyperCard enthusiast when I was a kid, experimenting with creating adventure stories and encyclopedia-like reference works, complete with hyperlinked text. The obvious descendent of HyperCard of course is the web itself, and it far exceeds the possibilities of the original HyperCard concept in many ways: it’s distributed, cross-platform, and world-wide, to name a few. But I can also see iBooks as a kind of spiritual descendant of HyperCard in that the combination of the iPad + iBooks app acts as a viewer for a package that includes rich media, images, interactive elements, and text. This fulfills the promise of HyperCard in a way even the web doesn’t because everything is bundled into a single, portable, stand-alone package. It has no external dependencies on web servers or even network access, which is, unfortunately, still questionable in many schools.

Thinking about iBooks as the descendant of HyperCard is a powerful motivator for me personally. At the same time, seeing an example like the Paperless book opened my eyes to the possibility of using iBooks Author to make a beautiful thing. There is a real payoff to investing in the capabilities of the platform instead of just treating it like a digital replica of a previous form.

Why iBooks Author is Interesting to Me

Today Apple announced a number of new initiatives relating to textbooks, including a new version of their iOS app iBooks, a new authoring tool to create iBooks, and a new iOS app for iTunes U. None of these announcements was an utter surprise, as rumors had been swirling for several weeks before announcements were even delivered to the press for the event. And while I think the new initiative to sell textbooks for iBooks is important, I want to focus on the authoring tool and its implications for higher ed in this post.

This semester I am teaching an upper-level course in my main area of specialty, plant physiology. Since I began teaching the class 10 years ago, and even when I took the class as an undergrad, I have used the standard-bearer text, Plant Physiology by Taiz and Zeiger. It is an excellent book with an encyclopedic coverage of the topic — it’s great. In fact, it is too great, going into detail at a level more appropriate for advanced courses. I have tended to assign readings from the text as a supplement and a reference for the students, and in almost no topic do we exhaust the coverage of the book. I provide the students with an outline for each topic so they know which details I want them to focus their attention on. For some time, I have felt like they aren’t getting their money’s worth out of the book using it in this way, but they are much more comfortable having an “official” textbook than going without (I’ve tried that experiment). The only alternative seemed to be to write my own, but the fact that the textbook in a field is too good did not seem like strong motivation to write something else. I have no interest in writing a real textbook and trying to get it published, as it seems to me like a monumental task, and I’d frankly rather be in the lab.

But if there were a way to “publish” a book only targeting my class, by converting those outlines I’ve made into short chapters on each topic, well… Why not? I have no intentions of any other students wanting or needing my vastly inferior collection of topic overviews, but it would be fine if they wanted them. The iBooks Author app seems like just the kind of tool to create such a book — I can take words I already have lying around (or write new ones), package them up, and push a button. I can export a PDF for students without iOS devices. I can publish them to the web for still others to find them. I can use something like pandoc to shape them into a file in ePub format.

And all this makes me wonder, how many other faculty members out there are like me, having a collection of notes and points of emphasis for a topic that they know something about, but had no interest in producing a textbook through a traditional publisher? Or perhaps they wrote their own “book” and published it through the campus copy shop? I think having an authoring tool and distribution system all wrapped up together has tremendous potential for these situations. Having the freedom and flexibility to put together a little book to accompany a specialty course is an attractive idea to me, one that I plan to experiment with.

If I end up doing the work to turn those outlines into book chapters and distribute them to my class, I will likely do so without cost to the students (despite the objections of my wife!). I have felt for a long time that textbooks are far too expensive, especially those that are used only as a secondary reference like I described above. I would love to save my students the cost of the textbook yet still provide them with something that serves as a reference for them as they study. I haven’t even begun investigating the new iTunes U app as a distribution means, but I understand it could work in conjunction with iBooks to provide all manner of resources to our students. Makes me wonder which will be more disrupted, textbook publishers or LMS vendors?