From: Davide Mercadante (dmer018_at_aucklanduni.ac.nz)
Date: Mon Feb 18 2013 - 09:17:25 CST

Dear Josh and Axel,
Thanks both for the great and very much appreciated help..

Thank you. The script is now working!

Cheers,
Davide

From: Josh Vermaas <vermaas2_at_illinois.edu>
Date: Monday, 18 February 2013 4:11 PM
To: Davide Mercadante <dmer018_at_aucklanduni.ac.nz>
Cc: <vmd-l_at_ks.uiuc.edu>
Subject: Re: vmd-l: Spring script not working

    
 Hi Davide,
 
 I've never used spring.tcl myself, but what the error message indicates is
that two variables aren't set. Normally, the line:
 
global vmd_pick_atom vmd_pick_mol
 would load in the global variables vmd_pick_atom and vmd_pick_mol, and
you'd be happily on your way. However I believe that atomselections do not
set these variables, and so you are getting an error. Happily, there are two
ways of setting these variables: "Picking" an atom, and setting the
variables by hand. Picking an atom is done with the pick tool (not an
atomselection), which can be found under the Mouse heading of the VMD main
window (it has P as its shortcut). This will set many variables via a TCL
callback (see http://www.ks.uiuc.edu/Research/vmd/current/ug/node156.html if
you are curious). Setting it by hand is also possible. For your example
inputs, this will work.
 
 source spring.tcl
 set vmd_pick_atom 5
 set vmd_pick_mol 0
 spring
 
 You can change the appearance of the spring by editing the appropriate
variables at the top of spring.tcl
 
 Best of luck!
 -Josh Vermaas
   
On 02/18/2013 07:26 AM, Davide Mercadante wrote:
 
 
>
> Dear All,
>
>
>
>
> Please accept my apologies if I am rising a stupid issue. I am trying to run
> the spring.tcl script available in the VMD-script library without any success
> so far and I am not able to understand what I am doing wrong.
>
> I successfully source the script with the command source script.tcl (the
> script is placed in the same DIR of the pdb file).
>
>
>
>
> Then I perform an atom selection for the atom where I want the spring to be
> drawn using the following command:
>
>
>
>
> atomselect 0 "index 5"
>
>
>
>
> And I get as a result of that an atom selection called atomselect0.
>
>
>
>
> Then I try to recall the proc spring that is in the spring.tcl file (the
> procedure doesn't seem to have any argument spring {} ). However, I get the
> following error:
>
>
>
>
> can't read "vmd_pick_mol": no such variable
>
>
>
>
> I think I am specifying the atomselection but somehow I am missing the
> molecule selection? In the atomselect command the "0" is to define molid 0, so
> why the script doesn't pick up the vmdpickmol variable?
>
> Apart from the atomselect command do I need to issue any additional command
> before calling the script?
>
>
>
>
> Thank you very much for your help.
>
>
>
>
> Cheers,
>
> Davide
>
>
>
>
>
> **********************************************
>
> Davide Mercadante Ph.D.
>
> Postdoctoral Fellow
>
> Heidelberg Institute for Theoretical Studies HITS
>
> Schloss-Wolfsbrunnenweg, 35
>
> D-69118 Heidelberg, Germany.
>
> **********************************************
>
>
>
>
>
>
>
>
>
>