Molecules for iPhone and iPod Touch

Molecules icon

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 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


I think I need some more information about this, it's not yet clear for me what's the exact applicability of the Molecules... is it for fun or for educational purposes? Either way I find it impressive, ipods keep going further and further always coming with something new, I am already looking forward to see what comes next.
Garry, at Apple Ipods

I intend for this application to be useful as a scientific and educational tool. DNA may act as a blueprint for living organisms, but proteins are the molecules that actually do stuff. The shape of a protein is what determines its function, and therefore the ability to view its molecular structure helps you to understand why it works the way it does. Researchers work long and hard to determine these structures, but they also need a means of analyzing them and presenting them to colleagues.

As far as the educational applications go, I've written an article which describes some of Molecules' potential there. When I add in other chemical databases as sources of molecular structures, I hope that this will be of use to even high school and college students taking chemistry courses. With the source code now available, this program is also a good educational example of how to build a 3-D application for the iPhone.

From the look of the screen shots they show, this is going to be one very useful and great iPhone/iPod Touch app!

I have a non official pet project delivering chemical name searches to iPhone via webservices. Some of these webservices deliver 3d Molfiles. There may also be webservice access to pdb type structures and if not we could make something. I'm really interested in hooking up to your viewer. It could be advantageous in both directions.

In case you might not have noticed, the source code to Molecules is available and under the BSD-license, so you're free to integrate it within your own application if you so desire. I will be cleaning up the codebase soon, now that Pi Cubed is finished and awaiting review, so that should also help with integration.

In addition, Molecules registers itself for the molecules:// URL scheme, so if the user has Molecules installed and you send the system a molecules://[PDB file location], it will open Molecules and download and render the file.

Wow molecules in my iPhone, I have dreamt about it for a very long time, but I thought it would never happen. You just can't imagine how thankful I am to you. And it is absolutely free. You have done a great job. Biology will not die because of such guys as you. Thanks one more time, I am going to try this app right now.


Rick Kitson from iphone application development

This was a neat little app when it came out. I spent alot of time just playing with it and even directed my friends to it. Just saying thanks :)

Syndicate content