From: Thomas C. Bishop (
Date: Thu Jul 23 2009 - 09:52:15 CDT

guess you could also make every script be a loop that runs only once..

which explains why most of my scripts report little.

I set up a lot of my scripts to work as
vmd -e somescript -args molec1 molec2 molec3
this runs somescript as a loop over the molecs.


vmd -parm7 -e somescript -args dcd1 dcd2 dcd3
this does somescript as loop over given dcds

On Thursday 23 July 2009, Axel Kohlmeyer wrote:
> On Thu, 2009-07-23 at 12:15 +0200, Nicolas SAPAY wrote:
> > Hello,
> hello nicolas,
> > I have noticed that scripts run -e options systematically echo the result
> > of the "set command". For example, if there is something like that:
> > set i "hello"
> >
> > The VMD console will display:
> > hello
> yes. that is the documented behavior of the tcl interpreter.
> it always displays the return value of the last command.
> > Is there a way to disable that? I know, it is really a silly problem, but
> > sometimes that makes the display a bit confusing. I have also noticed
> > that the set command doesn't return anything if it is embedded in a loop.
> exactly, as the return value would be the return value of the looping
> command. the same is true for subroutines, if you use and explicit
> return, so that would be a trick to work around it. check out:
> over the last years i've been on and off working on a more
> flexible console output handling for VMD (it works fine for me, and
> is included in the VMD source, but not ready for prime time and thus
> not enabled in the official VMD builds)... and i have been pondering
> for a while, if i should try and change this behavior for the VMD
> console (or at least make it an option). having the current behavior
> can seriously impact performance, if one processes large data sets
> on the command line, as it take much more time to format and print
> them, than to do the calculations. the downside of disabling this
> behavior is, that fast calculations with expr would not work anymore.
> one would have to define a new command, e.g. something like this
> proc compute {args} {
> set res [expr $args]
> puts "$res"
> }
> to recover this. if people here would give their opinion on this,
> it would help us to make an appropriate choice.
> cheers,
> axel.
> > Nicolas

Thomas C. Bishop     *
Office: 504-862-3370 *
Fax:    504-862-8392 *