VMD-L Mailing List
From: sunyeping (sunyeping_at_aliyun.com)
Date: Mon Dec 29 2014 - 01:23:18 CST
- Next message: Josh Vermaas: "Re: the usage of measure bond"
- Previous message: Bahaa Mostafa: "Re: non-bonded interactions"
- Next in thread: Josh Vermaas: "Re: the usage of measure bond"
- Reply: Josh Vermaas: "Re: the usage of measure bond"
- Reply: Norman Geist: "AW: the usage of measure bond"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Josh Vermaas: "Re: the usage of measure bond"
- Previous message: Bahaa Mostafa: "Re: non-bonded interactions"
- Next in thread: Josh Vermaas: "Re: the usage of measure bond"
- Reply: Josh Vermaas: "Re: the usage of measure bond"
- Reply: Norman Geist: "AW: the usage of measure bond"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]