From: gianluca santarossa (gluca_at_flashmail.com)
Date: Thu Jan 16 2003 - 04:10:48 CST

On Wed, 2003-01-15 at 18:46, Sanjeev B.S. wrote:
> Hello,
> I think this is a silly question but I could not find an answer.
> There are several Tcl scripts, like rmsd.tcl, that come with VMD. Upon
> starting VMD I would like to run at certain point of time a script, say
> rmsd.tcl. Presently I do a 'locate rmsd.tcl', and then explicitly source
> that. (I do not know why but at least in this case 'source' works faster
> than 'play' on my linux box.) Is there an easier way out!? I looked at

Hallo!
        I try to answer your question as well as I can, but I'm quite a newbie
and not so expert :P
Perhaps there are many better ways to solve your problem than mine, but
I think it could work...

First of all, you can source rmsd.tcl file tiping "vmdrmsd" (without
quotes) on the console tcl promp.
In /usr/local/lib/vmd/scripts/vmd/vmdinit.tcl (loaded at vmd startup)
there's a proc (called vmdrmsd) among others which sources the rmsd.tcl
script when tiping the proc name.
I don't know if there are other scripts dedicated to this task, but I
still don't find any.

So, this is what I would do: I would create a file (sources.tcl for
example) which contains a "shortcut" to sources of the scripts you are
interested in, using the same sintax as the one in
/usr/local/lib/vmd/scripts/vmd/vmdinit.tcl

proc proc_name { args } {
  global env
  source [file join path_to_script script_name.tcl]
  return
}

and then I would source it at startup, for example adding line
source sources.tcl
at the end of your .vmdrc file.

Alternatively, the environmental variable TCL_LIBRARY contains the
locations of the scripts and is set to $VMDDIR/scripts/tcl.
You can change it and then source the script by tiping
source script_name.tcl
without the entire path

-- 
gianluca santarossa <gluca_at_flashmail.com>