NAMD Jobs under LSF


Basic Instructions

NAMD is a scalable molecular dynamics software developed and actively maintained by the Theoretical and Computational Biophysics Group in the Beckman Institute for Advanced Science and Technology at the University of Illinois at Urbana-Champaign (for documentation and tutorials: NAMD).
The version installed on the HPC (namd 2.9) makes use of the system openMPI libraries, and it is therefore well integrated with the resource manager MOAB/Torque. This means that the mpirun program invoked for executing the software gets the information about the number of processes directly from the scheduler.

NOTE: the program is available as a module, so you have first to load the module. Look at the modules page.

In the following we assume that you know how to build a working input file for NAMD, and let us assume that it is called MySystem.conf.
A simple script file for running your program is the following.

#!/bin/sh
# embedded options to bsub - start with #BSUB
### -- set the job Name --
#BSUB -JMyNamd
### –- specify queue -- 
#BSUB -q hpc 
### -- ask for number of cores (default: 1) -- 
#BSUB -n 8 
### -- set walltime limit: hh:mm -- 
#BSUB -W 10:00 
### -- specify that we need 2GB of memory per core/slot -- 
#BSUB -R "rusage[mem=2GB]"
### -- set the email address -- 
# please uncomment the following line and put in your e-mail address,
# if you want to receive e-mail notifications on a non-default address
##BSUB -u your_email_address
### -- send notification at start -- 
#BSUB -B 
### -- send notification at completion-- 
#BSUB -N 
### -- Specify the output and error file. %J is the job-id -- 
### -- -o and -e mean append, -oo and -eo mean overwrite -- 
#BSUB -o Output_%J.out 
#BSUB -e Error_%J.err 
# here follow the commands you want to execute 
# 
# load the necessary modules 
module load mpi/gcc-openmpi-1.6.5-lsfib
module load namd2

# -- program invocation here -- 
# namd2 +p$LSB_DJOB_NUMPROC MySystem.conf > MySystem.log

Call it as you like, for example MySystem.sh, put it in your working directory, and then

bsub < MySystem.sh

This line is important:

module load namd2/2.14_Linux-x86_64-multicore

It loads the module with the NAMD executable, that is called namd2, multithreaded version.

namd2 +p$LSB_DJOB_NUMPROC MySystem.conf > MySystem.log

This is the real program invocation.
The program namd2 in invoked to be run taking MySystem.conf as input, and saving the output messages to MySystem.log. All the other NAMD output files will be saved according to the specifications you put in the NAMD configuration file MySystem.conf.


Compatibility with older syntax

On some machines where network connectivity based on normal ethernet networking, NAMD uses the Charm++ communications layer and the program charmrun to launch namd2.
For backward compatibility, the charmrun program is also available in the mpi version, but in this case it is just a script to convert the charmrun in a correct mpirun call.
However, it requires the explicit specification of the number of processes, that overrides the scheduler. If launched without processes number, it defaults to 1.

So, the only correct way to use it is to invoke the program as

charmrun namd2 +p$LSB_DJOB_NUMPROC MySystem.conf > MySystem.log