VMD is designed to be portable to diverse operating systems, and to allow a person to individually include or exclude different optional features or modules. To make this possible, the configure script creates a Makefile in the src directory, using the selected architecture and any optional features that are enabled. This newly generated Makefile is then used to compile a VMD executable from the source code.
The configure script is found at the top level of the VMD working directory. This script has three purposes:
The configure script accepts options by command line or by reading a file named 'configure.options' in the top level directory. The main attributes required by the configure script are the target platform, graphics library, and any optional features which are to be enabled.
A typical example of this would be to compile VMD for Solaris with the following command line:
The configuration can be set in two ways:
./configure SOLARIS2 OPENGL FLTK TK IMD VRPN SILENT LIBBALL TCL PTHREADS ACTC LIBTACHYON FREEVR PYTHON NUMPY
This will save the options to the file ./configure.options
so the next time you want to regenerate the Makefiles, you need but do
./configure
./configure.options
yourself. You may wish to keep your settings in several configure.options files, or as new target platformms in the top level VMD Makefile if you intend to compile VMD on multiple platforms. This is a convenience which can save time when you want to recompile VMD more than once.
After you've set the options in the file, run ./configure
to propagate the new definitions to the Makefiles! The full list of compile-time options set by the configure script are:
Option: Tested with: AIX5 -- IBM AIX 5.x (32-bit) AIX5_64 -- IBM AIX 5.x (64-bit) HPUX11 -- HPUX 11.0 IRIX6 -- SGI IRIX 6.5.4 IRIX6_64 -- SGI IRIX 6.5.4 (64-bit) LINUX -- Linux LINUXALPHA -- Linux Alpha LINUXAMD64 -- Linux on AMD Athlon64/Opteron (64-bit) LINUXIA64 -- Linux on Intel Itanium (64-bit) LINUXPPC -- Linux PowerPC MACOSX -- MacOS X PowerPC MACOSXX86 -- MacOS X Intel x86 SOLARIS2 -- Solaris Sparc SOLARIS2_64 -- Solaris Sparc (64-bit) SOLARISX86 -- Solaris x86 TRU64 -- Tru64 Unix 4.0 (64-bit) WIN32 -- Windows
Option: GPU Acceleration Support: CUDA -- Enable NVIDIA CUDA GPU acceleration support
Option: Graphics Support: OPENGL -- OpenGL graphics library (overall best choice) MESA -- Free, Portable, Open Source, OpenGL workalike
OPENGL - VMD compiles with native OpenGL for DEC, HP, IBM, Sun, and SGI. OpenGL offers the best rendering performance on new systems, and is best supported graphics option for VMD at this time. Contact your vendor or support service to get OpenGL for your system.
MESA - Mesa is a free OpenGL compatible library which can be used on systems which have no native OpenGL implementation. Mesa normally performs all of its rendering in software, and may run significantly slower than a native OpenGL implementation. On systems using XFree86 4.0 or later, the new DRI interface can provide hardware-accelerated Mesa, which will speed up VMD significantly. With few exceptions, a native OpenGL implementation will provide the best rendering performance. We have compiled VMD with MESA 3.1 on all of the tested OSs. The Mesa library is available for free via ftp from ftp.mesa3d.org
in the mesa
directory. Mesa is also mirrored on sunsite in the directory pub/packages/development/graphics/mesa
. See the web address
http://www.mesa3d.org/
for more information, and the README
in ./lib/Mesa
for information about how to get Mesa working with VMD.
http://www.vrco.com/
. To compile in the CAVE you will need to get the appropriate CAVE library. VMD now only supports OpenGL, so you need to use libcave_ogl.a
.
To get the CAVE library, please contact VRCO Inc. The VRCO page is at http://www.vrco.com/
. We cannot distribute the CAVE libraries themselves, but the standard SGI binary versions are compiled with the CAVE library. To use the CAVE, start VMD with the run-time option -dispdev caveforms
.
The configuration options are:
Option: Graphics Support: CAVE -- include run-time support for CAVE display (OpenGL).
Option: GUI Support: FLTK -- the standard FLTK GUI TK -- Support for user-written GUI elements in scripts etc.
You should compile with FLTK, in which case you need to get the source or binaries from http://www.fltk.org/
.
VMD was compiled against Tcl/Tk version 8.4.1. You must have the 8.0 or better versions of both packages. The latest versions can be found at:
Tcl/Tk 8.4.1 is at http://www.tcl.tk/
Because Tcl and Tk are very useful tools, we make the assumption that these will be installed on your system. To configure VMD to use the appropriate Tcl/Tk directory, you may have to edit ./configure
and change a few variables. The current settings look in /usr/local/[include,lib]
unless the corresponding environment variable is set. The variables are:
From the configure script:
################ Tcl / Tk # location of TCL library and include file. # If left blank, standard system directories will be searched. $stock_tcl_include_dir=$ENV{"TCL_INCLUDE_DIR"} || "/usr/local/include"; $stock_tcl_library_dir=$ENV{"TCL_LIBRARY_DIR"} || "/usr/local/lib"; # location of Tk (for TK option) $stock_tk_include_dir=$ENV{"TK_INCLUDE_DIR"} || "/usr/local/include"; $stock_tk_library_dir=$ENV{"TK_LIBRARY_DIR"} || "/usr/local/lib";
Either change the default values or override them with the environment variables.
SURF -- add the external call to SURF (uses DrawMolItemSurf.{Ch} and adds the option to the graphics pop-up list)
There is no reason not to compile SURF. It is actually distributed (with permission) as part of the VMD distribution. To compile surf, go to ./lib/surf
and follow the instructions in README.VMD
(the README
file if from surf itself). The end result will be a program named surf_$ARCH
in that directory. Leave it there.
For the main SURF distribution, see
ftp://ftp.cs.unc.edu/pub/projects/GRIP/SURF/surf.tar.Z
VRPN -- Use the VRPN library to support local and remote trackers and other input devices.
For more information about VRPN see
http://www.cs.unc.edu/Research/vrpn
IMD -- use IMD for doing remote simulations
LP64This option compiles VMD as a 64-bit application program, allowing it to address large amounts of virtual and physical memory, and to access large files.
PTHREADSThis option builds VMD with support for POSIX threads. Threads are used within VMD to accelerate IMD and for linkage against multithreaded libraries such as Tachyon.
SILENT or NOSILENTThe default is SILENT, in which case you don't see the details of the compilation as it suppresses the make command echo. All this does is add or not add the line ".SILENT" near the top of the produced Makefile.