From: John Stone (johns_at_ks.uiuc.edu)
Date: Sat Apr 11 2015 - 13:13:26 CDT

Hi,
  It appears that the character spacing of the "ENERGY:" records in your
file differs from what the namdstats script you sent was expecting.
If you delete one space from the "regexp" match test for ENERGY, the
script seems to run. I edited the script so it reads like this,
which should be much more robust than the original:
  if [regexp "ENERGY:" $line] {set ener "$ener $line"}

I've attached the full script (also with improved indendation) to
this email.

I suggest you send the modified version of this script to whoever you
got the original version from since the original version has at least
the two errors in it that should be fixed.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, Apr 11, 2015 at 09:51:38AM +0000, oguz gurbulak wrote:
> Dear John Stone,
>
> You can reach the namd log file from the link below. Thanks for your help.
>
> Regards.
>
> [1]http://www.filedropper.com/namd
>
> On Saturday, April 11, 2015 12:31 AM, John Stone <johns_at_ks.uiuc.edu>
> wrote:
>
> Hi,
> We would also need a copy of the NAMD log file that fails to be able
> to debug the code further.
>
> Cheers,
> John
>
> On Wed, Apr 08, 2015 at 06:50:47AM +0000, oguz gurbulak wrote:
> > Dear John Stone,
> >
> > I changed "TOTAL2" in the script with "POTENTIAL" and tried to run it
> > again. It computed the average values of TOTAL, TEMP, PRESSAVG and
> VOLUME
> > for my first namd out file. But Ã*±t couldn't work for my second out
> file.
> > I couldn't find where I got the script but I attached
> "namdstats.tcl" I
> > used. Could you please help me to fix the script ?
> >
> > Regards.
> > >Main< (A) 50 % source namdstats.tcl
> > Usage: data_avg <logfile> [<first timestep> <last timestep>]
> > <first timestep> and <last timestep> may be entered as numbers or
> > <first timestep> = 'first' will start at the beginning of the
> > simulation
> > <last timestep> = 'last' will go to the end of the simulation
> > Usage: data_time <data stream> <logfile> [<first timestep> <last
> > timestep>]
> > <data stream> = BOND, ANGLE, DIHED, IMPRP, ELECT, VDW, BOUNDARY,
> MISC,
> > KINETIC, TOTAL, TEMP, POTENTIAL, TOTAL3, TEMPAVG
> > >Main< (A) 51 % data_avg minmd_NPT.out
> > Calculating averages...
> > CALCULATING DATA FROM TIMESTEP 0 TO 999500:
> > BOND: 4108.828256906084
> > ANGLE: 2153.6935096991397
> > DIHED: 0.0
> > IMPRP: 0.0
> > ELECT: -116970.09206833366
> > VDW: 21827.24498616304
> > BOUNDARY: 0.0
> > MISC: 0.0
> > KINETIC: 2067.3828981303786
> > TOTAL: -86812.94240436761
> > TEMP: 49.15447203906191
> > POTENTIAL: -88880.32530247286
> > TOTAL3: -86809.55005141706
> > TEMPAVG: 49.14564788415001
> > PRESSURE: -487.6260775561439
> > GPRESSURE: -368.2150356731323
> > VOLUME: 211735.6768608377
> > PRESSAVG: -485.595377881658
> > GPRESSAVG: -367.8875202654034
> >
> > >Main< (A) 52 % data_avg md_NPT.out
> > Calculating averages...
> > can't read "ts(0)": no such variable
> > >Main< (A) 53 %
> >
> > On Monday, April 6, 2015 7:58 PM, John Stone <[2]johns_at_ks.uiuc.edu>
> wrote:
> >
> > Hi,
> > You didn't say where you obtained your "namdstats.tcl" script from,
> so
> > it is hard to guess what might be wrong with the version you have.
> > Google shows that there are several versions of this script floating
> > around.
> > You may have an old one that has not been corrected for the most
> recent
> > vesions of NAMD. The current versions of NAMD no longer emit a field
> > named "TOTAL2", it now emits "POTENTIAL" instead. This breaks
> scripts
> > that are expect to read "TOTAL2" and don't have any fallback code if
> it's
> > not there. I assume that your namdstats.tcl script tries to read
> TOTAL2,
> > so you may want to try and replace "TOTAL2" in the script with
> "POTENTIAL"
> > and see if it cures your problem or not. If not, then you'll need
> tell us
> > where you got the script and/or who wrote it and we'll help them get
> it
> > fixed.
> >
> > Cheers,
> > John Stone
> > [1][3]vmd_at_ks.uiuc.edu
> > On Sun, Apr 05, 2015 at 09:54:50PM +0000, oguz gurbulak wrote:
> > > DearAll,
> > >
> > >
> > >
> > > Iwanted to compute the average values of TOTAL, TEMP, PRESSAVG and
> > VOLUME withusing ???namdstats.tcl??? script for a NPT run. But I got
> > theerror ???can't read "ts(0)": no such variable???.How can I solve
> this
> > problem ? Could you please help me about this issue ?
> > >
> > >
> > >
> > > Regards.
> > >
> > >
> > > >Main< (A) % source namdstats.tclUsage: data_avg <logfile>[<first
> > timestep> <last timestep>]
> > >
> > > <first timestep> and<last timestep> may be entered as numbers or
> > >
> > > <first timestep> ='first' will start at the beginning of the
> > simulation
> > >
> > > <last timestep> ='last' will go to the end of the simulation
> > >
> > > Usage: data_time <data stream><logfile> [<first timestep> <last
> > timestep>]
> > >
> > > <data stream> = BOND,ANGLE, DIHED, IMPRP, ELECT, VDW, BOUNDARY,
> MISC,
> > KINETIC, TOTAL, TEMP, TOTAL2,TOTAL3, TEMPAVG
> > >
> > > >Main< (A) % data_avg namd_1.out Calculating averages...
> > >
> > > can't read "ts(0)": no suchvariable
> > >
> > > >Main< (A) %
> > >
> > >
> >
> > --
> > NIH Center for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > [2][4]http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> > [3][5]http://www.ks.uiuc.edu/Research/vmd/
> >
> >
> > References
> >
> > Visible links
> > 1. mailto:[6]vmd_at_ks.uiuc.edu
> > 2. [7]http://www.ks.uiuc.edu/~johns/
> > 3. [8]http://www.ks.uiuc.edu/Research/vmd/
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [9]http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> [10]http://www.ks.uiuc.edu/Research/vmd/
>
> References
>
> Visible links
> 1. http://www.filedropper.com/namd
> 2. mailto:johns_at_ks.uiuc.edu
> 3. mailto:vmd_at_ks.uiuc.edu
> 4. http://www.ks.uiuc.edu/~johns/
> 5. http://www.ks.uiuc.edu/Research/vmd/
> 6. mailto:vmd_at_ks.uiuc.edu
> 7. http://www.ks.uiuc.edu/~johns/
> 8. http://www.ks.uiuc.edu/Research/vmd/
> 9. http://www.ks.uiuc.edu/~johns/
> 10. http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/