RE: Batch Mode MD simulation Script for NAMD

From: Ismail, Mohd F. (farid_at_ou.edu)
Date: Fri Aug 12 2011 - 14:40:31 CDT

The part that says write your input stuff here is the input file that you would normally use to run NAMD simulation. See the userguide or the tutorial for an example of this.

For ADD_YOUR_VALUES_HERE see http://www.ks.uiuc.edu/Research/namd/2.8/ug/node73.html
Good luck.

--Farid

________________________________
From: Babban Mia [babbanmia_at_gmail.com]
Sent: Friday, August 12, 2011 1:55 PM
To: Ismail, Mohd F.
Cc: Namd Mailing List
Subject: Re: namd-l: Batch Mode MD simulation Script for NAMD

Hello

I looked through the entire tutorial and it has much more number of parameters than specified in the above shell script.

Just a question : Apart from the few values that we setup above in the bash script.Do all the values get assumed for some Default value ?

cat << $name$i.namd < ENDIN
                        #write your input stuff here

                        ENDIN
What does this above statement do ?
Like we can write about other input stuff about our simulation in the region corresponding to "#write your input stuff here"

$namdhome/charmrun +p ADD_UR_VALUES_HERE $namdhome/namd2 $name$i.namd

What does +p signify ?
What does "ADD_UR_VALUES_HERE" signify in the above script statement ?

Please advise

Best
Babban

On Fri, Aug 12, 2011 at 11:37 PM, Ismail, Mohd F. <farid_at_ou.edu<mailto:farid_at_ou.edu>> wrote:
All of the answer to your question is available on NAMD userguide.

If you don't want to go through the userguide, just do a quick google search, for example "NAMD binaryrestart no"...

HTH
--Farid
________________________________
From: owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu> [owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu>] on behalf of Babban Mia [babbanmia_at_gmail.com<mailto:babbanmia_at_gmail.com>]
Sent: Friday, August 12, 2011 12:06 PM
To: Norman Geist
Cc: Namd Mailing List
Subject: Re: namd-l: Batch Mode MD simulation Script for NAMD

hanks Everyone!

Thanks a lot Norman for the Script. There are certain things that I could not quite understand.I will embed my doubts within your script.Please help me with the doubts.
I am very new to NAMD so will basic questions as well
What does .NAMD file contain ,looklike and do here ? .Can you show in an example of how it should look like for the current script we have ?
Do we not need a .config file as well which then has all the other vital information for this to run ?

On Fri, Aug 12, 2011 at 5:32 PM, Norman Geist <norman.geist_at_uni-greifswald.de<mailto:norman.geist_at_uni-greifswald.de>> wrote:
Hi,

yes, the same would be possible with a simple bash script, I thought it would better to not restart the simulation, and just do the pdb saving on the fly. But if you want to do it, it could work like this:

!#/bin/bash

#Options
prod_runs=1000
each_steps=1000
name=myproduction
psffile=mypsffile.psf
namdhome=/your/path/to_namd_dir/

#The loop (do prod_runs times each_steps fs runs)
for((i=1;i<=prod_runs;i++))
do
            echo structure $psffile > $name$i.namd
            echo binaryrestart no >> $name$i.namd
    What does binaryrestart no signify ?

            #Generate Input for first run (cause of the different coor and vel)
            if [ $i –eq 1 ]; then
                        echo velocities myvelocities.vel >> $name$i.namd
                        echo coordinates mycoordinates.pdb >> $name$i.namd
            #Generate Input for rest of runs
            else
                        cat << $name$i.namd < ENDIN
                        #write your input stuff here

      What kind of inputs would be required here which would then need to go to .NAMD file ?
                        ENDIN

                        #Here come the tricky counting things
                        #For the Input
                        temp=$[$i-1]
                        echo coordinates myprod$temp.coor >> $name$i.namd
                        echo velocities myprod$temp.vel >> $name$i.namd
                        #For the Output
                        echo outputname $name >> $name$i.namd
                        #The runtime
                        echo numsteps $each_steps >> $name$i.namd
            fi

            #The input should be ready so call namd with the generated infile
            $namdhome/charmrun +p ADD_UR_VALUES_HERE $namdhome/namd2 $name$i.namd
         What does +p mean here ?
       What is "ADD_UR_VALUES_HERE " ?

On Fri, Aug 12, 2011 at 5:32 PM, Norman Geist <norman.geist_at_uni-greifswald.de<mailto:norman.geist_at_uni-greifswald.de>> wrote:
Hi,

yes, the same would be possible with a simple bash script, I thought it would better to not restart the simulation, and just do the pdb saving on the fly. But if you want to do it, it could work like this:

!#/bin/bash

#Options
prod_runs=1000
each_steps=1000
name=myproduction
psffile=mypsffile.psf
namdhome=/your/path/to_namd_dir/

#The loop (do prod_runs times each_steps fs runs)
for((i=1;i<=prod_runs;i++))
do
            echo structure $psffile > $name$i.namd
            echo binaryrestart no >> $name$i.namd

            #Generate Input for first run (cause of the different coor and vel)
            if [ $i –eq 1 ]; then
                        echo velocities myvelocities.vel >> $name$i.namd
                        echo coordinates mycoordinates.pdb >> $name$i.namd
            #Generate Input for rest of runs
            else
                        cat << $name$i.namd < ENDIN
                        #write your input stuff here

                        ENDIN

                        #Here come the tricky counting things
                        #For the Input
                        temp=$[$i-1]
                        echo coordinates myprod$temp.coor >> $name$i.namd
                        echo velocities myprod$temp.vel >> $name$i.namd
                        #For the Output
                        echo outputname $name >> $name$i.namd
                        #The runtime
                        echo numsteps $each_steps >> $name$i.namd
            fi

            #The input should be ready so call namd with the generated infile
            $namdhome/charmrun +p ADD_UR_VALUES_HERE $namdhome/namd2 $name$i.namd
            #copy the final coor of every run to pdb because it’s not binary and so already in pdb format
            cp $name$i.coor $name$i.pdb
done

exit 0

Hope this helps…feel free to ask
Norman Geist.

Von: owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu> [mailto:owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu>] Im Auftrag von Babban Mia

Gesendet: Freitag, 12. August 2011 12:47
An: Norman Geist
Cc: Namd Mailing List
Betreff: Re: namd-l: Batch Mode MD simulation Script for NAMD

Hello Everyone

Thanks Norman for the information.

I am not sure about what you are suggesting. Normally what I did in CHARMM was heating and equilibration my system for 1ns and 1ns each and I would then have a .res file at the end of the equilibration which I would then use to start my actual PRODUCTION run of 1ps each for a total of say 10,000 steps giving me 10ns of production run and I would say .res file at each 1ps and start over from that new .res file for another 1ps and so on.

This was all being managed through a BASH SHELL SCRIPT.
Looking at the config file of NAMD ,I though something similar could be done in NAMD as well.
Is it?

All I want is some easy way to run my MD for a good 100ns and save PDBs for each 1ps.

Please advise further

Best regards
Babban

On Fri, Aug 12, 2011 at 11:17 AM, Norman Geist <norman.geist_at_uni-greifswald.de<mailto:norman.geist_at_uni-greifswald.de>> wrote:
Hi,

you can just simulate your system as usual, and get the structure states out of the dcd trajectory for the frames you want afterwards. You can also directly save the trajectory every 1ps if you will not need the whole trajectory. Im sure you then can capture out the frames and save to pdb with a vmd tcl script, that’s pretty easy I guess. You can do it manually while logging the tcl commands in vmd to see which functions it calls, then write a little script and finish. It sounds really expensive to me, too restart the simulation so often only so save a pdb file.

Another possibility is to use the restart.coor files, because they already in pdb format, if don’t saved binary. You could save the restarts every 1ps and then use the tcl_forces interface to rename the file, so it won’t get overwritten by the next one, I think this is the better solution.

If that’s not what your searching for, sorry.

Good luck

Norman Geist.

Von: owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu> [mailto:owner-namd-l_at_ks.uiuc.edu<mailto:owner-namd-l_at_ks.uiuc.edu>] Im Auftrag von Babban Mia
Gesendet: Freitag, 12. August 2011 01:56
An: namd-l_at_ks.uiuc.edu<mailto:namd-l_at_ks.uiuc.edu>
Betreff: namd-l: Batch Mode MD simulation Script for NAMD

Hello Everyone

I am setting up a en explicit solvent MD simulation for 100ns and I want to save my structure at every 1ps thus giving me about 100000 structures [PDB files] of my protein.

I will be very grateful if someone could give me/share the batch mode[shell] with a corresponding config file for a periodic boundary explicit MD simulation .I am sure lot of people would have used NAMD in a batch mode and it will be a good starting point to make a batch mode script for my simulation.

Much like CHARMM,I guess I would have to first store the .res file for every 1 ps of MD simulation which could then be converted to a PDB file.

Thanks again!

Best regards
Babban

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:24:18 CST