Re: printing and global variables within TclBC script

From: Peter Freddolino (
Date: Tue Oct 23 2007 - 14:50:03 CDT

Hi Leandro,

Leandro Martínez wrote:
> Hello,
> I am peforming a simulation in which I apply particular external forces
> which I programmed using the TclBC scripting interface. Since the TclBC
> is run on multiple processors, with one tcl interpreter for each
> processor,
> everything I try to print (even from the begining, when outside de
> calcforces procedure) is printed multiple times. I need to print
> information
> during the run, to output files. This can be done using the TclBC
> interface,
> or I need to go back to the tclForces interface (slower)?
This is what the "unique" flag is for (see the docs), eg,
if {$unique > 0} {
# print stuff
> Another question is that within the script I update some vectors that will
> be used in the next step for the calculations. Fortunatelly there is only
> atom-specific information on each vector, in such a way that the
> distribution
> among several processes is possible. However, I'm not sure how the
> scripts handle these updated vectors when the script finishes, I mean,
> do all the scripts update the vectors before launching the scripts again
> in the next step or this information is lost?
> Thanks in advance,
> Leandro.
If the information is in variables defined as a global variable inside
of the tclBCscript but outside of the calcforces routine, and brought
into the calcforces routine as a global, it should be persistent between
timesteps. You should probably test this yourself to verify that the
information is being passed between timesteps the way you want...


This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:24 CST