All About NAMD Source Code

  • Released Versions (choice of the wise)
  • Browse Online (updated nightly using doxygen)
  • Bleeding-Edge (extracted from Git every night)

  • Git Access (may require Charm++ from nightly build source code)

  • Using Git With Downloaded Source Trees

    Nightly build source code from 2017-05-27 and later includes a .git directory with the full repository, enabling pulls from the main repository above. Suggestions for using old CVS-based source trees with Git are welcome.

  • Using CVS With Pre-Git Downloaded Source Trees
    If you have made modifications to release or nightly build source code from 2013-09-27 through 2017-05-26 there should be directories named "CVS" throughout the source tree. The file Root in these CVS directories should contain ":pserver:nobody@cvs.ks.uiuc.edu:/namd/cvsroot". To use CVS in such a source tree, first download and untar namdcvsroot.tar.gz, then either alias the cvs command to "cvs -d /path/to/cvsroot" or use the following command to modify the CVS/Root files (replace "NAMD_..._Source" and "/path/to/namdcvsroot"):
    find NAMD_..._Source -name Root | xargs sed -i 's,.*cvsroot$,/path/to/namdcvsroot,'
    You can then use "cvs diff > patch.txt" to generate a patch file containing your changes, which you can then apply to a Git repository via the patch command.

Other Stuff You'll Need

  • Charm++ is included in all NAMD source code distributions.
  • C and C++ compilers (the Intel compiler has better performance than gcc).
  • Git to download bleeding-edge NAMD and track your changes.
  • TCL and FFTW libraries
    • TCL to enable scripting features
    • FFTW to enable particle mesh Ewald (PME)
      • FFTW version 3.x is supported, just add --with-fftw3 to the NAMD config command line
      • FFTW must be single-precision, i.e., built with "--enable-type-prefix --enable-float"
    • Ensure compatibility by using our precompiled libraries. Note that Red Hat 9 broke compatibility with earlier libraries, so use the linux-redhat7 versions if you get link errors on an ancient system.
  • Cygwin if you're building on Windows.
  • VMD plugins to enable trajectory analysis are now included and built with the NAMD source code.

Building Charm++ and NAMD

Find the section "Compiling NAMD" in notes.txt in your source distribution for detailed instructions, including the correct version of Charm++ (and this is not CHARMM) to use. NAMD 2.5b2 and later include the appropriate Charm++ source code as charm.tar, so the following warning will never be needed again.

For NAMD 2.5b1 and earlier, please note that the directory structure of the current charm development tree is incompatible with versions prior to 2002-04-04. To get buildable versions you will need to download the module charm-5.4 rather than charm as stated in the release notes.

There is lots of good platform-specific building and porting information on NamdWiki.