Difference between revisions of "NAMD on Seawulf"

From Rizzo_Lab
Jump to: navigation, search
(Sample MD paramters)
 
m (Running NAMD with AMBER parm and crd files)
 
Line 75: Line 75:
 
  cellorigin $centerofbox              #defines the xyz location of the center of the box
 
  cellorigin $centerofbox              #defines the xyz location of the center of the box
 
   
 
   
#extendedSystem Z-EXTENDEDSYSTEM      #defines file which contains the PBC info from previous runs
+
#extendedSystem Z-EXTENDEDSYSTEM      #defines file which contains the PBC info from previous runs
 
  wrapwater              on            #wraps the waters to one box.
 
  wrapwater              on            #wraps the waters to one box.
 
  wrapall                on            #wraps every contiguous cluster of bonded atoms
 
  wrapall                on            #wraps every contiguous cluster of bonded atoms

Latest revision as of 22:51, 6 March 2015

Sample tcsh script for running NAMD

#!/bin/tcsh
#PBS -l nodes=8:ppn=2
#PBS -l walltime=02:00:00

set path = ( $path /usr/local/pkg/NAMD_2.6/Linux-amd64-MPI )
setenv LD_LIBRARY_PATH "/usr/local/pkg/openmpi/lib:/lib:/usr/local/pkg/torque/lib/"
set workdir = /home/sudipto/path/to/files
cd $workdir
set namd2 = /usr/local/pkg/NAMD_2.6/Linux-amd64-MPI/namd2

mpirun -x PATH -x LD_LIBRARY_PATH -np 16 $namd2 01mi.in > 01mi.out

Use "qsub" to run the script above, info for the command on seawulf PBS_queue

Running NAMD with AMBER parm and crd files

NAMD will run systems prepared by AMBER. Here is a generic input file for doing this. for further details about each parameter, look in the NAMD User Guide. There are several parameters with dummy values such as Z-AMBERPARM or Z_AMBERCRD. Replace these placeholders with your filenames and other parameters. Anything in the NAMD input file with a # sign in front of it is interpreted as a comment. You need to uncomment the parameters you are using to create a valid input file from the generic one provided below. The cellbasisvectors and cellorigin parameters can be measured using VMD.

#input files (section 3.2.1)
amber                   on            #specifies we are using AMBER Prm and CRD files
#parmfile Z-AMBERPARM                 #specifies we are using AMBER Prm and CRD files
#ambercoor Z-AMBERCRD                 #specifies we are using AMBER Prm and CRD files
#velocities Z-VELOCITIES              #velocity file for a restart note that in a restart delete the temp

#output file (section 3.2.2)
#outputname Z-OUTPUTNAME              #specifies the prefix for the output files
binaryoutput            no            #activates binary output (yes=binary)
DCDfreq                 1000          #number of timesteps between the writing coordinates

#standard output (section 3.2.3)
outputenergies          1000          #number of timesteps between energy output
outputTiming            1000          #number of timesteps between timing output 

#timestep parameters (section 5.3.1)
firsttimestep           0             #frame number where the simulation starts
timestep                1             #length of each step in fs
stepspercycle           20            #how often the interacting particle lists are updated 

#space partitionin (section 5.3.2)
cutoff                  12            #non-bonded cutoff
switching               on            #smoothing function for ES and VDW
switchdist              10            #distance at which the smoothing function is applied
pairlistdist            16            #distance >= switchdist for atom pairs to be included in the pairlist
margin                  8             #see section 5.3.2
 
#basic dynamics (section 5.3.3)
exclude                 scaled1-4     #which bonded atom pairs are excluded from non-bonded calculations
#temperature Z-TEMPERATURE            #INITIAL temperature of the simulation note delete on restart
1-4scaling              0.833333      #1.0 for Charmm, 0.833333 for Amber
scnb                    2             #This is default for both Amber and Charmm
rigidbonds              water         #controls how shake is used
rigidTolerance          0.00001       #allowable bond length error for shake

#PME parameters (section 5.3.5)
PME                     yes           #turns PME on or off (yes=on no=off)
PMEGridSpacing          1.0           #standard spacing.  Namd asigns the grid size. 

#constraints (section 6.1)
constraints             on            #on or off
#consref Z-CONSREF                    #pdb file with restraint reference positions
#conskfile Z-CONSKFILE                #pdb file with force constant values
conskcol                B             #use the beta column in the pdb for contraints

#temperature control and equilibration (section 6.3)
langevin                on            #turns langevin dynamics on or off
langevinTemp            310           #temp to which langevin dynamics will be adjusted
langevinDamping         1             #damping coefficient for langevin dynamics

#periodic boundry conditions (section 6.4.3)
cellbasisvector1 $boxsize_x 0 0       #defines the first periodic boundary
cellbasisvector2 0 $boxsize_y 0       #defines the second periodic boundary
cellbasisvector3 0 0 $boxsize_z       #defines the third periodic boundary
cellorigin $centerofbox               #defines the xyz location of the center of the box

#extendedSystem Z-EXTENDEDSYSTEM      #defines file which contains the PBC info from previous runs
wrapwater               on            #wraps the waters to one box.
wrapall                 on            #wraps every contiguous cluster of bonded atoms
wrapNearest             off           #wraps coordinates to the nearest image to the origin

#pressure control (section 6.5)
langevinPiston          on            #turns on constant pressure
langevinPistonTarget    1.01325       #target pressure
langevinPistonPeriod    200           #period over which the pressure is averaged in fs
langevinPistonDecay     100           #damping time scale in fs
langevinPistonTemp      310           #should be equal to langevin temp 

#equilibration
#run Z-NSTEPS
#minimize Z-NSTEPS

There are more details about running NAMD in the NAMD tutorial, although the NAMD input files in that article are NOT up to date. Please use the input file from this article.

If you need to fine-tune your input files, it might take a long time if you hvae to submit jobs to the queue every time. For this reason, we have compiled a serial version of namd as well. This is in /usr/local/pkg/NAMD_2.6/Linux-amd64-g++

Only use that binary for testing (or serial jobs on the queue). Do not use that binary to run on the seawulf headnode for more than a few minutes.

Running namd with psf and pdb inputs

#input files (section 3.2.1)
#coordinates Z-COORDINATES             #name of coordinate (pdb) file
#structure Z-STRUCTURE                 #psf file
parameters par_all27_prot_lipid.prm    #parameter file
paratypecharmm          on             #specifies if this is a charmm force field (on or off)
#velocities Z-VELOCITIES               #velocity file for a restart. In a restart delete the temperature

#output file (section 3.2.2)
#outputname Z-OUTPUTNAME               #specifies the prefix for the output files
binaryoutput            no             #activates binary output (yes=binary)
#DCDfreq Z-DCDfreq

#standard output (section 3.2.3)
#outputenergies Z-outputenergies       #number of timesteps between energy output
#outputTiming Z-outputTiming           #number of timesteps between timing output

#timestep parameters (section 5.3.1)
firsttimestep           0              #frame number where the simulation starts
#timestep Z-TIMESTEP
stepspercycle           20             #how often the interacting particle lists are updated

#space partitioning (section 5.3.2)
cutoff                  12             #non-bonded cutoff
switching               on             #smoothing function for ES and VDW
switchdist              10             #distance at which the smoothing function is applied
pairlistdist            16             #distance >= switchdist for atom pairs to be included in the pairlist
margin                  0              #see section 5.3.2

#basic dynamics (section 5.3.3)
exclude                 scaled1-4      #which bonded atom pairs are excluded from non-bonded calculations
#temperature Z-TEMPERATURE             #INITIAL temperature of the simulation note delete on restart
1-4scaling              1.0            #1.0 for Charmm, 0.833333 for Amber
#rigidbonds Z-RIGIDBONDS               #controls how shake is used (on or off)
rigidTolerance          0.00001        #allowable bond length error for shake

#PME parameters (section 5.3.5)
PME                     yes            #turns PME on or off (yes=on no=off)
pmeGridSpacing          1.0            # automatically assigns PME box sizes
#constraints (section 6.1)
constraints             on             #on or off
#consref Z-CONSREF                     #pdb file with restraint reference positions
#conskfile Z-CONSKFILE                 #pdb file with force constant values
conskcol                B              #use beta column in pdb file 

#temperature control and equilibration (section 6.3)
langevin                on             #turns langevin dynamics on or off
langevinTemp            310            #temp to which langevin dynamics will be adjusted
langevinDamping         1              #damping coefficient for langevin dynamics

#periodic boundry conditions (section 6.4.3)
cellbasisvector1 $boxsize_x 0 0        #defines the first periodic boundary
cellbasisvector2 0 $boxsize_y 0        #defines the second periodic boundary
cellbasisvector3 0 0 $boxsize_z        #defines the third periodic boundary
cellorigin $centerofbox                #defines the xyz location of the center of the box

#extendedSystem Z-EXTENDEDSYSTEM       #defines file which contains the PBC info from previous runs
wrapwater               on             #wraps the waters to one box.
wrapall                 on             #wraps every contiguous cluster of bonded atoms
wrapNearest             off            #wraps coordinates to the nearest image to the origin

#pressure control (section 6.5)
langevinPiston          on             #turns on constant pressure
langevinPistonTarget    1.01325        #target pressure
langevinPistonPeriod    200            #period over which the pressure is averaged in fs
langevinPistonDecay     100            #damping time scale in fs
langevinPistonTemp      310            #should be equal to langevin temp

#equilibration
#run Z-NSTEPS
#minimize Z-NSTEPS

To increase parallelism for large number of processors, especially on Blue Gene, use

twoAwayX   yes    # doubles the number of patches (divides the box in the x direction)
twoAwayY   yes    # doubles the number of patches (divides the box in the y direction)
twoAwayZ   yes    # doubles the number of patches (divides the box in the z direction)

Sample minimization parameters

Replace the following parameters in the generic namd input file above to perform a minimization. The parameters which are not mention can remain commented out with the # before them. We are doing 1000 steps of minimization at 310K and using shake on the water hydrogens only.

outputname        01mi                                 
coordinates       complex.solvated.pdb
conskfile         restraint01.pdb
structure         complex.solvated.psf
temperature       310
consref           reference.solvated.pdb
langevinTemp      310                          
minimize          1000                                  
DCDfreq           1000
outputenergies    1000
outputTiming      1000
rigidbonds        water

Sample MD paramters

This is a 500ps simulation with a timestep of 1fs. 03mi indicates the last namd run we are getting the input coordinates and velocities from. The xsc file contains the velocities. We are using shake on all the hydrogen atoms. Since we are using shake on all hydrogens, we could increase the timestep to 2fs to make this a 1ns simulation.

outputname       04md
coordinates      03mi.coor
extendedSystem   03mi.xsc
conskfile        complex.restraint04.pdb
structure        complex.new.solvated.psf
temperature      310
consref          complex.new.solvated.pdb
langevinTemp     310
run              500000
timestep         1
DCDfreq          1000
outputenergies   1000
outputTiming     1000
rigidbonds       all