Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Installing NAMD

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following commands to create the NAMD-related directories:
    cd /path/to/NAMD
    mkdir NAMD-2.13
    cd NAMD-2.13
    mkdir build install
    export BUILD_DIR=`pwd`/build
    export INSTALL_DIR=`pwd`/install
  3. Run the following commands to set the environment variables.
    export CC=`which gcc`
    export CXX=`which g++`
    export FC=`which gfortran`
  4. Run the following commands to compile and install CHARM:
    cd /path/to/NAMD/NAMD-2.13/build
    tar -xvf charm-6.9.0.tar.gz
    cd charm-6.9.0
    mkdir ${INSTALL_DIR}/charm690/
    cp src/arch/mpi-linux-x86_64 src/arch/mpi-linux-arm8 -rf
    grep -rl 'm64' src/arch/mpi-linux-arm8 | xargs sed -i 's/\-m64//g'
    ./build charm++ mpi-linux-arm8 smp --with-production --destination=/path/to/NAMD/NAMD-2.13/install/charm690/mpi-linux-arm8
  5. Run the following commands to decompress the NAMD installation package:
    cd /path/to/NAMD/NAMD-2.13/build
    tar -zxvf NAMD_2.13_Source.tar.gz
    cd NAMD_2.13_Source
  6. Run the following command to create Linux-ARM64.fftw3:
    cp arch/Linux-x86_64.fftw3 arch/Linux-ARM64.fftw3
  7. Run the following commands to upload and decompress the TCL file:
    cd /path/to/NAMD/NAMD-2.13
    tar -xvf tcl8.5.9-linux-arm64-threaded.tar.gz
  8. Run the following commands to modify the Make.charm file:
    1. Open Make.charm.
      cd /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source
      vi Make.charm
    2. Press i to enter the insert mode and modify the file as follows:
      CHARMBASE = /path/to/NAMD/NAMD-2.13/install/charm690

      Change the value of CHARMBASE to the actual installation path of CHARM.

    3. Press Esc, enter :wq!, and press Enter to save the file and exit.
  9. Run the following commands to modify the Linux-ARM64-g++.arch file:
    1. Open Linux-ARM64-g++.arch.
      cd /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source
      vi arch/Linux-ARM64-g++.arch
    2. Press i to enter the insert mode and modify the file as follows:
      NAMD_ARCH = Linux-ARM64 
      CHARMARCH = mpi-linux-arm8 
       
      #FLOATOPTS = -O2 -ffast-math -funsafe-math-optimizations -fomit-frame-pointer -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 
      FLOATOPTS = -O3 -ffast-math -funsafe-math-optimizations -fomit-frame-pointer -march=armv8-a 
       
      CXX = g++ -std=c++11 
      CXXOPTS = $(FLOATOPTS) 
      CXXNOALIASOPTS = $(FLOATOPTS) -fno-strict-aliasing 
       
      CC = gcc 
      COPTS = $(FLOATOPTS)
    3. Press Esc, enter :wq!, and press Enter to save the file and exit.
  10. Run the following commands to configure NAMD:
    ./config Linux-ARM64-g++ --with-fftw3 --fftw-prefix /path/to/FFTW --with-tcl --tcl-prefix /path/to/NAMD/NAMD-2.13/tcl8.5.9-linux-arm64-threaded --charm-arch mpi-linux-arm8
    cd Linux-ARM64-g++
  11. Run the following commands to compile and install NAMD:
    make -j
  12. Run the following command to check whether an executable file is generated:
    ll /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source/Linux-ARM64-g++/namd2
    -rwxr-xr-x 1 root root 16140248 Aug  7 15:50 namd2