[chimerax-users] Move model from position

Lara Koehler lara.koehler at universite-paris-saclay.fr
Wed Dec 9 12:00:33 PST 2020


Hi Elaine, 
This solved my problem, thanks a lot ! 
Lara 


De: "Elaine Meng" <meng at cgl.ucsf.edu> 
À: "Lara Koehler" <lara.koehler at universite-paris-saclay.fr> 
Cc: "ChimeraX Users Help" <chimerax-users at cgl.ucsf.edu> 
Envoyé: Mercredi 9 Décembre 2020 20:51:40 
Objet: Re: [chimerax-users] Move model from position 

Hi Lara, 
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: 

<http://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#matrix> 

Elaine 

> On Dec 9, 2020, at 11:42 AM, Lara Koehler <lara.koehler at universite-paris-saclay.fr> wrote: 
> 
> Hi Elaine, 
> 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'. 
> "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 ? 
> 
> Lara 
> 
> De: "Elaine Meng" <meng at cgl.ucsf.edu> 
> À: "Lara Koehler" <lara.koehler at universite-paris-saclay.fr> 
> Cc: "ChimeraX Users Help" <chimerax-users at cgl.ucsf.edu> 
> Envoyé: Mercredi 9 Décembre 2020 20:26:44 
> Objet: Re: [chimerax-users] Move model from position 
> 
> 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, ...) 
> 
> If A and B are just copies of the same input file, I believe that "measure rotation" would give you the relative transformation. See: 
> <http://rbvi.ucsf.edu/chimerax/docs/user/commands/measure.html#rotation> 
> 
> However, I'm not sure how you would apply that relative transformation to additional copies. It might require some matrix math. 
> 
> Elaine 
> 
> > On Dec 9, 2020, at 11:15 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote: 
> > 
> > Dear Lara, 
> > 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: 
> > 
> > view position #3 sameas #2 
> > 
> > See: 
> > <http://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#position> 
> > 
> > I hope this helps, 
> > Elaine 
> > ----- 
> > Elaine C. Meng, Ph.D. 
> > UCSF Chimera(X) team 
> > Department of Pharmaceutical Chemistry 
> > University of California, San Francisco 
> > 
> >> On Dec 9, 2020, at 10:48 AM, Lara Koehler <lara.koehler at universite-paris-saclay.fr> wrote: 
> >> 
> >> Dear chimeras users and developers, 
> >> 
> >> 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, 
> >> - I compute the axis of rotation and the angle from the rotation matrix given by fitmap models #2 inMap #1 
> >> - I turn #3 around this axis and angle, in coordinateSystems #1 
> >> - 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) 
> >> However, there is a small gap between model #2 and model #3, whereas both should be at the exact same position. 
> >> 
> >> 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) 
> >> Thanks, 
> >> Lar 
> _______________________________________________ 
> ChimeraX-users mailing list 
> ChimeraX-users at cgl.ucsf.edu 
> Manage subscription: 
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201209/2315b6e1/attachment.html>


More information about the ChimeraX-users mailing list