Running NAMD

Running NAMD on ARCHIE-WeSt


This is a simple example of NAMD which should run on ARCHIE-WeSt and take 12 minutes. The input files and job script are downloadable below.

1. Load the appropriate environment modules


To run NAMD load the appropriate modules:

 module load mpi/gcc/openmpi/1.4.5
 module load libs/gcc/fftw2/float-mpi/2.1.5
 module load apps/gcc/namd/mpi/2.8


2. Prepare input files


The following files are required to be present in the working directory (input files):

    • par_all.inp
    • protein_SC.pdb and protein_SC.psf
    • protein_D1.coor, protein_D1.vel, protein_D1.xsc
    • protein_D2.inp(the input file for the calculations)
    • job script

These can be downloaded as a tar file from here.

The sample input file (protein_D2.inp):

structure       protein_SC.psf
coordinates     protein_SC.pdb
bincoordinates  protein_D1.coor
paratypecharmm  on
parameters      par_all.inp
exclude         scaled1-4
1-4scaling      1.0
switching       on
switchdist      8
cutoff          12
pairlistdist    14
margin          0
stepspercycle   20
wrapWater       on
rigidBonds      water
timestep 2.0
outputenergies  100
outputtiming    100
binaryoutput    yes
outputname      protein_D2
dcdfreq         2000
restartfreq     100000
restartname     rest_protein_D2
binvelocities   protein_D1.vel
PME                 yes
fullElectFrequency  2
PMEGridsizex        87
PMEGridsizey        93
PMEGridsizez        100
langevin            on
langevinDamping     5
langevinTemp        300
langevinHydrogen    no
extendedSystem  protein_D1.xsc
run 50000

The job script ( will use 10 nodes (120 cores):

# ************* SGE qsub options ****************
#Export env variables and keep current working directory
#$ -V -cwd
#Specify the project ID
#$ -P project.prj
#Select parallel environment and number of parallel queue slots (nodes)
#$ -pe mpi-verbose 10
#$ -j y
#Specify output file
#$ -o out.$JOB_ID
#Request resource reservation (reserve slots on each scheduler run until
enough have been gathered to run the job
#$ -R y
#Request exclusivity of each node
#Indicate runtime
#$ -l h_rt=12:00:00
# ************** END SGE qsub options ************
export OMPI_MCA_btl=openib,self
# Execute NAMD2 with configuration script with output to log file
charmrun +p$NCORES -v namd2 protein_D2.inp > protein_D2.out
#to launch jobs one after the other:
charmrun +p$NCORES -v namd2 protein_D3.inp > protein_D3.out
charmrun +p$NCORES -v namd2 protein_D4.inp > protein_D4.out

3. Job submission


To submit the job, type:


As a result, the following files will be produced (output files):

  • protein_D2.coor, protein_D2.vel, protein_D2.xsc, protein_D2.dcd
  • protein_D2.out
  • out.$jobID$

The output files can be downloaded as a tar file from here for comparison.