Re: Batch Mode MD simulation Script for NAMD

From: Babban Mia (babbanmia_at_gmail.com)
Date: Fri Aug 12 2011 - 12:06:28 CDT

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> 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> 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] *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> 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] *Im
> Auftrag von *Babban Mia
> *Gesendet:* Freitag, 12. August 2011 01:56
> *An:* 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