Preliminary Guide to VMD and NAMD

Introduction

These instructions here are to help to install some interesting demos for Beowulf for demo of bio-life-sciences applications.. or something close to it. hopefully this would be useful to someone who wants to show some molecular stuff and don’t know what to show…. Get the required software at their respective homepages.

Instructions for VMD and NAMD on Biowolf

NAMD perform guide.

Software list:

  1. Namd source files: NAMD_2.5b1_Source.tar.gz
  2. Charm source file: charm-5.4-2.tar.gz
  3. FFTw source file: fftw-2.1.3.tar.gz
  4. Tcltk source file: tcltk-8.3.3-65.src.rpm (or use the libtcl.a i am sending u)
  5. VMD binary file for Linux: vmd-1.7.1.bin.LINUX.mesa.tar.gz

You will also need an X windows system with Mesa lib support. Also please use gcc.2.95.3 to compile the packages. The gcc shipped with rh72 doesn’t compile the src correctly and aborts. Installation of gcc is covered here:. Make sure u have the right gcc int he $PATH. (I also softlink /usr/bin/gcc,/usr/bin/g++ and /usr/bin/cc to the gcc bins from 2.95.3

Installation of VMD

VMD is designed for the visualization and analysis of biological systems such as proteins, nucleic acids, lipid bilayer assemblies, etc. It may be used to view more general molecules, as VMD can read standard Protein Data Bank (PDB) files and display the contained structure.

To install VMD, just untar vmd-1.7.1.bin.LINUX.mesa.tar.gz under /usr/local/. Add /usr/local/\vmd-1.7.1 to the $PATH for both root and other users. To check the bin, startup Xwindows .. and then execute the command ‘vmd’ from an xterm window. Refer to the user guide for a quick intro to viewing some cool molecular structures.

Installation of FFTw (required by charm/Namd)

mkdir /usr/local/fftw/
tar xvzf fftw-2.1.3.tar.gz -C /usr/local/src/.
cd /usr/local/src/fftw-2.1.3/
./configure --prefix=/usr/local/fftw
make
make install

This will install the fftw libs under /usr/local/fftw/lib/

Installation of Charm (required by Namd)

Before installing charm, make sure u have mpicc in ur path and that mpicc -v (shows a version msg from gcc 2.95.3). U will regret if u use 2.96.3 Also make sure mpirun and other stuff is setup properly ..

tar  xvzf  charm-5.4-2.tar.gz -C /usr/local/
cd /usr/local/charm
./build charm++ mpi-linux

This should create the charm libs and a few binaries. Add /usr/local/charm/bin to ur $PATH

Install libtcl.a

Namd requires tcl support. RedHat? 7.2 unfortunately doesn’t ship a devel lib for tcl. Use the src rpms to create a static libtcl8.3.a, or just cp the one attached to this mail to /usr/lib/libtcl.a

Namd Installation.

tar xvzf NAMD_2.5b1_Source.tar.gz -C /usr/local
cd /usr/local/NAMD_2.5b1_Source/
  • Edit the Make.charm file to relect the charm libs path (/usr/local/charm)
  • Edit arch/Linux-i686.tcl to reflect the tcl lib path (/usr/). make sure -ltcl8.3 is chaned to -ltcl
  • Edit arch/Linux-i686.fftw to reflect the fftw path (/usr/local/fftw)
./config tcl fftw Linux-i686-MPI
cd Linux-i686-MPI
make

Hopefully this will create the namd2 and psfgen binary .. Add /usr/local/NAMD_2.5b1_Source/Linux-i686-MPI/ to ur $PATH.

Demo and tests

To demo, check out this site:

http://biowulf.nih.gov/namd.html

Read the VMD userguide on how to connect namd to VMD for autoupdate!

Installing VMD on Opterons

  1. Download the VMD source
  2. Untar the source
  3. Look at where TC/TCL and FLTK is installed and set up the paths either in the “configure” file or export as environment variables they are
    • TK_INCLUDE_DIR
    • TK_LIBRARY_DIR
    • TCL_INCLUDE_DIR
    • TCL_LIBRARY_DIR
    • FLTK_INCLUDE_DIR
    • FLTK_LIBRARY_DIR
  4. Go into the plugins directory
  5. Export the location of the plugins that you want to install to using PLUGINDIR
  6. In the plugin directory, do a “gmake ”
    • where ARCH = LINUXAMD64
    • Note that you can also define other architectures here if you ar ecompiling for other kinds of machines.
  7. Once compiled and “make install”, go to PLUGINDIR and check if the files are there.
  8. Go into the VMD source directory
  9. Create a link called plugins to the PLUGINDIR
    • i.e. ln -s $PLUGINDIR .
  10. Edit the configure file and change the install directories to what you require and then do “./configure”
  11. Look at the “configure.options” file. i just made sure that TK TCL OPENGL FLTK LINUXAMD64 are in there
  12. Do a “make linux.amd64.opengl” or just “make” to see the available options
  13. Go into the src directory
  14. Edit the Makefile, check for LIBDIR and ensure that your lib64 locations are included
  15. “make very clean”
  16. “make”
    • Note: if there are errors about header files not found, then u might want to edit the Makefile to include the related header files. Mainly, i found that the header files missing where the TCL/TK stuff and the plugins directory
    • Note: if you fail at the linking stage, this means that the 64 bit libraries are not found.. you might want to check on the location of the 64bit libraries
  17. “make install”
  18. Check your VMD install directory and make sure that the stuff are installed properly.

If you want to use the TCL interface, just execute the VMDINSTALLDIR/bin/vmd. if you just want the command line version, execute VMDINSTALLDIR/lib/vmd/vmd_LINUXAMD64

Installing NAMD on Mac OSX (Intel)

To be able to build NAMD on OSX Intel, one would need to obtain fftw and tcl libraries. This can be obtained from the NAMD website, or obtain on its own (by googling it) and installed. Specifically ,to build NAMD, the following steps where taken.

  1. Untar NAMD-2.6 into its own directory
  2. Obtain the latest build of CHARM++ and untar it into its own directory
  3. Build CHARM++
    ./build charm++ net-darwin-x86 -nobs tcp -memory paranoid
    • NOTE: CHARM++ does not yet support MPI on darwin. the only configuration available is net-darwin-x86. This does not stop one from trying to compile a MPI version. Several compilations has proven to be successful, but time was short on testing the stability of the binary.
  4. Go into the NAMD directory and edit Make.charm to point to the location of your CHARM++ directory
  5. edit arch/arch.fftw and arch/arch.tcl to point to the correct locations of the fftw and tcl libraries.
  6. Configure NAMD using
    ./config tcl fftw MacOSX-i686-TCP-g++
    • NOTE: It is again possible to compile NAMD to use MPI if the correct CHARM++ version is build. Some tweaking might be required to get the correct OSX MPI version compiled. Once again, compilation has been successful, but the stability of the binary is still untested.
  7. make and install NAMD into the required location.

In order to run NAMD with the CHARM++ based parrallization, the following sample command is used.

./charmrun +p4 ++nodelist ~/.nodelist ./namd2 abf-iso.conf

A simple nodelist file is of the following format.

group main ++shell /usr/bin/ssh
host node1
host node1
host node2
host node2
host node3
host node3
host node4
host node4