From: sunyeping (sunyeping_at_aliyun.com)
Date: Mon Dec 29 2014 - 01:23:18 CST

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 10set b 20then 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