<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hi Elaine, </div><div>This solved my problem, thanks a lot ! </div><div>Lara</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Elaine Meng" <meng@cgl.ucsf.edu><br><b>À: </b>"Lara Koehler" <lara.koehler@universite-paris-saclay.fr><br><b>Cc: </b>"ChimeraX Users Help" <chimerax-users@cgl.ucsf.edu><br><b>Envoyé: </b>Mercredi 9 Décembre 2020 20:51:40<br><b>Objet: </b>Re: [chimerax-users] Move model from position<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Hi Lara,<br>It may be rounding issues that cause the small differences. Instead of "move" and "turn" you can use "view matrix" to apply a matrix, but I don't know if that will prevent getting small differences. See:<br><br><http://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#matrix><br><br>Elaine<br><br>> On Dec 9, 2020, at 11:42 AM, Lara Koehler <lara.koehler@universite-paris-saclay.fr> wrote:<br>> <br>> Hi Elaine, <br>> Thanks a lot for your answer. This repetition of relative motion is exactly what I intend to do. What I am planning to do is generate a command .cxc file automatically, through a python loop for example. But before, I need to check that I am correctly positioning B with respect to A (so that I can then repeat the operation). But when I do that with the procedure I have described below (positioning B with respect to A with a fit on the one hand, and B' with respect to A with "move" and "turns" with values computed from "matrix rotation and translation" on the other end), I don't find the same result, and there is a tiny mismatch between B and B'.<br>> "measure rotation" gives me the same matrix as "fitmap", yet what I can save in a .positions file to generate this transformation several time is only the matrix rotation and translation. Do you understand my problem ? <br>> <br>> Lara<br>> <br>> De: "Elaine Meng" <meng@cgl.ucsf.edu><br>> À: "Lara Koehler" <lara.koehler@universite-paris-saclay.fr><br>> Cc: "ChimeraX Users Help" <chimerax-users@cgl.ucsf.edu><br>> Envoyé: Mercredi 9 Décembre 2020 20:26:44<br>> Objet: Re: [chimerax-users] Move model from position<br>> <br>> Note that repeated use of "view position" would just put the protein copies all in the same place as each other, not make a chain. To make a chain, you would need two copies already placed in the proper relationship *relative* to one another (say B to A), measure that relative transformation, and then apply it to subsequent copies (C to B, D to C, ...)<br>> <br>> If A and B are just copies of the same input file, I believe that "measure rotation" would give you the relative transformation. See:<br>> <http://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#rotation><br>> <br>> However, I'm not sure how you would apply that relative transformation to additional copies. It might require some matrix math.<br>> <br>> Elaine<br>> <br>> > On Dec 9, 2020, at 11:15 AM, Elaine Meng <meng@cgl.ucsf.edu> wrote:<br>> > <br>> > Dear Lara,<br>> > If I understand correctly, it is not necessary to use such an elaborate procedure or to save a positions file. Instead you could just use the "view position" command to apply the rotation/translation of one model to another model, something like:<br>> > <br>> > view position #3 sameas #2<br>> > <br>> > See:<br>> > <http://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#position><br>> > <br>> > I hope this helps,<br>> > Elaine<br>> > -----<br>> > Elaine C. Meng, Ph.D. <br>> > UCSF Chimera(X) team<br>> > Department of Pharmaceutical Chemistry<br>> > University of California, San Francisco<br>> > <br>> >> On Dec 9, 2020, at 10:48 AM, Lara Koehler <lara.koehler@universite-paris-saclay.fr> wrote:<br>> >> <br>> >> Dear chimeras users and developers,<br>> >> <br>> >> I would like to translate and rotate a model according to the rotation and translation matrix given by a fitmap. More precisely : I fit model #2 in map #1 and save the corresponding translation and rotation matrix with the save command. Then, I want to turn and move a model #3 so that it has the same position and rotation as model #2 (each correspond to the same pdb file). However, I want to do this automatically, so I need to do it from the matrix that is saved in a .positions file, and not from the (axis, axis point, rotation angle and shift along axis) values given by fitmap, but from the Matrix rotation and translation values. So far,<br>> >> - I compute the axis of rotation and the angle from the rotation matrix given by fitmap models #2 inMap #1<br>> >> - I turn #3 around this axis and angle, in coordinateSystems #1<br>> >> - I apply the translation also measured by fitmap models #2 inMap #1 to #3 (with three calls of the move command, for each axis x,y,z)<br>> >> However, there is a small gap between model #2 and model #3, whereas both should be at the exact same position. <br>> >> <br>> >> Maybe this has to do with the rotation center that is used in fitMap, but it cannot be saved in a .positions file, and I don't know how to recover it from the matrix rotation and translation given by fitmap. Do you have any idea of what I'm doing wrong, or how I could place model #3 at the same exact position as model #2 from the .positions file of model #2, and by moving and rotating model #3 ? (What I want to do then is re-apply this same transformation to build a chain of the same protein)<br>> >> Thanks,<br>> >> Lar<br>> _______________________________________________<br>> ChimeraX-users mailing list<br>> ChimeraX-users@cgl.ucsf.edu<br>> Manage subscription:<br>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br></div></div></body></html>