"moveby" is a command based on "vecadd", which is used to shift
molecular coordinates in VMD.
In the following part of the tcl code, moveby generates this error:
atomselect moveby: non-numeric in vector
I wonder how this issue can be handled. I need to use the values of
some variables in "mobeby" command.
Regards,
Hanif
for {set countx 1} {$countx <= $segnum} {incr countx} {
for {set county 1} {$county <= $segnum} {incr county} {
for {set countz 1} {$countz <= $segnum} {incr countz} {
set segid P$countx$county$countz
segment $segid {
set offx [expr $countx*$driftx]
set offy [expr $county*$drifty]
set offz [expr $countz*$driftz]
$fsfg moveby {$offx $offy $offz}
$fsfg writepdb fsfg_shift_temp.pdb
pdb fsfg_shift_temp.pdb
}
coordpdb fsfg_shift_temp.pdb $segid
}
}
}
Neither "moveby" not "vecadd" are Tcl built in commands. I'm guessing that
they are furnished by your VMD program/package.
Most of us on this newsgroup do not use VMD (whatever that is) but use Tcl
for a variety of other tasks.
I suggest that you post the question to a VMD user's group or to whomever
offers VMD support.
That being said, does the following changes to your code make it work:
for {set countx 1} {$countx <= $segnum} {incr countx} {
for {set county 1} {$county <= $segnum} {incr county} {
for {set countz 1} {$countz <= $segnum} {incr countz} {
set segid P$countx$county$countz
segment $segid {
set offx [expr {$countx*$driftx}]
set offy [expr {$county*$drifty}]
set offz [expr {$countz*$driftz}]
$fsfg moveby [list $offx $offy $offz]
$fsfg writepdb fsfg_shift_temp.pdb
pdb fsfg_shift_temp.pdb
}
coordpdb fsfg_shift_temp.pdb $segid
}
}
}
--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+------------------------------------------------------------------------+
Simon