Tcl_BC: [nexatom] twice in script

From: Arturas Ziemys (
Date: Tue Jan 02 2007 - 09:52:53 CST


I am using Tcl BC script. In the first loop with [nextatom] I calculate property, and with second repeated loop I calculated force depending on the property I have calculated in the first loop of atoms:

tclBCScript {
  while {[nextatom]} {
    <analyze coords>

  while {[nextatom]} {
    <apply force>
    <do output to log file>

However, I am not able 'print' or 'puts <file>' any information. I tried to output some data to variable and pass it for printing outside the second [nextatom] loop, but it seems that I'm also not able to reassign variable to outside of loop defined variable. It looks like second call of [nextatom] loop is terminated at the beginning?

Is any limitation of how many times I can invoke [nextatom] loop ?

How can I store any variable or data to read in the next step (without writing/reading file) ?


This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:19:58 CST