NAMD


Level of support

Tier 2 NSC has only limited experience with this software, but we will try to help as much as possible. We have ran some tests, for example, if the program comes with a test suite, but they may be far from exhaustive. We will try to install and test new versions, as soon as we can.

Please see the page describing our software support categories for more information.
You can also contact support@nsc.liu.se for further information.

NAMD is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems.

Official homepage: www.ks.uiuc.edu/Research/namd/

The NAMD 2.9 user guide is available online at www.ks.uiuc.edu/Research/namd/2.9/ug/

Please contact NSC Support if you have any questions or problems.

How to run

Example batch script:

#!/bin/bash 

#SBATCH --time=10:00:00                #Requested walltime 
#SBATCH --nodes=2 --exclusive          #Number of compute nodes to allocate
#SBATCH --account=liu-2012-00060-20    #Account string for the project that you wish to account the job to

job=jobname
NAMD=/software/apps/namd/2.9/AVX/namd2 #No need to change this except for new installations
WRKDIR=$(pwd)

#Trap SIGTERM and copy the trajectory file (and other files) if the job hits the walltime limit 
trap 'if [ -f ${SNIC_TMP}/${job}.* ]; then cp ${SNIC_TMP}/${job}.* ${WRKDIR}/; else echo "No run files found"; fi; echo "SIGTERM was trapped"' SIGTERM

# The following makes all trajectories and such end up on
# /scratch/local/$SLURM_JOBID to improve performance. Replace
# "your_namd_control_file" for the proper name. It should be the file
# containing the "outputname" directive to namd.
sed "s:^[[:space:]]*outputname\>.*$:outputname ${SNIC_TMP}/${job}:" your_namd_control_file > tmp.control.file

#Run namd. mpprun is NSC specific and sets up the parallel cumputation.
mpprun ${NAMD} tmp.control.file > ${WRKDIR}/output_${SLURM_JOBID}.txt

# Copy the trajectories to your working directory when simulation finishes.
cp ${SNIC_TMP}/* ${WRKDIR}/ 

exit 0
#END OF SCRIPT

Note that you must edit the jobname, account string, walltime, number of requested nodes and the name of the namd job control file before submitting!