Enter your e-mail address.
Enter the password that accompanies your e-mail.

Building NAMD

NAMD is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems. Based on Charm++ parallel objects, NAMD scales to hundreds of processors on high-end parallel platforms and tens of processors on commodity clusters using gigabit ethernet. NAMD is file-compatible with AMBER, Charm, and X-PLOR and is distributed free of charge with source code.
Steps to building
To build NAMD, you will need the source for NAMD, along with the Charm++ software and the FFTW software. The steps for configuring and building each of these codes, and any known limitations, are described in the sections below.
Downloading NAMD
NAMD development is supported by the NIH National Center for Research Resources. The Theoretical and Computational Biophysics Group at the University of Illinois announced the release of the 2.5 version of NAMD on Sept. 29, 2003. NAMD is available from the NAMD website.

You will need three different pieces of software to run NAMD.
Building FFTW
First build the FFTW code (version 2.1.5). You will need to use version 2.1.5 of FFTW, not version 3.0.1. In FFTW 3.0.1 the API (Application Program Interface) changed. To configure, build, and install FFTW, do the following:
cd fftw-2.1.5                                        
export CC=pathcc F77=pathf90 CFLAGS=-O3 FFLAGS=-O3   
./configure --enable-float --enable-type-prefix --enable-static \
--prefix=$HOME/fftw   
make                                                
make install                                        
Building Charm++
First you have to configure Charm++ to be able to generate an mpi-pathscale target. Copy the files conv-mach.sh and conv-mach.h into a newly created directory in charm-5.8:
cd ../charm-5.8                                                 
mkdir src/arch/mpi-pathscale                                    
cp ~/conv-mach.sh src/arch/mpi-pathscale                        
cp ~/conv-mach.h src/arch/mpi-pathscale                         
Note: In the file conv-mach.sh, you should change "-L/opt/pathscale/lib/2.4" to the installation directory for your compiler release.
./build charm++ mpi-pathscale -DCMK_OPTIMIZE=1                  
Building NAMD
Now build the NAMD code. Copy the file Linux-amd64-pathcc.arch file into the arch subdirectory and then build NAMD.

Note: Linux-amd64-pathcc.arch assumes that Charm++ was installed in $(HOME)/charm-5.8. If this is not the case, you need to modify CHARM_LOC in this file. The file Make.charm also needs to point to the directory where Charm++ is installed. There is also an implicit assumption in the file arch/Linux-amd64.fftw that assumes FFTW was built in $(HOME)/fftw. If this is not true, you need to modify that file as well.
cd ../NAMD_2.5_Source                                         
cp ~/Linux-amd64-pathcc.arch arch                             
./config fftw Linux-amd64-pathcc                              
cd Linux-amd64-pathcc                                         
make                                                          
This process builds and installs NAMD.
Known limitations
There is a bug in pathcc such that if the serial C code in Charm++ is compiled with -O2 or higher, it will result in a hang during execution. The workaround is to use -O1 for CMK_SEQ_CC. This workaround is incorporated in the distributed conv-mach.sh, and seems to have no performance impact.

We recommend you record what steps you took, along with their output, in case of problems. You can include this in your email to support. Here is an example of changing a make command to record the output in a text file:
make foo 2>&1 | tee make-foo-log.txt
If you have any comments or suggestions about additions to these pages, please contact support@pathscale.com.
Live help