Run NAMD on the Cluster¶
- 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.
- 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-compiledto 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-compiledversion for submitting job on multiple nodes, you cannot use
++nodelistparameters 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.
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 email@example.com 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
- 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
~/tmpto store files created by the vnc server. In order for the code to work, you must create a dir called
tmpin your home dir, or specify where your
tmpdir is in the code. More info on the
qsubturvbovncserverline is available in the VNC guide.
- The file name will be of the form
- Forward the port 5900 + display
ssh -L <PORT>:<COMPUTE-NODE>:<PORT> -N firstname.lastname@example.org
- Open your VNC client, and for the address, enter:
Part 2: Run NAMD¶
- Open terminal in the VNC window by clicking top left
System Tools> scroll down to
- 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
Navigate to the
1-2-spheredirectory found in the
namd_tutorialdirectory you downloaded. This should be your working directory for the remainder of the tutorial.
ubq_ws_eq.confcontains 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 to
ubq_ws_eq.log, and generate other useful files:
charmrun +p2 namd2 ubq_ws_eq.conf > ubq_ws_eq.log &
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-spheredirectory where you ran NAMD. You can compare the generated files to the ones in the
example-outputdirectory 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.