Nat, I'm working on a 'smart' alignment program, hence the rotation and translation part is a subset of the work. (The part that's written thus far is the Kabsch algorithm for optimal alignment of two sets of points of vectors).
I've uploaded the complete script, but what you want is the part towards the end, which answers your question, summarized here. (I'll skip the lesson and just post the code.) Given a 3x3 matrix, U; and, the translation vector, T2; and, a vector of 3D points, v; do: stored.mol2 = map(lambda \ v:[T2[0]+((v[0]*U[0][0])+(v[1]*U[1][0])+(v[2]*U[2][0])), \ T2[1]+((v[0]*U[0][1])+(v[1]*U[1][1])+(v[2]*U[2][1])), \ T2[2]+((v[0]*U[0][2])+(v[1]*U[1][2])+(v[2]*U[2][2]))], \ stored.mol2) Or FinalPoint = TranslationVector + (3DVector * 3x3RotationMatrix). If I recall correctly, you need to rotate the points to origin to avoid an affine operation. The Kabsch algorithm in Python is at: http://www.pymolwiki.org/index.php/Kabsch HTH, -- Jason On Thu, 2005-08-18 at 18:26 -0700, pymol-users-requ...@lists.sourceforge.net wrote: > Message: 4 > Date: Wed, 17 Aug 2005 18:03:09 -0700 (PDT) > From: Nat Echols <ech...@uclink.berkeley.edu> > To: pymol-users@lists.sourceforge.net > Subject: [PyMOL] applying matrices to objects > > > Is there a simple tool for taking a rotation and translation matrix - > in > this case, the BIOMT records from a PDB file - and applying it to an > object? Doesn't necessarily have to be in PyMOL; a simple > script/program > would do. > > thanks, > Nat -- Jason Vertrees (javer...@utmb.edu) BSCB Graduate Student @ UTMB, Galveston http://www.bscb.utmb.edu :: BSCB @ UTMB http://best.utmb.edu :: B.E.S.T. @ UTMB http://pymolwiki.org :: PyMol Wiki