Status
About
Hardware
Applications
Batch queues
Disk storage

MPI
Performance
New Users
User Guide
Documentation
Research
Photos


NAMD on Biowulf

NAMD is a parallel molecular dynamics program for UNIX platforms designed for high-performance simulations in structural biology. It is developed by the Theoretical Biophysics Group at the Beckman Center, University of Illinois. NAMD is particularly well suited to Beowulf clusters, as it was specifically designed to run efficiently on parallel machines.

Features of NAMD

NAMD User Guide

Overview of NAMD and Molecular Dynamics (in PDF)

NAMD was developed to be compatible with existing molecular dynamics packages, especially the packages X-PLOR and CHARMM, so it will accept X-PLOR and CHARMM input files. The output files produced by NAMD are also compatible with X-PLOR and CHARMM.

Running NAMD on Biowulf

At a minimum, NAMD requires
  • a PSF structure file which defines the structure. This can be generated in X-PLOR, CHARMM, or by using the psfgen program in NAMD.
  • a PDB coordinate file, defining the XYZ coordinates of every atom in the structure.
  • a parameter file, in CHARMM or X-PLOR format.
  • a NAMD configuration file which specifies the number of timesteps, temperature, and other options to the NAMD program.
Details of the input and output files are in the NAMD user guide, and a sample session is at the end of this page.

Create a batch command file:

-----------------------------------------------------------------------------
Sample batch script -- /data/username/namd/namd_run
-----------------------------------------------------------------------------
#!/bin/csh
#PBS -N NAMD
#PBS -k oe
#PBS -m be
#
set path=(/usr/local/namd/ $path .)
cd $PBS_O_WORKDIR

make-namd-nodelist
charmrun /usr/local/namd/namd2 +p$np ++nodelist ~/namd.$PBS_JOBID bpti.inp >& bpti.out
rm ~/namd.$PBS_JOBID
-----------------------------------------------------------------------------

Submit this job with the command:

qsub -v np=6 -l nodes=3:p1400 /data/username/namd/namd_run
This job will be run on 3 p1400 nodes, using both processors of each node.


[Currently unsupported] NAMD on Myrinet nodes

Our benchmarks indicate that NAMD performs poorly on the Myrinet nodes. We hope to solve this problem in the future, but at present we do not recommend running NAMD on the Myrinet nodes.

Running NAMD on Myrinet requires a slightly different batch script, since the node list needs to be in a different format.

-----------------------------------------------------------------------------
Sample batch script - /data/username/namd/namd_run.myr
-----------------------------------------------------------------------------
#!/bin/csh
#PBS -N NAMD
#PBS -k oe
#PBS -m be
#
set path=(/usr/local/namd/ $path .)
cd $PBS_O_WORKDIR

make_namd_nodelist.myr
charmrun.myr /usr/local/namd/namd2.myr +p$np ++nodelist ~/namd.$PBS_JOBID bpti.inp >& bpti.out
rm ~/namd.$PBS_JOBID
-----------------------------------------------------------------------------
Submit this script with the command:
qsub -v np=4 -l nodes=2:myr2k /data/username/namd/namd_run.myr
This job will be submitted to 2 Myrinet nodes, using both processors of each node.


Considerations:

  1. Choosing the number of processors/nodes: When submitting a job with the qsub command, the number of processors (np=#) should be twice the number of nodes (-l nodes=#), so that the job uses both processors of each node. It is recommended that you use 2 processors per node unless the job requires more than half the the memory available on that node. The Benchmarks section of this page may help you to choose the appropriate nodes and number of processors.

  2. Nodelist:. NAMD requires a list of nodes to run, hence the batch command file must include the 'make-namd-nodelist' utility, which is in the directory /usr/local/namd/. To run on Myrinet, the script must include the utility 'make-namd-nodelist.myr'. These utilities create a file in your home directory called namd.PBS_JOBID, which is used when running the NAMD job. This file can be deleted at the end of the job, as in the batch scripts above.


Benchmarks

BPTI example from the NAMD user guide.

Bottom line: On Myrinet nodes, the wallclock and cpu time is pretty much identical, since this type of network has increased bandwidth and low latency. On nodes connected by fast Ethernet (p1400 or p866), the wallclock time starts diverging significantly from the cpu time at about 8 processors. Note that the p1400 nodes are about twice as fast as the p866 nodes.

If you need help selecting the right nodes for your job, please call the NIH HelpDesk (301-594-6248) or email the Helix Staff (staff@helix.nih.gov).

Full benchmark details

User Benchmark: Protein/Membrane/Water containing 13901 atoms. Courtesy of Gavin Tsai, NCI.
Note that NAMD does not scale beyond 8 nodes (16 processors) for these two benchmarks. In our experience, this is typical. Most NAMD jobs should therefore be run on a maximum of 8 nodes. Users who submit NAMD jobs to more than 8 nodes should justify this use by running their own benchmarks. (We'd be very interested in any benchmarks that diverge from the behaviour above; please send the benchmarks to staff@helix.nih.gov)


Detailed sample session:

This session uses the BPTI example that is described in the NAMD User Guide
  1. Obtain the PDB file 6pti.pdb (on helix, you can copy it from /db/pdb/pt/pdb6pti.ent.Z and uncompress. The entire Protein Data Bank, updated nightly, is mirrored on the Helix Systems). Also obtain the appropriate topilogy and parameter files. A collection is available at https://rxsecure.umaryland.edu/research/amackere/research.html.
  2. Run psfgen to create the PSF file.
    % cd /data/username/namd
    % grep -v '^HETATM' 6pti.pdb > 6pti_protein.pdb
    % grep 'HOH' 6PTI.pdb > 6pti_water.pdb
    % cat > psfgen.inp
    topology top_all22_prot.inp
    segment BPTI {
     pdb 6pti_protein.pdb
     }
    patch DISU BPTI:5 BPTI:55
    patch DISU BPTI:14 BPTI:38
    patch DISU BPTI:30 BPTI:51
    alias atom ILE CD1 CD
    coordpdb 6pti_protein.pdb BPTI
    alias residue HOH TIP3
    segment SOLV {
     auto none
      pdb 6pti_water.pdb
      }
    alias atom HOH O OH2
    coordpdb 6pti_water.pdb SOLV
    writepsf bpti.psf
    guesscoord
    writepdb bpti.pdb
    
    % /usr/local/namd/psfgen < psfgen.inp
    
  3. Create the NAMD configuration file -- the BPTI example is provided in the NAMD user guide.
  4. Create the batch command file, in this case called /data/username/namd/bpti.run
    ------------------------------------------------
    #!/bin/csh
    #PBS -N NAMD
    #PBS -k oe
    #PBS -m be
    #
    set path=(/usr/local/namd/ $path .)
    cd $PBS_O_WORKDIR
    make-namd-nodelist
    charmrun /usr/local/namd/namd2 +p$np ++nodelist ~/namd.$PBS_JOBID bpti.inp >& bpti.out
    rm ~/namd.$PBS_JOBID
    ------------------------------------------------
    
  5. Decide on the number of processors, and submit the job with the command
    % qsub -v np=4 -l nodes=2:bigmem /data/username/namd/bpti.run

This document is available as http://biowulf.nih.gov/apps/namd/index.html
Biowulf home page | Helix Systems | NIH