Hi jpd, > from the get_object_matrix output, > i can use the euler-rodrigues transformation > http://en.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula > and get the axis and angle of rotation. > > is there a way to place the axis?
if I understand you correct, you are looking for the translation T so that for object matrix M it yields: M = T * R * T^-1 With python (and numpy): from numpy import reshape, linalg, identity M = cmd.get_object_matrix(object_name) M = reshape(M, (4,4)) t = linalg.solve(identity(3) - M[0:3,0:3], M[0:3,3]) see if this is correct: from numpy import identity, matrix R = identity(4) T = identity(4) R[0:3,0:3] = M[0:3,0:3] T[0:3,3] = t # should print two times the same matrix print M print matrix(T) * matrix(R) * matrix(T).I Hope that helps. Cheers, Thomas -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen ------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ _______________________________________________ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net