From: John Stone (
Date: Wed May 03 2006 - 10:12:03 CDT

  You can put your Tcl routines anywhere you like, and then either
source them with a fully qualified path name, or you can make them into
Tcl packages (add 'package provide mystuff 1.0' to the top of the file,
then in VMD or tclsh, do 'pkg_mkIndex . ' in that directory) and use
the 'lappend auto_path' Tcl variable to tell VMD where to find these
packages. This is how I test new VMD plugins that aren't part of
VMD yet, for example:
  lappend auto_path [file join $env(HOME) myplugins]

I've written a little bit about writing VMD Tcl/Tk plugins/extension menu
items in the plugin developer's documentation:

There's MUCH more information on these topics in the Tcl documentation:

  John Stone

On Wed, May 03, 2006 at 04:13:42PM +0200, Enzo Vitale wrote:
> Dear VMD people,
> I wrote some scripts (thanks for your previous very quick replies!)
> and now I would like to be able to call them from my local .vmdrc
> command files, without replicating them in each of these files.
> The question is: where should I put the source of my subroutines in
> order for the TCL interpreter to find them automatically? Do I need to
> put each subroutine in a different source file (maybe with the same
> name as the subroutine)? And in which directory should these files be
> placed?
> I was not able to find an answer to this question in the (in any case
> excellent!) User's Guide.
> Thank you in advance,
> Enzo

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078