
If I manually move and rotate the object in Chimera, how could I know the exact displacements along x, y, z and the rotation angle? Anyone has any suggestion? Thank you! Guiqing ----------------------------------------------------------------

Hi Guiqing, The "fit model in map" and "fit map in map" tools (menu Tools / Volume Data) report the relative translation and rotation of two models. But if you are not doing a fit I don't know of an easy way to get that information. There is the "matrixget" command that writes rotation and translation matrices (3 by 4 matrix) for each model but that would require some calculation to extract a rotation angle and translation. Do you want the relative orientation between two models, or just the absolute orientation of a single model on the screen? What center of rotation do you want? If you choose a different center of rotation then the displacement is different. A pretty simple Python script could give the desired information. I've attached an example script that you can open in Chimera (use File / Open) to report the relative position of two models. Tom # Chimera script to report the relative orientation of two models. # Get two models. Assumes only two are currently open. from chimera import openModels m1, m2 = openModels.list() # Calculate relative transformation. xf = m2.openState.xform xf.premultiply(m1.openState.xform.inverse()) # Print transformation to reply log. from PDBmatrices import xform_matrix from FitMap.gui import transformation_description print transformation_description(xform_matrix(xf)) # Show reply log window. from Accelerators.standard_accelerators import show_reply_log show_reply_log()

Thank you, Tom. It is good that command matrixget can fix the problem. ----------------------------------- Hi Guiqing, The "fit model in map" and "fit map in map" tools (menu Tools / Volume Data) report the relative translation and rotation of two models. But if you are not doing a fit I don't know of an easy way to get that information. There is the "matrixget" command that writes rotation and translation matrices (3 by 4 matrix) for each model but that would require some calculation to extract a rotation angle and translation. Do you want the relative orientation between two models, or just the absolute orientation of a single model on the screen? What center of rotation do you want? If you choose a different center of rotation then the displacement is different. A pretty simple Python script could give the desired information. I've attached an example script that you can open in Chimera (use File / Open) to report the relative position of two models. Tom ----------------------------------------------------------------
participants (2)
-
guiqing@mailer.sb.fsu.edu
-
Tom Goddard