From: Buz Barstow <buzb@ma...> - 2008-01-25 21:55:32
I'm looking for an algorithm that will allow me to derive a
transformation matrix that superimposes one set of orthogonal vectors
onto another set of orthogonal vectors, that I can then use to
transform another set of orthogonal vectors.
Thanks! and all the best,
To my opinion, this is not the best place for your question. Pymol is
a molecular viewer...
But the question itself is basically trivial from the linear algebra
point of view.
If X is your source set of orthogonal vectors and Y is the target,
then you should have some sort of matrix R to satisfy
Y = RX
But, since it should only be a rotation, you'll first have to
transform X and Y to their orthonormal counterparts N and M:
M = RN
R = MN^-1
If both sets are of equal dimensions (and full rank), there's an exact
solution. Otherwise, there's a bit more trouble...
So, taking your favourite language with the proper linear algebra
package, it comes down to:
normalize X -> N
normalize Y -> M
multiply M with the inverse of N
By the way, you're probably dealing with 3x3 matrices here (molecules
in cartesian space), in which case the routines are simple enough to
write down yourself (I believe these were even in the array.py I
posted like two days ago).
Hope it helps,
On Jan 25, 2008 10:55 PM, Buz Barstow <buzb@...> wrote:
> Dear All,
> I'm looking for an algorithm that will allow me to derive a
> transformation matrix that superimposes one set of orthogonal vectors
> onto another set of orthogonal vectors, that I can then use to
> transform another set of orthogonal vectors.
> Thanks! and all the best,
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> PyMOL-users mailing list
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
3584 CH Utrecht