Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- Go to the installation directory.
cd /path/to/NAMD
- Create and go to the main program installation directory.
mkdir NAMD-2.13 cd NAMD-2.13
- Create a build directory.
mkdir build install
- Perform the configuration.
export BUILD_DIR=/path/to/NAMD/NAMD-2.13/build export INSTALL_DIR=/path/to/NAMD/NAMD-2.13/install
- Set the environment variables of the compiler. If the setting fails, use the absolute path.
export CC=mpicc export CXX=mpicxx export FC=mpif90
- Go to the build directory.
cd /path/to/NAMD/NAMD-2.13/build
- Upload the Charm package to the build directory.
- Install Charm.
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 - Go to the build directory.
cd /path/to/NAMD/NAMD-2.13/build
- Decompress the NAMD installation package.
tar -zxvf NAMD_2.13_Source.tar.gz
- Go to the directory generated after the decompression.
cd NAMD_2.13_Source
- Rename Linux-ARM64.fftw3.
cp arch/Linux-x86_64.fftw3 arch/Linux-ARM64.fftw3
- Go to the NAMD-2.13 directory.
cd /path/to/NAMD/NAMD-2.13
- Use an SFTP tool to upload the tcl package to the current directory.
- Decompress the tcl file.
tar -xzvf tcl8.5.9-linux-arm64-threaded.tar.gz
- Modify the Make.charm file.
- Open the Make.charm file.
cd /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source vi Make.charm
- Press i to enter the edit mode and modify the file as follows:
CHARMBASE = /path/to/NAMD/NAMD-2.13/install/charm690
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the Make.charm file.
- Modify the Linux-ARM64-g++.arch file.
- Open the Linux-ARM64-g++.arch file.
cd /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source vi arch/Linux-ARM64-g++.arch
- Press i to enter the edit 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 -mcpu=cortex-a9 -mtune=cortex-a9 FLOATOPTS = -O2 -ffast-math -funsafe-math-optimizations -fomit-frame-pointer CXX = clang++ CXXOPTS = $(FLOATOPTS) CXXNOALIASOPTS = $(FLOATOPTS) -fno-strict-aliasing CC = clang COPTS = $(FLOATOPTS) - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the Linux-ARM64-g++.arch file.
- 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
- Go to the Linux-ARM64-g++ directory.
cd Linux-ARM64-g++
- Compile and install NAMD.
make
- Check whether an executable file is generated.
ls /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source/Linux-ARM64-g++/namd2
If the namd2 file exists, the compilation is successful.

Parent topic: NAMD 2.13 Porting Guide (openEuler 21.03)