Showing posts with label Visualization. Show all posts
Showing posts with label Visualization. Show all posts

Saturday, October 10, 2009

VMD 1.8.7 CUDA on Macbook Pro's Geforce 9400M and Snow Leopard

For some reason, VMD 1.8.7 didn't pick up my 9400M video card.

With this message: No CUDA accelerator devices available.
I am not sure if it's something to do with Mac OS X 10.6 or else. I decided to take a look at CUDA's download page and got a hint that old run time library in VMD 1.8.7 might not work with 9400M+Mac OS 10.6. I started to install CUDA Driver and Toolkit but left the SDK alone. I happen to remember there were something CUDA in VMD's content, for example:
/Applications/VMD\ 1.8.7.app/Contents/vmd
So what I did was to remove the CUDA library files that came with VMD 1.8.7 and made symbolic links to the new runtimes I just installed.
$ cd /Applications/VMD\ 1.8.7.app/Contents/vmd
$ rm libcuda.dylib libcudart.dylib libtlshook.dylib
$ ln -s /usr/local/cuda/lib/libcuda.dylib
$ ln -s /usr/local/cuda/lib/libcudart.dylib
$ ln -s /usr/local/cuda/lib/libtlshook.dylib
VMD CUDA
Yay...

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