You are here: TWiki> Groups/ALL Web>Applications>NAMD (2014-05-28, Alexandra_20Charalampidou)Facebook Twitter
create new tag
, view all tags


NAMD (NAnoscale Molecular Dynamics) is a parallel, object-oriented molecular dynamics code designed for high-performance simulation of large biomolecular systems. NAMD is written using the Charm++ parallel programming model, noted for its parallel efficiency and often used to simulate large systems (millions of atoms). It has been developed by the joint collaboration of the Theoretical and Computational Biophysics Group (TCB) and the Parallel Programming Laboratory (PPL) at the University of Illinois at Urbana-Champaign.

On namd (2.7) has been compiled with Intel Compiler Suite (version 11.1) and the MPICH2 implementation. Notice that the VMD package is also directly available for pre or post processing of results.

Performance results of the "Ubiquitin in a Water Sphere" simulation are given in the figure below. Notice that namd exhibits good scaling behavior.


Job submission

To submit a NAMD job to the Grid one will need a JDL file describing the job itself (how many CPUs to use, what output files are expected etc), a wrapper shell script and the 4 parameters files that are needed by namd itself. Examples files are attached to this Wiki page directly. These are ubq_ws.pdb (protein data bank file), ubq_ws.psf (protein structure file), par_all27_prot_lipid.inp (force field file) and ubq_ws_eq.conf (configuration file).

These are based on the "Ubiquitin in a Water Sphere" example.

The JDL file

The following JDL file may serve as an example/template.

Executable = ""; 
Arguments = "namd2_scc ubq_ws_eq";
CpuNumber = 4; 
StdOutput = "std.out"; 
StdError = "std.err"; 
InputSandbox = {"ubq_ws_eq.conf", "", "ubq_ws.psf", "ubq_ws.pdb", "par_all27_prot_lipid.inp"}; 
OutputSandbox = {"std.err","std.out"}; 
Requirements = Member("MPICH2", other.GlueHostApplicationSoftwareRunTimeEnvironment)
        && Member("MPI-START", other.GlueHostApplicationSoftwareRunTimeEnvironment)
	&& (other.GlueHostArchitecturePlatformType == "x86_64");

A few points to note regarding the JDL file are the following ones:

  • As input to our job we provide the wrapper script ( and the 4 parameter files needed by namd itself.
  • The output files are uploaded through the wrapper script. The only output files one receives through this template job are the std.out and std.err files.
  • The number of CPUs is set to 4.
  • We limit the available resources to the ones that support the x86_64 architecture and mpich2 which were used at sompile time.

The wrapper script

We make use of the mpi-start mechanism within this template job. If you would like to go through the details of mpi-start you may do so here. The template wrapper script is structured into 4 distinct sections, which are

  1. Mpi-start environment setup
  2. Download of the executable
  3. Execution of namd
  4. Upload of output results



# Downloading executable
export EXE=$1
lcg-cp lfn:/grid/see/gridauth-users/namd2.9/$EXE file:$EXE
chmod +x $EXE

# Executing namd2
export I2G_MPI_APPLICATION_ARGS="$2.conf > $2.log"
export I2G_MPI_TYPE="mpich2"

# Gather output results, pack them and save them on a Storage Element
tar cvf results.tar $2.*
gzip -9 results.tar
# ^^^^Delete output file from SEs (if it exists)
lcg-del -a lfn:/grid/see/gridauth-users/namd/case/output/$2.tar.gz

Job submission and output retrieval

The submission of the job can be performed through First, login using your personal account.

Create a proxy with VOMS extensions for a VO (i.e. see).

voms-proxy-init --voms see

To submit this template job the following command may be used:

glite-wms-job-submit -a -o id namd.jdl

Once the job terminates one may retrieve the output files and tarball with the following set of commands:

glite-wms-job-output --dir ./results -i id
module load see/auth
lcg-cp lfn:/grid/see/gridauth-users/namd/case/output/ubq_ws_eq.tar.gz file:results/ubq_ws_eq.tar.gz
cd results
tar zxvf ubq_ws_eq.tar.gz

Adapt this template job to your needs

Once you have familiarized yourself with the example above you may adapt it to your needs by building and providing your own namd specific input files.

InputSandbox = {"case_name.conf", "", "protein_structure_file.psf", "protein_data_bank.pdb", "force_field.inp"};

Most likely you will also need to edit the Arguments line in the JDL file and in specific the third argument which is the case name in general.

Arguments = "namd2_scc case_name";

One more change you need to do is provide a specific LFN for your output results tarball.

lcg-del -a lfn:/grid/see/<username>/namd/<case_name>/output/$3.tar.gz
# ^^^^Delete output file from SEs (if it exists)
lcg-cr -l lfn:/grid/see/<username>/namd/<case_name>/output/$3.tar.gz file:results.tar.gz

Once the job terminates adapt the series of commands to obtain the outputs accordingly.

For any problems, questions or suggestions feel free to contact us.

NAMD ApoA1 benchmark results

ApoA1 has been the standard NAMD cross-platform benchmark for years.
Here are some results from runs on Grid clusters using up to 64 CPUs

  • Total walltime:

  • Seconds per step:

  • Cpu time:

In order to run this test case, you may use and namd_apoa1.jdl


Topic attachments
I Attachment Action Size Date Who Comment
pngpng image_cpu_time.png manage 8.5 K 2014-05-28 - 14:21 UnknownUser  
pngpng image_seconds_per_step.png manage 8.2 K 2014-05-28 - 14:21 UnknownUser  
pngpng image_walltime.png manage 8.3 K 2014-05-28 - 14:20 UnknownUser  
elsejdl namd.jdl manage 0.5 K 2014-05-28 - 14:10 UnknownUser NAMD template JDL file
shsh manage 0.7 K 2014-05-28 - 14:14 UnknownUser NAMD template wrapper shell script
elsejdl namd_apoa1.jdl manage 0.3 K 2014-05-28 - 14:26 UnknownUser  
shsh manage 0.7 K 2014-05-28 - 14:26 UnknownUser  
elseinp par_all27_prot_lipid.inp manage 178.6 K 2011-02-21 - 17:23 UnknownUser NAMD template force field parameter file
elsepdb ubq_ws.pdb manage 515.6 K 2011-02-21 - 17:20 UnknownUser NAMD template Protein Data Bank file
pngpng ubq_ws.png manage 95.4 K 2011-01-14 - 07:07 UnknownUser Benchmarking ubiquitin in a water sphere
elsepsf ubq_ws.psf manage 806.9 K 2011-02-21 - 17:21 UnknownUser NAMD template Protein Structure File
elseconf ubq_ws_eq.conf manage 2.3 K 2011-02-21 - 17:24 UnknownUser NAMD template configuration file

Topic revision: r9 - 2014-05-28 - 14:28:25 - Alexandra_20Charalampidou
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback