From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Sun Apr 07 2013 - 11:17:13 CDT

On Sun, Apr 7, 2013 at 5:31 PM, Mohan maruthi sena
<maruthi.sena_at_gmail.com> wrote:
> Hi all,
> Generally to find the center of protein in vmd we use the
> following commands,
> set sel [atomselect top all]
> set mat [measure center $sel] , if we want to move this
> center to some other point x,y,z . How can we do this in vmd. I have tried
> using option trans
> but , the center of protein is not exactly coinciding with (x,y,z). The
> protein is lying close to x,y,z. I have used the following options
> set sel [atomselect top protein]
> set cen { x, y, z } to move protein current center to this desired
> point center.
> set mat [ trans offset $cen]
> $sel moveby $mat.
>
> please suggest me a way to move current protein center to desired protein
> center (x,y,z)

this is *elementary* vector algebra (from grade school):
- compute the distance vector between the computed center and the
desired location
- translate all (selected) coordinates by this vector.
- pay attention to the order of how you compute the distance vector,
or else you'll move the atoms in the wrong direction.

axel.

> Thank you.

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.