From: Reza Salari (resal81_at_gmail.com)
Date: Wed Jun 22 2011 - 12:50:10 CDT

Thanks. That really helped.
After some search and checking the dxplugin.c file, I wrote a script in
scilab (matlab) to rotate the axes and it seems working. I am attaching the
script below.

Reza Salari

My dx file:
...
origin 0.503 0.503 0.503
delta 1.007 0.000 0.000
delta 0.000 1.007 0.000
delta 0.000 0.000 1.007
..

and for re-orienting the x-axis for 10 degrees, I used the output of
the following script to replace numbers of the first delta line:

point=[1,0,0] angle=10delta=1.007
t=(angle/180.0)*3.14p=[ [1,0,0,point(1,1)]; [0,1,0,point(1,2)];
[0,0,1,point(1,3)]; [0,0,0,1] ]rotx=[ [1,0,0,0]; [0,cos(t),-sin(t),0];
[0,sin(t),cos(t),0];[0,0,0,1] ]roty=[ [cos(t),0,sin(t),0]; [0,1,0,0];
[-sin(t),0,cos(t),0]; [0,0,0,1] ]rotz=[ [cos(t),-sin(t),0,0,];
[sin(t),cos(t),0,0]; [0,0,1,0]; [0,0,0,1] ]
f=rotz*roty*rotx*pout=[f(1,4),f(2,4),f(3,4)]disp(out*delta)

On Wed, Jun 22, 2011 at 6:56 AM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:

> You cannot change this from within VMD, but you can edit the file
> itself and change the unit cell vectors accordingly. Axel.
>
> --
> Axel Kohlmeyer
> akohlmey_at_gmail.com
> http://goo.gl/1wk0
>
>
> On Jun 22, 2011, at 6:22, Reza Salari <resal81_at_gmail.com> wrote:
>
> > Hello all,
> >
> > I am wondering if there is a way to rotate a dx volume file using
> > the "move" command?
> >
> > If I have a pdb file, I can rotate it around the x axis by running
> > these commands:
> >
> > set prot1 [atomselect 0 "all"]
> > set M [transaxis x 20]
> > $prot1 move $M
> >
> > Now, I have two dx files that belong to the same protein but in two
> > different orientations so I want to re-align one of the dx files.
> > However if I load a dx file to VMD and try to assign it to a variable:
> >
> > set surf1 [atomselect 0 "all"]
> >
> > it fails (probably because the dx file is not a coordinate file and
> > hence atomselect doesn't work for it). I've tried a couple of
> > different options without luck. So I am wondering if it is possible
> > to select a non-coordinate object in the console, for example just
> > using its mol_id or similar attributes and not using atomselect?
> >
> > I appreciate your help in advance,
> >
> > Reza Salari
>