From: Sunyeping (sunyeping_at_aliyun.com)
Date: Mon Jan 05 2015 - 01:31:39 CST

Thank you.And,measure bond "$a $b"can also work. ------------------------------------------------------------------From:Norman Geist <norman.geist_at_uni-greifswald.de>Send Time:2015年1月5日(星期一) 14:50To:孙业平 <sunyeping_at_aliyun.com>Cc:vmd-l <vmd-l_at_ks.uiuc.edu>Subject:AW: vmd-l: the usage of measure bond font-family: Cambria Math;panose-1: 2 4 5 3 5 4 6 3 2 4;font-family: Calibri;panose-1: 2 15 5 2 2 2 4 3 2 4;font-family: Tahoma;panose-1: 2 11 6 4 3 5 4 4 2 4;p.MsoNormal, li.MsoNormal, div.MsoNormal {margin: 0.0cm;margin-bottom: 1.0E-4pt;font-size: 12.0pt;font-family: Times New Roman , serif;} a:link, span.MsoHyperlink {mso-style-priority: 99;color: blue;text-decoration: underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority: 99;color: purple;text-decoration: underline;} p {mso-style-priority: 99;mso-margin-top-alt: auto;margin-right: 0.0cm;mso-margin-bottom-alt: auto;margin-left: 0.0cm;font-size: 12.0pt;font-family: Times New Roman , serif;} span.E-MailFormatvorlage18 {mso-style-type: personal-reply;font-family: Calibri , sans-serif;color: #1f497d;} *.MsoChpDefault {mso-style-type: export-only;} size: 612.0pt 792.0pt;margin: 70.85pt 70.85pt 2.0cm 70.85pt;div.Section1 {page: Section1;}   Von: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] Im Auftrag von sunyeping Gesendet: Montag, 29. Dezember 2014 08:23 An: vmd-l Betreff: vmd-l: the usage of measure bond   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}   try instead:   measure bond [list $a $b]   Norman Geist ;)   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