[chimera-dev] Rotating atoms about a line
Tom Goddard
goddard at sonic.net
Thu Jun 7 11:38:25 PDT 2012
Hi Patrick,
I put example code for rotating atoms about a line on the Chimera
Python scripts web page, the file is called rotatoms.py,
http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts
I wrote a haptic Chimera extension for placing markers in density maps
with a Phantom force feedback device made by Sensable Technologies about
10 years ago.
http://www.cgl.ucsf.edu/chimera/1.2540/docs/ContributedSoftware/phantom/phantom.html
It is no longer in Chimera but here is the Python and C++ code for it
http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/Phantom
http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/_phantom
Tom
> Le 07/06/12 19:20, Tom Goddard a écrit :
>> Hi Patrick,
>>
>> Are you trying to rotate a residue about a bond? If so, Chimera
>> has specific capabilities for that, the "rotation" command
>>
>>
>> http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/rotation.html
>>
>> If you really do want to rotate a subset of a molecule's atoms about
>> a line which is not a bond I can give you a few lines of Python to do
>> that.
>>
>> Tom
>>
> Hello Tom,
> No actually I'd like to be able to rotate a residue around any given
> vector of my choice
> but not a bond. So i'll be happy to have some .py code for this as a
> start, we are
> actually trying to plug an haptic device to chimera.
>
> Patrick
>
>>
>>> Le 04/06/12 21:00, chimera-dev-request at cgl.ucsf.edu a écrit :
>>>> Hi all, I have a python script that allows me to rotate a residue
>>>> in a molecule of a desired angle around a predefined vector. Now
>>>> I'd like to be able to do this graphically with the mouse on a
>>>> selected residue. I have almost found what I want if I use the
>>>> 'Move selection' option in the 'Movement Mouse mode' but this does
>>>> rotate around the center of Mass or geometric center, not around a
>>>> vector. What I plan to do is derive the code from the corresponding
>>>> /share/MoveSelection/move.py module and try to insert a vector
>>>> instead of the center_of_rotation(self.movable_groups) but there is
>>>> maybe a better, simpler idea. Any suggestion? Thanks a lot
>>>> -- -------------------------------- Hi Patrick, If I understand
>>>> correctly, you can do what you want with "Constrained Move" (in
>>>> menu under Tools... Movement):
>>>> <http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/constrained/constrained.html>
>>>> (The purpose of "Movement Mouse Mode" is different, mainly to allow
>>>> moving subparts of a model. By default, mouse manipulation moves
>>>> whole models.) You can also specify center and axis of rotation if
>>>> using commands (turn, roll).
>>>> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html>
>>>> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/roll.html> I
>>>> hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF
>>>> Computer Graphics Lab (Chimera team) and Babbitt Lab Department of
>>>> Pharmaceutical Chemistry University of California, San Francisco On
>>>> Jun 4, 2012, at 6:28 AM, ladam wrote:
>>> Thank you for the answer Elaine,
>>> Well the "constrained move" allows me to rotate the whole model, not
>>> a selected residue in the model (which is actually what i want to do).
>>> What I would need is to use the constrained mouse rotation on a
>>> subpart of the model (a previously selected residue or set of atoms
>>> for instance).
>>> So my guess is I should start from this Constrained Move module and
>>> modify it
>>> to apply the movements to the currently selected residue or atoms.
>>> At the moment I am going throught the code to see how to do it, I'll
>>> probably need some advice later on.
>>> Thanks again
>>> Patrick
More information about the Chimera-dev
mailing list