VMD-L Mailing List
From: Jérôme Hénin (jerome.henin_at_ibpc.fr)
Date: Tue Feb 07 2017 - 08:03:21 CST
- Next message: Ashar Malik: "Re: Using variables inside Atomselect"
- Previous message: Udaya Dahal: "Using variables inside Atomselect"
- In reply to: Udaya Dahal: "Using variables inside Atomselect"
- Next in thread: Ajasja Ljubetič: "Re: Using variables inside Atomselect"
- Reply: Ajasja Ljubetič: "Re: Using variables inside Atomselect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
Tcl will not substitute variables inside braces, you should enclose the
whole string in double quotes only.
Jerome
On 7 February 2017 at 14:20, Udaya Dahal <dahal.udaya_at_gmail.com> wrote:
> Hi,
>
> This may be a naive question but I am not being able to use variable in
> the atomselect command. I feel like everything should be straight forward
> but my variable is read zero. I am using the following command in a loop.
> The command is
>
> set s 61;
> set t 63
> set op1 [llength [[atomselect top {name "OP.*" and within z<$s and z>$t}
> frame 0] get name]
>
> If i use number instead of variable $s or $t then, this command works
> fine but it i use variable it seems like z<$s or z>$t is not read so gives
> me 0 as an output. Am i missing something here? I would appreciate your
> help.
>
> Regards,
> UD,
>
- Next message: Ashar Malik: "Re: Using variables inside Atomselect"
- Previous message: Udaya Dahal: "Using variables inside Atomselect"
- In reply to: Udaya Dahal: "Using variables inside Atomselect"
- Next in thread: Ajasja Ljubetič: "Re: Using variables inside Atomselect"
- Reply: Ajasja Ljubetič: "Re: Using variables inside Atomselect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]