From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Tue Oct 02 2007 - 18:14:14 CDT

Hi Narender,
for what you're trying to do, you're certainly going to need to write
different output files for each frame (and then combine them later). I
realize that the instructions I gave you earlier were incomplete, and
I'm sorry for the error; the best way (currently) to get what you want
is really going to be to force namdenergy to write a different first
frame at each iteration:

package require namdenergy
set sel1 [atomselect top protein]
set sel2 [atomselect top "water and same residue as within 4 of protein"]
for {set i 0} {$i < [molinfo top get numframes]} {incr i} {
$sel1 frame $i
$sel2 frame $i
namdenergy -sel $sel1 $sel2 -elec -skip [molinfo top get numframes]
-par par_all27_prot_na.prm -extsys x.xsc -pme -ofile elect1-$i.dat
-switch 10 -cutoff 12
animate delete end 0
}

If this still does not work, please send me the output you get with the
-debug flag set. Again, I'm sorry for the mistake on my part. As I said,
there will be an easier interface for this in the next release of VMD.

Best,
Peter

Narender Singh Maan wrote:
> Hello,
> I am having some problem in running namdenergy.
> I am doing the text version as:
> .................................................................................
> vmd -dispdev text -psf x.psf -pdb x.pdb -dcd x.dcd
> .................................................................................
>
> and my script is:source x.tcl
> .............................................................................................................................
>
> package require namdenergy
> set sel1 [atomselect top protein]
> set sel2 [atomselect top "water and same residue as within 4 of protein"]
> for {set i 0} {$i < [molinfo top get numframes]} {incr i} {
> $sel1 frame $i
> $sel2 frame $i
> namdenergy -sel $sel1 $sel2 -elec -par par_all27_prot_na.prm -extsys
> x.xsc -pme -ofile elect1 -switch 10 -cutoff 12
> }
> ...............................................................................................................................
>
>
> but when its done, i don't see any output file (i gave the option of
> output file "-ofile elect1").
> Please let me know what i am missing in the script.
> Thank you
> singh