From: Chola Regmi (cholaregmi_at_gmail.com)
Date: Sat Jan 12 2013 - 10:23:01 CST

Thank you Grace
Your explanation make me clear about the meaning of sel and seltext
variable inside the script and how to pass them.
Chola

On Sat, Jan 12, 2013 at 2:01 AM, Grace Brannigan <
grace.brannigan_at_rutgers.edu> wrote:

> Hi Chola,
>
> The program wants just the text string that goes inside the atomselect
> command. You are passing it the whole atom selection when you use $seltext1
> and $seltext2 - i.e., you've already set them to an atom selection using
> atomselect. Then the procedure is trying to run atom select again.
>
> I am not sure if there are any conventions on whether the script-writer
> should directly pass selections, or should only pass the text and allow the
> procedure to make the selection from that text. You'll find both, I think,
> but maybe there is an official vmd standard that I'm not aware of. In any
> case, when you're using a new procedure you'll need to figure out whether
> you should pass it just the text for the selection or the selection itself.
> There are usually hints, for instance when the variable is named "seltext"
> rather than "sel" it means just the text.
>
> Hope this helps,
> Grace
>
>
> On Fri, Jan 11, 2013 at 11:19 PM, Chola Regmi <cholaregmi_at_gmail.com>wrote:
>
>> I am able to solve the problem by doing
>> sel_sel_angle_frames 0 "myfirstselection" "mysecondselection" but still
>> have no idea why it doesn't work with $seltext1 and $seltext2
>>
>>
>> On Thu, Jan 10, 2013 at 11:45 AM, Chola Regmi <cholaregmi_at_gmail.com>wrote:
>>
>>> Hi
>>> I need to find the angle between two domains of my selection from
>>> trajectory. I used the script posted by Justin Gullingsrud.*
>>> **http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/att-2279/fit_angle.tcl
>>>
>>>
>>> When I used sel_sel_angle it works fine but when I tried to use
>>> sel_sel_angle_frames I got error message as
>>> atomselect: cannot parse selection text: atomselect0
>>> I am using VMD 1.9.1 and the way I used the script is;
>>> First I loaded my psf and dcd files in vmd
>>>
>>> In vmd TkConsole I wrote
>>>
>>> source fit_angle.tcl
>>> set seltext1 [atomselect top "myfirstselection"]
>>> **set seltext2 [atomselect top "mysecondselection"]*
>>> sel_sel_angle_frames 0 $seltext1 $seltext2 // here 0 is my mol-id of
>>> top molecule
>>>
>>> then I got error:* atomselect: cannot parse selection text: atomselect0
>>>
>>> If I do sel_sel_angle $seltext1 $seltext2 I got numerical values means
>>> it works for single frame.
>>> Can any one help me?
>>> Thank you
>>>
>>> Chola Regmi
>>> Florida International University
>>> Miami, FL
>>> *
>>
>>
>>
>
>
> --
> Grace Brannigan, Ph.D.
> Assistant Professor
> Center for Computational and Integrative Biology (CCIB) &
> Department of Physics
> Rutgers University, Camden, NJ
> (856)225-6780
> www.branniganlab.org
>