Re: NAMD log file analysis script problem (namdstats.tcl)

From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Sun Jun 15 2008 - 13:09:50 CDT

On Sun, 15 Jun 2008, Demet Akten wrote:

DA> Hi,
DA>
DA> In "proc data_time", the second while loop should be changed to;
DA> while { [gets $file line] != -1 } {
DA> if [regexp "ENERGY: " $line] {set ener "$ener $line"}
DA> if {[regexp "ENERGY: 1" $line]} {set ener "$ener $line"}
DA> }
DA>
DA> this will make sure that it will skip to 1000000 steps. Similaryly, if you
DA> want to exceed 1999999 and read 2000000, you should change it to;
DA> while { [gets $file line] != -1 } {
DA> if [regexp "ENERGY: " $line] {set ener "$ener $line"}
DA> if {[regexp "ENERGY: 1" $line] || [regexp "ENERGY: 2" $line]} {set ener
DA> "$ener $line"}
DA> }

nope. this is only half a solution and not very reliable to boot.
why not use regular epressions properly and change that one line
of code to:

  if [regexp "^ENERGY:" $line ] {set ener "$ener $line"}

all the lines containing 'ENERGY:' that you do want to match
always start with it, so using the caret makes sure that only
the right lines match. the other change may accidentally match
with the energy precision statements of the various tables...

cheers,
   axel.

DA>
DA> and so on ....
DA>
DA> Demet
DA>
DA>
DA> On Jun 14, 2008, at 9:39 PM, sudipta sinha wrote:
DA> >Hi All,
DA> > I am facing a problem regarding namdstats.tcl script. I want to
DA> >analyze average properties and instantaneous properties of NAMD .log
DA> >file. I have run the script through VMD Tkconsole. The script
DA> >calculates only up to 1000000 steps. But my simulation have 1700000 steps.
DA> >I
DA> >am getting a error in VMD Tkconsole like this
DA> >
DA> >*ERROR:*can't read "e(101,2)": no such element in array
DA> >
DA> >How I over come this problem by modifying the namdstats.tcl script. I am
DA> >also attaching this file. If anybody suggest me where do I change this
DA> >script?
DA> >
DA> >Thanks and regards
DA> >sudipta
DA>
DA>
DA>
DA> Demet Akten-Akdogan, Ph.D.
DA> Research Associate
DA> Polymer Research Center
DA> Bogazici University
DA> email: demet.akten_at_gmail.com
DA>
DA>
DA>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:47:57 CST