Re: [Jmol-users] apply matrix to 3D coords

2007-05-11 Thread Bob Hanson
Why does it matter what the exact translation is -- the exact origin? Why not just arbitrarily assign (0,0,0) to A0'? Bob Timothy Driscoll wrote: >On May 11, 2007, at 2:09 PM, Bob Hanson wrote: > > > >>>original >>> ATOM 1ATOM 2d(2-1)M*d >>>x 3.95 3.86 -0.08 -1.25

Re: [Jmol-users] apply matrix to 3D coords

2007-05-11 Thread Timothy Driscoll
On May 11, 2007, at 2:09 PM, Bob Hanson wrote: >> original >> ATOM 1ATOM 2d(2-1)M*d >> x 3.95 3.86 -0.08 -1.25 >> y 38.05 36.58 -1.48 0.59 >> z 17.44 17.32 -0.11 0.53 >> >> >> transformed >> ATOM 1ATOM 2d(2-1) >> x 52.94 51.69

Re: [Jmol-users] apply matrix to 3D coords

2007-05-11 Thread Bob Hanson
I think you've got it now. Timothy Driscoll wrote: > >original > ATOM 1ATOM 2d(2-1)M*d >x 3.95 3.86 -0.08 -1.25 >y 38.05 36.58 -1.48 0.59 >z 17.44 17.32 -0.11 0.53 > > >transformed > ATOM 1ATOM 2d(2-1) >x 52.94 51.69 -1.25 >y

Re: [Jmol-users] apply matrix to 3D coords

2007-05-11 Thread Timothy Driscoll
On May 11, 2007, at 7:46 AM, Bob Hanson wrote: > what you will need to know are two points in each case, not one. What > you don't know or aren't figuring in is the possibility that the > origin > has been shifted. Rotation requires a center. Maybe it's (0,0,0), > maybe > not. In Jmol what we

Re: [Jmol-users] apply matrix to 3D coords

2007-05-11 Thread Bob Hanson
what you will need to know are two points in each case, not one. What you don't know or aren't figuring in is the possibility that the origin has been shifted. Rotation requires a center. Maybe it's (0,0,0), maybe not. In Jmol what we have to do is: 1) apply a translation to set the "center of

Re: [Jmol-users] apply matrix to 3D coords

2007-05-10 Thread Timothy Driscoll
On May 11, 2007, at 1:37 AM, Bob Hanson wrote: > See if by any chance going the other way works -- from the verified > coordinates to the original. If that's the case, then you need the > inverse of this matrix. > > yeah, I've been trying stuff like this, kinda haphazardly, without luck. for ex

Re: [Jmol-users] apply matrix to 3D coords

2007-05-10 Thread Bob Hanson
See if by any chance going the other way works -- from the verified coordinates to the original. If that's the case, then you need the inverse of this matrix. Timothy Driscoll wrote: >On May 10, 2007, at 3:54 PM, Bob Hanson wrote: > > >>This is always a royal pain to get right. Certainly lo

Re: [Jmol-users] apply matrix to 3D coords

2007-05-10 Thread Bob Hanson
give us a hint -- a couple of initial coordinates, a couple of final coordinates, the matrix Bob Timothy Driscoll wrote: >On May 10, 2007, at 3:54 PM, Bob Hanson wrote: > > >>This is always a royal pain to get right. Certainly looks like a >>rotation matrix to me. >>It's got the right for

Re: [Jmol-users] apply matrix to 3D coords

2007-05-10 Thread Timothy Driscoll
On May 10, 2007, at 3:54 PM, Bob Hanson wrote: > This is always a royal pain to get right. Certainly looks like a > rotation matrix to me. > It's got the right form. My guess is you put the vector on the > right and > multiply as: > > x' = m11*x + m12*y + m13*z > > across the top row of that matr

Re: [Jmol-users] apply matrix to 3D coords

2007-05-10 Thread Bob Hanson
This is always a royal pain to get right. Certainly looks like a rotation matrix to me. It's got the right form. My guess is you put the vector on the right and multiply as: x' = m11*x + m12*y + m13*z across the top row of that matrix. Likewise for y' across the second. Does that not work? Bo

[Jmol-users] apply matrix to 3D coords

2007-05-10 Thread Timothy Driscoll
hi, I have two structures that I have aligned using a program called MUSTANG. the program gives me a 3x3 transformation matrix like this one: 0.58 0.805 0.125 0.521-0.484 0.703 0.626-0.342 -0.7 in order to superimpose my second structure onto the