Compute Canada

NAMD2

Please note: The FAQ pages at the HPCVL website are continuously being revised. Some pages might pertain to an older configuration of the system. Please let us know if you encounter problems or inaccuracies, and we will correct the entries.

This is a quick introduction to the usage of the free but licensed code NAMD2 that is installed on the HPCVL clusters. It is meant as an initial pointer to more detailed information and a Getting Started primer. It does not replace study of the manual.

What is NAMD ?

NAMD is a parallel code for molecular dynamics simulation of large biomolecular systems, developed by the Theoretical Biophysics Group ("TBG") in the Beckman Institute of the University of Illinois . It is file-compatible with AMBER, CHARMM, and X-PLOR.

Where is the program located?

The binary executable is in /opt/namd on the HPCVL Clusters. The present version of the program is 2.7, and it is available in the default 32-bit version. Therefore, all the relevant executables are in /opt/namd/2.7/32bit. Documentation can be found in/opt/namd/2.7/doc and example input files are in /opt/namd/2.7/example.

How do I set up my environment for NAMD2?

The setup for NAMD is very simple. It is only necessary to put the directory with the executables, /opt/namd/2.7/32bit into the $PATH variable:

export PATH="/opt/namd/2.7/32bit:"$PATH (for bash)

This can also be done through the usepackage setup by simply typing:

use namd

How do I run NAMD2 interactively ?

NAMD requires a number of input files to run. These include:

  • A so-called "configuration file" that declares the initial configuration for a molecular dynamics run, the force field files, number of steps in the simulation, etc.
  • A coordinate file that gives the coordinates of the participating atoms or molecules.
  • A parameter file declaring bond-lengths, angles, dihedrals, non-bonded parameters etc.
  • A force-field file declaring parameters associated with atomic and molecular interactions.

Details about the supported format of these input files can be found in the NAMD User's Guide.

NAMD supports several running modes. In the simplest case, it can be run in serial mode by typing:

namd2 config_file

where config_file is the configuration input file mentioned above. It is recommended to give the configuration file the file extension .namd to enable consistent naming of the output files. These will be generated automatically, and the progress of the program run will be tracked on the screen.

NAMD is also able to run in parallel mode. For our shared-memory systems, it is easiest to run it by specifying the number of threads through the +p option:

namd2 +pN config_file

if N threads are requested.

How do I run NAMD2 production jobs ?

Only short test jobs of application software can be run interactively on HPCVL machines. Production jobs must be submitted via the scheduling software Grid Engine. For usage of this software, please consult our Grid Engine FAQ.

In most cases, you will be running NAMD production jobs in parallel mode. This means that you need to specify a number of CPUs that should be reserved to run each independent NAMD thread. This is done in a Grid Engine submission script.

The items in the template that are enclosed in mustr be replaced by the appropriate values. Lines that start with "#$" containn information for Grid Engine. The "#$ -V" line tells GE to inherit the shell setup from the calling shell, for instance the $PATH variable. "#$ -cwd" tells the system to start from the current working directory. "#$ -M" lets the system know you email address, so it can notify you when the job starts and ends. The "#$ -o" and "#$ -e" lines are there to define files that capture output that would go to the screen in an interactive run, coming from the program and the system, repsectively. Finally, the "#$ -pe" line serves to define the number of CPUs to be reserved. The number you insert here will be reused through the environment variable $NSLOTS, so that you do not have to type it again in the namd command line.

Note that the name of the configuration file that replaces "configuration file" in the script template, should have file extension .namd, just as in the interactive run.

Once you have a proper script file (let's call it namd.sh) you can submit your production job by typing

qsub namd.sh

The Grid Engine will take care of the rest.

 

Only short test jobs of application software can be run interactively on HPCVL machines. Production jobs must be submitted via the scheduling software Grid Engine. For usage of this software, please consult our Grid Engine FAQ.

In most cases, you will be running NAMD production jobs in parallel mode. This means that you need to specify a number of CPUs that should be reserved to run each independent NAMD thread. This is done in a Grid Engine submission script. You can use this sample script as a template.

The items in the template that are enclosed in {} mustr be replaced by the appropriate values. Lines that start with "#$" containn information for Grid Engine. The "#$ -V" line tells GE to inherit the shell setup from the calling shell, for instance the $PATH variable. "#$ -cwd" tells the system to start from the current working directory. "#$ -M" lets the system know you email address, so it can notify you when the job starts and ends. The "#$ -o" and "#$ -e" lines are there to define files that capture output that would go to the screen in an interactive run, coming from the program and the system, repsectively. Finally, the "#$ -pe" line serves to define the number of CPUs to be reserved. The number you insert here will be reused through the environment variable $NSLOTS, so that you do not have to type it again in the namd command line.

Note that the name of the configuration file that replaces "{configuration file}" in the script template, should have file extension .namd, just as in the interactive run.

Once you have a proper script file (let's call it namd.sh) you can submit your production job by typing

qsub namd.sh

The Grid Engine will take care of the rest.

Are there licensing issues with NAMD2 ?

NAMD is free for non-commercial use, but it is licensed. As with other licensed software, we ask our users to read through the license agreement that exists between the University of Illinois and HPCVL, and to sign a statement that they agree to abide by the terms of the license. The main issue in the NAMD case is that usage has to non-commercial.

Once we have received the signed statement (FAX to (613) 533-2015 is OK), we will enter the user to a Unix group namd which enables access to the software.

Where can I get more detailed information?

To use NAMD, you need a copy of the manual and it is recommended to consult the NAMD webpage. These contain useful and important information regarding NAMD use. The examples are also very useful. Please contact HPCVL User support or send email to help@hpcvl.org if you have specific questions.