Compiling VMD
VMD (Visual Molecular Dynamics) is a molecular visualization program for displaying, animating, and analyzing large biomolecular systems using 3-D graphics and built-in scripting.[1]
Locally-Installed Version
VMD 1.9.1 is installed on Proteus. You must be running an X11 server on your own computer for this to work: Linux should just work, Mac OS X will need XQuartz, Windows will need XMing or similar. It works best over a fast network.
Use the module file:
vmd/1.9.1
Read Documentation
Download
Download the source package -- vmd-1.9.1.tar.gz
tar xf vmd-1.9.1.src.tar.gz
This creates two directories:
vmd-1.9.1
plugins
The "plugins" must be compiled first, before the main VMD application.
Installation Location
Decide on an installation location. A good one would be:
/mnt/HA/groups/myrsrchGrp/opt/vmd/1.9.1
Set an environment variable for convenience:
[juser@proteusa01 ~]$ export PREFIX=/mnt/HA/groups/myrsrcfGrp/opt/vmd/1.9.1
So, set an environment variable:
[juser@proteusa01 ~]$ export PLUGINDIR=${PREFIX}/plugins
And create the directory if not already there:
[juser@proteusa01 ~]$ mkdir -p $PLUGINDIR
Remember the two directories created by expanding the tarfile? Go to the one named vmd-1.9.1 to set another environment variable for convenience:
[juser@proteusa01 ~]$ cd vmd-1.9.1
[juser@proteusa01 vmd-1.9.1]$
[juser@proteusa01 vmd-1.9.1]$ export SRCDIR=$(pwd)
Build Plugins
Documentation: http://www.ks.uiuc.edu/Research/vmd/plugins/doxygen/compiling.html
Prerequisite: NetCDF
[juser@proteusi01 ~]$ module load netcdf/gcc
[juser@proteusi01 ~]$ cd plugins
Set an environment variable:
[juser@proteusi01 ~]$ export NETCDFINC="-I${NETCDFINCLUDE}"
Unset an environment variable:
[juser@proteusi01 ~]$ unset NETCDFLIB
Edit the file "Make-arch
" -- line 369:
"NETCDFLDFLAGS = -L${NETCDFDIR} -lnetcdf " \
Build:
[juser@proteusi01 plugins]$ make LINUXAMD64 >& Make.linuxamd64.out &
Install -- N.B. This requires the PLUGINDIR
environment variable to be
set properly. (See above.)
[juser@proteusi01 plugins]$ make distrib >& Make.distrib.out &
Build VMD
[juser@proteusi01 plugins]$ cd ../vmd-1.9.1
Set environment variables:
[juser@proteusa01 vmd-1.9.1]$ export VMDINSTALLBINDIR=${PREFIX}/bin
[juser@proteusa01 vmd-1.9.1]$ export VMDINSTALLLIBRARYDIR=${PREFIX}/lib
Link the plugins directory:
[juser@proteusa01 vmd-1.9.1]$ ln -s $PLUGINDIR .
Configure:
[juser@proteusi01 vmd-1.9.1]$ ./configure LINUXAMD64 MESA FLTK TK IMD SILENT TCL PTHREADS ACTC LIBTACHYON NETCDF
[juser@proteusi01 vmd-1.9.1]$ cd src
ACTC (Mesh Triangulation)
Download ACTC:
http://plunk.org/~grantham/public/actc/
Put it in proper place:
[juser@proteusa01 ~]$ mv actc-1.1.tar.gz ${SRCDIR}/lib
Expand:
[juser@proteusa01 ~]$ cd $SRCDIR/lib ; tar xf actc-1.1
Edit Makefile:
[juser@proteusa01 lib]$ cd actc-1.1
### Add this
CC=gcc
### Modify this
LIBDEST = $(SRCDIR)/lib/actc/lib_LINUXAMD64
INCDEST = $(SRCDIR)/lib/actc/include
### And modify this
CFLAGS=-O3 -march=corei7-avx -mfpmath=sse
### And modify this (line 54):
cp tc.h $(INCDEST)
Build:
[juser@proteusa01 actc-1.1]$ make
Install:
[juser@proteusa01 actc-1.1]$ make install
Fixes
Edit the Makefile:
### line 5 -- comment it out
#.SILENT:
### line 17
GNUCOMPRESS=gzip
### line 443:
### replace "-I../lib/netcdf/include" with "-I$(NETCDFINCLUDE)"
### line 445:
### replace "-lMesaGL" by "-lGL", and "-lMesaGLU" by "-lGLU"
LIBS = -lGL -lGLU ...
### line 447:
### replace "-L../lib/netcdf/lib_LINUXAMD64" with "-L$(NETCDFDIR)"
Edit the file LibTachyonDisplayDevice.h
. Change one line (#28):
#include <tachyon/tachyon.h> // main Tachyon library header
Edit the file DispCmds.C
line 37:
#include "tc.h"
Compilation
Build:
[juser@proteusa01 src]$ make -j 12
This creates the executable named vmd_LINUXAMD64
in the directory
$(SRCDIR)/LINUXAMD64/
Install
Copy tcl scripts to the right place.
[juser@proteusa01 vmd-1.9.1]$ cd $PREFIX
[juser@proteusa01 1.9.1]$ mkdir scripts
[juser@proteusa01 1.9.1]$ cd $SRCDIR/scripts
[juser@proteusa01 scripts]$ cp -R vmd $PREFIX/scripts
Copy shaders to the right place:
[juser@proteusa01 scripts]$ cd ..
[juser@proteusa01 vmd-1.9.1]$ cp -R shaders $PREFIX
Copy executable to the right place:
[juser@proteusa01 vmd-1.9.1]$ mkdir $PREFIX/bin
[juser@proteusa01 vmd-1.9.1]$ cp LINUXAMD64/vmd_LINUXAMD64 $PREFIX/bin
Set your PATH:
[juser@proteusa01 vmd-1.9.1]$ export PATH=${PREFIX}/bin:${PATH}
References
[1] VMD website