VMD-L Mailing List
From: sunyeping (sunyeping_at_aliyun.com)
Date: Mon Dec 29 2014 - 20:01:36 CST
- Next message: sunyeping: "a script to count the frames in which some water molecules interact with selected protein atoms"
- Previous message: Rebecca Taylor: "Re: ribbon rendering errors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Thank you. And the commandmeasure bond "$a $b"also works.
Yeping Sun
Institute of Microbiology, Chinese Academy of Sciences
------------------------------------------------------------------发件人:Josh Vermaas <vermaas2_at_illinois.edu>发送时间:2014年12月29日(星期一) 20:27收件人:孙业平 <sunyeping_at_aliyun.com>,vmd-l <vmd-l_at_ks.uiuc.edu>主 题:Re: vmd-l: the usage of measure bond
I'd use:
measure bond [list $a $b]
-Josh Vermaas
On 12/29/14 1:23 AM, sunyeping wrote:
Dear
all,
I
want to measure the distance of two atoms by the vmd command
"measure bond". For example, the two atoms with their index
being 10 and 20 respectively. By using the command:
measure
bond {10 20}
I
can correctly get the distance between these atoms, say
1.711A. However, I don't know how the use variable to replace
the two numbers that represent the indexes of these atoms. For
example, I set the two numbers to two variable, a and b:
set
a 10
set
b 20
then
I use the command:
measure
bond {$a $b}
it
returns the following error message: expected integer but got
"$h" measure bond: bad atom index.
In
TCL language, the varialbe replacement symbol "$" can not work
in the curly brace ({ }), but measure bond definitely need the
the curly brace . So how
this conflict be solved?
Thanks
in advance!
Yeping Sun
Institute of Microbiology, Chinese Academy of Sciences
- Next message: sunyeping: "a script to count the frames in which some water molecules interact with selected protein atoms"
- Previous message: Rebecca Taylor: "Re: ribbon rendering errors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]