From: Rebeca García Fandiño (regafan_at_hotmail.com)
Date: Wed Feb 20 2013 - 03:38:02 CST

Hi,
thanks a lot for your help. However, when I tried

set sel [atomselect top "resid 10"]
set matrix [transaxis z 45]
$sel move $matrix

I do not obtain a rotated residue around z axis, it is translated long away my main molecule...
My main molecule is a nanotube and it is aligned to principal axes.
Do you have any idea of the reason for this problem?
Thanks a lot again for your help.
Best wishes,
Rebeca.

> Date: Tue, 19 Feb 2013 17:07:23 +0100
> Subject: Re: vmd-l: rotate a selection of a molecule and write rotated coordinates
> From: akohlmey_at_gmail.com
> To: regafan_at_hotmail.com
> CC: vmd-l_at_ks.uiuc.edu
>
> On Tue, Feb 19, 2013 at 3:45 PM, Rebeca García Fandiño
> <regafan_at_hotmail.com> wrote:
> > Hello,
> > I am trying to rotate a part of an assembled molecule, consisting on several
> > residues, so I want to rotate only one of these residues, for example,
> > residue 10. I have tried different combinations:
> >
> > set sel [atomselect top "resid 10"]
> > $sel rotate z by 45
> >
> > $sel [rotate z by 45]
> >
> > $sel rotate [z by 45]
> >
> > But I always get errors.
>
> yes, because none of this is not a supported syntax. please have a look at:
> http://www.ks.uiuc.edu/Research/vmd/current/ug/node121.html
>
> > By the other hand, when I have tried to rotate the whole molecule
> >
> > set sel [atomselect top "resid 10"]
> > rotate z by 45
> >
> > It works, but when I try to write the coordinates using:
> >
> > $sel writepdb file.pdb
> >
> > they are identical to the first ones!
>
> yes, because the rotate command rotates the *view* (i.e. the camera),
> it doesn't change the coordinates. please check out:
> http://www.ks.uiuc.edu/Research/vmd/current/ug/node146.html
>
>
> what you need is:
>
> $sel move $matrix
>
> and the rotation matrix can be computed beforehand with:
>
>

>
> check out:
> http://www.ks.uiuc.edu/Research/vmd/current/ug/node191.html
>
>
> HTH,
> axel.
>
> > Please, could anyone help me to rotate a selection in a molecule and to save
> > its rotated coordinates?
>
> > Thanks a lot for your help in advance.
> >
> > Best wishes,
> >
> > Rebeca.
> >
> >
> >
> >
> > Dr Rebeca García
> > Universidad de Santiago de Compostela
> > Spain
> >
> >
>
>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
> International Centre for Theoretical Physics, Trieste. Italy.
>