From: surya narayanan chandrasekaran (sonofsunsurya_at_gmail.com)
Date: Fri Jul 12 2019 - 01:35:08 CDT

It worked. Thanks.

On Thu, Jul 11, 2019 at 8:14 PM Giacomo Fiorin <giacomo.fiorin_at_gmail.com>
wrote:

> Hi, this is a Tcl syntax idiosyncrasy: the braces will treat their content
> as a string literal, and prevent expanding the variable inside them. Try:
>
> $sel moveby [list 0 0 $x]
>
> Giacomo
>
> On Thu, Jul 11, 2019 at 7:13 AM surya narayanan chandrasekaran <
> sonofsunsurya_at_gmail.com> wrote:
>
>> Hi,
>> I was trying a simple for loop inside my script that need to give
>> variable to move command.
>>
>> for {set x 17.1} {$x > 8} {incr x - 1} {
>> $sel moveby {0 0 $x}
>> $sel1 writexyz Sep_$x.xyz
>> }
>>
>> But I am getting error. "atomselection moveby: translation vector can
>> only be of length 3" or
>> "atomselect moveby: non-numeric in vector"
>>
>> I tried "$x", puts, [expr $x]
>>
>> --
>> Warm regards,
>> Surya
>>
>
>
> --
> Giacomo Fiorin
> Associate Professor of Research, Temple University, Philadelphia, PA
> Research collaborator, National Institutes of Health, Bethesda, MD
> http://goo.gl/Q3TBQU
> https://github.com/giacomofiorin
>

-- 
Warm regards,
Dr. Suryanarayanan C
DST-Inspire Faculty,
Department of Chemistry,
National Institute of Technology, Trichy, India 620015.
Mobile: +91-8608908117 <089396%2008173>