From: Justin Gullingsrud (justinrocks_at_gmail.com)
Date: Sat Oct 01 2005 - 15:26:00 CDT

Yep, use "-args" on the command line. Everything after -args will be
put in the $argv global variable (so any molecules to be loaded or
scripts to be run have to be specified before the -args option.

## script.tcl
proc foo { x } { }
eval foo $argv
##

# Run script with one argument of 0:
vmd -dispdev text -e script.tcl -args 0

Cheers,
Justin

PS The same arguments are put in sys.argv in the Python interpreter,
so if you want to run a Python script in VMD from the command line,
you would do something like

  vmd -dispdev text -python -e script.py -args a b c

On 10/1/05, Samuel Flores <samuel.flores_at_yale.edu> wrote:
> Can anyone tell me how to pass parameters to a tcl script? I'd like to be
> able to issue something like
>
> vmd -dispdev text -e script.tcl x=0
>
> or whatever.. the point is I'd rather not have to modify my program every
> time I want to change some parameter.
>
> Many thanks
>
> Sam
>
> -----Original Message-----
> From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of
> Charles McCallum
> Sent: Friday, September 30, 2005 10:15 AM
> To: Luis Gracia
> Cc: vmd-l_at_ks.uiuc.edu
> Subject: Re: vmd-l: RMSD of dihedrals
>
> Hey, that's great, I appreciate it!
>
>
> Cheers,
>
> Mike
> On Sep 29, 2005, at 9:27 PM, Luis Gracia wrote:
>
>
> > Hi!
> >
> > I have a tool that can do that with dihedrals in general, I'll try
> > to post it tomorrow.
> >
> > Best,
> >
> > Luis
> >
> > Charles McCallum wrote:
> >
> >
> >> Hi there, I was wondering if anyone had a script to calculate RMSD
> >> of dihedrals (say, psi and phi, though general would work also),
> >> or alternatively, how to use the RMSD menu tool to achieve the
> >> same results? I'm hoping to avoid doing it myself, but if I have
> >> to...
> >> Thanks,
> >> Mike
> >> --
> >> C. Michael McCallum http://chemistry.cop.uop.edu/
> >> cmccallum.html
> >> Associate Professor Department of
> >> Chemistry, UOP mmccallum .at. pacific .dot. edu
> >> (209) 946-2636 v / (209) 946-2607 fax
> >>
> >>
> >
> >
> >
>
> --
> C. Michael McCallum http://chemistry.cop.uop.edu/
> cmccallum.html
> Associate Professor
> Department of Chemistry, UOP
> mmccallum .at. pacific .dot. edu (209) 946-2636 v /
> (209) 946-2607 fax
>
>
>

--
The spirit of Plato dies hard.  We have been unable to escape the
philosophical tradition that what we can see and measure in the world
is merely the superficial and imperfect representation of an
underlying reality.
                -- S.J. Gould, "The Mismeasure of Man"