From: Nicolas Sapay (nicolas.sapay_at_cermav.cnrs.fr)
Date: Tue Nov 03 2009 - 05:07:45 CST

Hello Nuno,

The -args option is employed to pass arguments to a script via the argv
variable. This means that $argv = {"::Script::File"}. At that point,
"::Script::File" is just a value stored in a variable, not a TCL
command. If you want to execute a TCL script, you can use:

    vmd -dispdev text -e file.tcl
    vmd -dispdev text -eofexit < file.tcl

If your script requires user-defined arguments, you can use:

    vmd -dispdev text -e file.tcl -args -option1 value1 -option2 value2 ...
    vmd -dispdev text-eofexit < file.tcl -args -option1 value1 -option2
    value2 ...

Regards,
Nicolas

Nuno Sousa Cerqueira a écrit :
> Hello,
>
> I have a analysis script that I use very often with VMD. The script
> is under a namespace and does several calculations that freezes VMD
> interface (and takes a long time). Therefore I am trying to run it
> using the VMD shell.
>
> To run the script I have something like:
>
> ::Script::Shell File
>
>
> where File is a file that is required for the calculation.
>
>
> I am trying to use the VMD shell option using the following command
>
>
> vmd -dispdev text -args "::Script::Shell File"
>
> but it does not give me the desired results. The VMD runs, but the
> proc ::Script::Shell File does not start.
> If I open VMD (vmd -dispdev text) and I write ::Script::Shell File,
> it works fine.
>
> Does anyone has a workaround for this issue.
>
>
> Regards, Nuno
>