Sunday, October 04, 2009

Using mddisplay with AMBER under Mac OS X

Mddisplay is a neat tool by Chris Moth for molecular dynamics trajectory analysis. You can display the trajectory with an OpenGL window.

... a really nice program. I find the hardware stereo option very helpful, and the ptraj-like syntax very convenient... -- Dr. Meroueh
...a nice OpenGL based MD-viewer... -- Dr. Dawson

It's not difficult to build the program from the source on Mac OS X, I have tested it on Mac OS X 10.4, 10.5 and 10.6. However, I have submitted a ticket to create a new Macports port so it would be even easier to organize the software. (Check the website to know how to work with macports.)

If my porting setting got committed into Macports (Update: it got checked in to Macports collection), you should be able to install mddisplay under command line interface like this:
sudo port install mddisplay
Screen shot 2009-10-02 at 1.32.16 AM
Two programs would be installed, "preproc" and "mddisplay".

PLEASE BE SURE TO CHECK THE MANUAL!!


In order to display simulation frames in a time evolving way (movie), you can try to load AMBER topology and trajectories and convert it into mddisplay's movie data:
preproc -p 1enh.top -c 1enh.trj -n movie -f 100 (This generates three files: movie.cor, movie.bnd and movie.attr.)
Tips:
  1. for trajectory with more than 100 frames, you might need to specify how many frame you need by "-f 888" if you need to load 888 frames.
  2. use "-f 888%8" if you want to load 111 frame for every 8 frames of this 888 frame trajectory
  3. multiple "-c" arguments are possible.
  4. and .. you can use the name other than movie, it's okay.
Screen shot 2009-10-02 at 2.32.05 AM

To display the movie data, just do:
mddisplay -n movie and answer the questions. Here I used "b" for automatic coloring and ":" to assign every atom with this coloring style. I also used return key to tell mddisplay that's all my coloring style. Also the time frame and starting time were specified as default.
Screen shot 2009-10-02 at 1.55.43 AM

This will create a OpenGL window for you to control. Type "?" or click the help box for the controlling setting. You can blackout the side-chain atoms, filtering out the high frequency motions, or displaying averaged structure. Please refer to the manual.
Screen shot 2009-10-02 at 2.14.53 AM

The help window looks like this:
Screen shot 2009-10-02 at 2.22.34 AM