Molecules 1.3.2 now on the App Store

Molecules icon

After a long hiatus, I've finally updated Molecules. Version 1.3.2 is an update focused on performance, with few new features (much like a certain OS version). Rendering speed has been nearly doubled, larger structures can be displayed due to memory optimizations, and a faster search interface is used when communicating with the Protein Data Bank. As usual, the source code for this version is available.

First, I'd like to apologize for letting this application stagnate as long as it did. I've been occupied with other things over the last few months and haven't been able to dedicate as much time to this as I would have liked. I know people were starting to question whether this was an abandoned project or not. Trust me, I still have a lot I want to implement before I'm happy with the product.

Performance improvements

The major purpose of this update is to improve the overall performance of the application. I've made some significant improvements to the OpenGL ES rendering of the molecular structures, leading to a near doubling of the number of triangles per second that Molecules draws. This means that smaller molecules now respond to touch much more smoothly and larger structures become less maddening to work with.

I'll detail the specifics of the OpenGL ES optimizations that I used in a later post.

In addition to rendering enhancements, I've implemented a new database searching interface that the Protein Data Bank added at the beginning of the year. This interface dramatically cuts down on the amount of data sent back and forth between the iPhone and the PDB website, so it is much faster. The results are also ordered by relevance to the keywords used, so you'll see better results at the top of the list. Finally, I've added the ability for you to pull down as many results as you want, in groupings of 25.

Interface refinements

You might notice that Molecules now requires iPhone OS 3.0. I've gone this way with my other products because of the significant advantages that this version of the OS provides.

One of those advantages is the nice new default table cell styles that Apple provides. I've used these cells to clean up a little bit of the interface of the application.

You'll also notice something new about the main display. I've added a neat little autorotation feature that you can toggle on and off by tapping the icon in the lower left of the screen. By default, molecules autorotate when they are first loaded, but the rotation stops if you interact with them in any way. I think it's a fun little feature.

Code cleanup

Ever since I first made the code for Molecules available, I've been embarrassed by how messy it is. Now that it's been downloaded thousands of times, I feel even worse about it.

I've started cleaning up the code used for the application, so hopefully it will be much clearer for those looking to learn something from it. In particular, I've refactored the SLSMoleculeGLView and SLSMoleculeGLViewController classes to be more Model-View-Controller compliant. There's still a lot more that I need to do, though.

Again, I want to apologize for the delay in updating this application. I'll try to get the next update out in a more reasonable timeframe.

Comments

Hi,

I just loaded the update and I did notice the improvements, like the rotation in the new version, very smooth. I've noticed several others have suggested a ribbon feature, which I agree would be very useful, but I would be almost as satisfied to see just the amino acid backbone. I'm no programmer, but perhaps that is a simpler modification to implement?

Best regards,
Paul Hager

Do you mean just showing the connected alpha carbons, colored by residue? That's something I've looked at as a first step toward the ribbon visualization, which is quite a bit more difficult to implement. I'll see if I can sneak that in for the next update.

The view of just the bonds is color-coded according to the residue type, so that's a step towards what you want. This can be accessed by double-tapping on the molecule and selecting the "cylinders" visualization mode.

The HUGE missed opportunity with Molecules was/is that it does not come with any simple molecules that can be easily grasped by children. This would be a fantastic app for helping kids see and get interested in molecules starting with the basic simple ones. Instead, it provides built-in molecules of overwhelming complexity that would turn all but the most incredibly geeky kids off. It's a real pity.

I originally wrote this application as a proof-of-principle, with the goal of being able to download and visualize biomolecules from the RCSB Protein Data Bank. The 3-D structure of those molecules is key to their functioning, and it is difficult to represent that structure in static 2-D images. I had no idea that it would be as widely downloaded as it has been, and I did not anticipate the things that people would want to do with it.

Downloading and displaying small molecules, like those commonly found in entry-level chemistry and organic chemistry classes, has been on my to-do list for a while. However, as you can see I haven't had much time to update the application. Given that the source code is available for download, I welcome any code contributions that would help in adding this capability.

Again, the primary focus of this application had not been educational at the start, and has only evolved to fill that function for biochemistry courses.

I strongly agree with the need for simple molecules. Maybe some educator can just upload a set to the protein data bank?

Dear Brad,

I am a professor in pharmaceutical biotechnolgy. I just bought an iphone. Love this app. I use this in my research meetings with grad students. My request for a new features is residue coloring in space filling displays according to polarity of residues, ie red for acidic, blue for basic, green for hydrophobic and white for hydrophilic (nonionic). I don't know how complicated this feature is. Thanks for your time and service to scientific community.

Thanks for the suggestions. I'll try to work them in, but as you can see I haven't had much time lately to work on this application.

Hej from Sweden.., I also just bought an iphone. I never dreamt of finding some application like this one. I like your spacefilling presentation, and i read on this side that you also plan to implement Ribbon presentation, great!
If you really find time to do more on this:
-you could include the possibility to see certain regions of a pdb, like one can do in VMD viewer. For example, 10Å within Fe or Glu143, or something like that... Of course then one should be able to see whats in the pdb to choose from.
-saving these cutouts and also being able to take snapshots (they would make great background pictures, or fit on flash cards)
-being able to control the color code a little bit (elements and residues)

Regarding your plans to include the possibility to view smaller molecules and other file formats, I would be happy if one could visualize xyz-files (perhaps able to read output formats from Jaguar , Gaussian and perhaps Turbomole).

My dream would be, to use iSSH to look at calculations and move some results to Dropbox. Then using your program to access these .xyz or .log files there and look at them. But maybe thats too much wish for.

Anyway, in my opinion your two programs, Pi3 and molecule, are the best apps on the phone, and i will not stop recommending them to my colleagues.

Thank you!

Thanks for the suggestions. XYZ files are on the list of file formats that I'm planning to add support for, but unfortunately I haven't had the time to get to that yet.

I'm not so sure about some of the more advanced visualization options. It has been my intention to keep the interface simple, so that anyone could pick it up and work with it. Additionally, we're limited in terms of interface space on the iPhone, so it doesn't take much to clutter up the display and make an application nearly unusable. I'll take a look at them, though.

I appreciate the kind words about my applications.

Hi, I am a protein crystallographer at a research institute in Germany. Colleagues told me about your great software a few days ago. We solved several crystal structures, and I am trying to display on my iphone with molecules. I downloaded the app yesterday, and it works fine for the few example structures that come with it, but I have consistently failed to download any other stuctures.

I type in the 4 digit pdb code. It goes into search for a few seconds, then appears in the list. The 'read more about this molecule' button returns 'no results were found matching your query'. The download button returns 'could not find file, no protein with the code exists in the data bank'. Yet I know it does, because we deposited it ourselves, and I checked several times that there were no spelling mistakes. Also, my iphone connects to the pdb without problem outside molecules, and then finds the pdb code of the molecule I am looking for.

Am I doing anything wrong?

It looks like the PDB has changed the way it reports results if you search for a four-character code. If you use that as a search term, instead of returning the structure information, it sends the web page of at the PDB for the structure. Molecules doesn't parse this properly, so it doesn't know where to load the structure from. I'll see if I can adjust the client to work around this change in behavior. It also looks like searches using more than one keyword now fail, as well. I'll fix that.

In the meantime, you can manually load a structure with a known PDB code into Molecules by sending yourself an email with a custom URL like

<molecules://www.rcsb.org/pdb/files/1BNA.pdb.gz>

where you replace 1BNA with your own code. If you click on that link in the iPhone email client, it should start up Molecules and download the structure directly from that location. You can also go to Molecules, tap on "Download new molecules" and "Custom Location", then copy and paste a URL like the above (without the brackets) in the text field and tap "Go". This should also download the structure from the correct location at the PDB. You can also use this technique for any custom PDB files that you've placed on a web server somewhere.

Syndicate content