From: Axel Kohlmeyer (
Date: Wed Jul 24 2019 - 12:24:05 CDT

On Wed, Jul 24, 2019 at 12:42 PM Lara rajam <> wrote:

> Thanks for the e-mail
> I tried a TCL scripting as below
> The issue is I am not able to write the coordinate of the selection and
> the water within 5A
could any one point out where is the issue

                set num1 [$writepdb expr{$b + $a}]
this statement makes no sense at all. there is no definition of a variable
$writepdb and it has to point to some kind of function in the first place.
furthermore $a and $b variables with the names of atomselect functions and
thus as strings cannot be used in a numerical expression: "expr {$b + $a}"
would expand into something like "expr { atomselect3 + atomselect2 }" that
should cause a syntax error.

so it looks like you need to learn some more TCL and VMD scripting.


> ----- Thanks in advance

Dr. Axel Kohlmeyer
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.