Updated 2021-05-17
Run NAMD on the Cluster¶
Overview¶
- NAnoscale Molecular Dynamics is computer software for molecular dynamics simulation written using the Charm++ parallel programming model.
- This guide will cover how to run NAMD on the Cluster.
- For more information about NAMD, please visit the NAMD Tutorial Page.
Summary¶
- NAMD uses a Protein Data Bank (pdb) file, a Protein Structure File (psf), a force field parameter file, and a configuration file to set up a molecular dynamics simulation.
- This walkthrough will focus on running NAMD in an Interactive VNC Session so that generated output may be easily visualized with VMD.
[Update] NAMD compiled with mvapich2¶
- There is a newly compiled NAMD with mvapich2. To use it, you can do
module spider namd-compiled
to find it and follow the instructions to load it. For other NAMD versions, you can use the instructions in the walkthrough below: - If you want to run the
namd-compiled
version for submitting job on multiple nodes, you cannot use++nodelist
parameters like other versions. Instead, you just specify the number of cores by commands like the below examples:
charmrun namd +p40 Lipid01.conf
mpirun -np 80 -machinefile $PBS_NODEFILE namd2 LipidA-min-01.conf
Walkthrough: Run NAMD on the Cluster¶
- The example covered in this walkthrough will have the user examine the minimzation and equilibration of ubiquitin in a water sphere placed in a vaccuum. This example can be found in section 1.4 of the NAMD Tutorial.
Note
This example will take around 30 minutes to complete. You may want to forgo running the example and instead look at the conf and output files found in the example-output
directory if you are short on time.
- The relevant files can be found here
- You can transfer the files to your account on the cluster to follow along. The file transfer guide may be helpful.
Part 1: Set up Interactive (VNC) Session¶
- Follow steps to set up VNC
- Brief recap to connect to VNC:
ssh -Y gtusername3@login-s.pace.gatech.edu
module load qsubvnc/1.1
qsubturbovncserver -t 15:00 -m 8gb -q [YOUR_QUEUE] -n 1 -p 8 -d ~/tmp -l qsubvnclog
ls ~/.vnc | grep <JOBID>
- Replace [YOUR_QUEUE] with the name of the queue you want to submit to, such as
inferno
- 15:00 is the walltime, you can increase it if you need more time
- You will be prompted to input your VNC password. If you have forgotten the password, steps to reset it can be found in the VNC guide
- The code above uses a dir
~/tmp
to store files created by the vnc server. In order for the code to work, you must create a dir calledtmp
in your home dir, or specify where yourtmp
dir is in the code. More info on theqsubturvbovncserver
line is available in the VNC guide. - The file name will be of the form
<JOBID>.<SCHEDULER><COMPUTE-NODE>:<DISPLAY>
- Forward the port 5900 + display
ssh -L <PORT>:<COMPUTE-NODE>:<PORT> -N username@login-s.pace.gatech.edu
- Open your VNC client, and for the address, enter:
localhost:<DISPLAY>
Part 2: Run NAMD¶
- Open terminal in the VNC window by clicking top left
Applications
>System Tools
> scroll down toterminal
- All commands here on will be typed in terminal in VNC.
- You will need to load the NAMD module and all of its dependencies.
-
You can find which versions are available for any module with
module avail [software]
. -
Run the following commands to load the necessary modules:
module load gcc/4.9.0
module load mvapich2/2.1
module load fftw/3.3.4
namd/20160810_abudhabi
-
Navigate to the
1-2-sphere
directory found in thenamd_tutorial
directory you downloaded. This should be your working directory for the remainder of the tutorial. ubq_ws_eq.conf
contains the information necessary to run NAMD. You can open the file and find a line-by-line explanation in section 1.4 of the NAMD tutorial.- The following command will run NAMD using
ubq_ws_eq.conf
, export output toubq_ws_eq.log
, and generate other useful files:
charmrun +p2 namd2 ubq_ws_eq.conf > ubq_ws_eq.log &
Note
You may now see a warning and the terminal will appear to hang. Please note that as long as the terminal hangs, NAMD is running.
Part 3: Collecting Results¶
- You will find the generated output in the
1-2-sphere
directory where you ran NAMD. You can compare the generated files to the ones in theexample-output
directory to make sure that NAMD ran properly. - After the result files are produced, you can move the files off the cluster, refer to the file transfer guide for help.
- Congratulations! You successfully ran NAMD on the cluster.