From: Andrés Morales (h.andres.m1986_at_gmail.com)
Date: Thu Nov 24 2011 - 02:14:02 CST

Dear VMD users:
I am trying to to replace the coordinates of a selections with other
coordinates I calculated before. The new coordinates were calculated using
an specific matrix I defined before.
I am using the following protocol:
proc change {sel M} {

 foreach atom [$sel get index] {
  set pos [lindex [[atomselect top "index $atom"] get {x y z}] 0]
  lvarpush newpos [coordtrans [transtranspose $M] $pos]
 }
 $sel set $newpos
 }

When I use this protocol with somethin like : change $sel $A,
I get the mistake: can't read "x": no such variable

Does anybody know how can I solve it?
Any suggestions?

Thanks

Andres