Molecules for iPhone and iPod Touch

Author: Brad Larson
Molecules for iPhone and iPod Touch

I'm pleased to announce a product that I've been working on for a little bit: Molecules for the iPhone / iPod Touch. Molecules is a free 3-D molecular viewer for Apple's handheld devices which lets you manipulate DNA, proteins, and other biomolecules with your fingers. Using a single finger, you can rotate the molecules, and pinch gestures zoom in and out on the molecule. Moving two fingers at once pans across the molecule.

Currently, molecules are downloaded from the RCSB Protein Data Bank, a central repository of 3-D structures for a wide variety of biological molecules. Molecules comes bundled with a few molecules of interest that I'll describe a little later on. Once downloaded, these molecules are stored on the device and can be viewed offline. Most are ~10-100k, so they can be downloaded over even the cell phone network in a reasonable time and storage of them should not be a huge burden on an 8 GB or 16 GB iPhone or iPod. Unfortunately, to download new a molecule, you must know the four-character PDB code for it (I provide a small web browser view that lets you do a lookup on the PDB site), but I'm working on an integrated keyword search.

As mentioned at the beginning, Molecules is not only free but is open source, using the BSD license. I'm waiting to see when we're officially clear of the iPhone SDK Nondisclosure Agreement to post the source code, but I'll let you know when it's ready. I also will be making a series of posts describing the things that I've learned about the OpenGL ES side of programming, the UI layer, and others as I think of things to write about.

Unfortunately, the version in the App Store is a little behind my latest release, as version 1.0.1 is sitting in the (probably overloaded) review queue. Version 1.0.1 completes the bond tables for common nucleotide and amino acid residues, completing the rendering of most proteins, DNA, and RNA, and fixes a couple of glitches with the 1.0 version there right now. Bear with me for a couple of days until that is published to see the full capabilities of the current release.

The story behind Molecules

Why did I write Molecules? Although my Ph.D. was in Materials Science, my grad school research focused around biological applications. I've been fascinated by the structure and function of proteins and other biomolecules ever since high school, and only became more interested after attending biochemistry lectures by the outstanding Professor Ball at Rose-Hulman. However, what triggered this was seeing a poster by my brother, Matt Larson, who is working toward his Ph.D. in the department of Physiology and Biophysics at the University of Alabama - Birmingham. His research group is in the process of identifying an important protein structure using X-ray crystallography, and once they have that structure they need to be able to show it off.

Like others, I was extremely impressed with the first glimpses of the iPhone SDK provided in March, but what I was especially surprised with were the 3-D capabilities of Apple's portable devices. I saw even more impressive demos in person from other developers when I attended WWDC, so I decided to see what could be done on the iPhone. My initial experiments showed that the device could handle the kind of graphics needed for this, so I taught myself a little OpenGL and got started. Elements like the multitouch interface were a little tricky to get right (hopefully others will be able to learn from my code and avoid some of the stumbling around I did), but the end result is better than I had hoped.

To get you started, I include a couple of molecules with the program itself. The first is the iconic DNA double helix (PDB code 1BNA). When manipulating this, it's hard not to think about how we used to use dedicated, high-end hardware to do the kind of visualization you can now have in a pocket-sized device. Next is acetylcholinesterase complexed with Aricept (PDB code 1EVE). Aricept is an anti-Alzheimer's drug that I know from personal observation to be extremely effective at slowing the onset of that disease. My mother volunteers to bring members of the Wisconsin Veterans Home who suffer from Alzheimer's to church every Sunday, and knowledge we gain from protein structures like this and how they bind drug candidates will someday lead to a cure. Finally, I have included one variant on the structure of human insulin (PDB code 1TRZ). Recently, one of my best friends from high school passed away at far too young an age due to complications related to diabetes. Again, understanding protein structures allows researchers to more quickly develop treatments for this and other diseases.

For more information

The main page for Molecules is at http://www.sunsetlakesoftware.com/molecules. I invite you to stop by the forums to share your thoughts and to report bugs. Finally, if you are curious about research that I've performed or what I do for my day job, please check out the About the Author page.

UPDATE: Filled in the missing PDB code for insulin