Re: [chimera-dev] Chimera-dev Digest, Vol 98, Issue 1

Le 04/06/12 21:00, chimera-dev-request@cgl.ucsf.edu a écrit :
Message: 2 Date: Mon, 04 Jun 2012 15:28:27 +0200 From: ladam <ladam@smbh.univ-paris13.fr> To: chimera-dev@cgl.ucsf.edu Subject: [chimera-dev] Rotating about an axis with mouse Message-ID: <4FCCB7FB.5060709@smbh.univ-paris13.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 -- -------------------------------- Patrick Ladam Ma?tre de Conf?rence Universit? Paris 13 - UFR SMBH CSPBAT - Service RMN 74, rue Marcel Cachin 93017 Bobigny Cedex Tel: 01 48 38 73 25 Fax: 01 48 38 77 77 mail: ladam@smbh.univ-paris13.fr ------------------------------- ------------------------------ Message: 4 Date: Mon, 4 Jun 2012 09:04:03 -0700 From: Elaine Meng <meng@cgl.ucsf.edu> To: ladam <ladam@smbh.univ-paris13.fr> Cc: chimera-dev@cgl.ucsf.edu, "chimera-users@cgl.ucsf.edu BB" <chimera-users@cgl.ucsf.edu> Subject: Re: [chimera-dev] Rotating about an axis with mouse Message-ID: <1A06A067-7C81-49D0-B154-D1CC50737764@cgl.ucsf.edu> Content-Type: text/plain; charset=iso-8859-1 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/constra...> (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

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
Le 04/06/12 21:00, chimera-dev-request@cgl.ucsf.edu a écrit :
Message: 2 Date: Mon, 04 Jun 2012 15:28:27 +0200 From: ladam <ladam@smbh.univ-paris13.fr> To: chimera-dev@cgl.ucsf.edu Subject: [chimera-dev] Rotating about an axis with mouse Message-ID: <4FCCB7FB.5060709@smbh.univ-paris13.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 -- -------------------------------- Patrick Ladam Ma?tre de Conf?rence Universit? Paris 13 - UFR SMBH CSPBAT - Service RMN 74, rue Marcel Cachin 93017 Bobigny Cedex Tel: 01 48 38 73 25 Fax: 01 48 38 77 77 mail: ladam@smbh.univ-paris13.fr ------------------------------- ------------------------------ Message: 4 Date: Mon, 4 Jun 2012 09:04:03 -0700 From: Elaine Meng <meng@cgl.ucsf.edu> To: ladam <ladam@smbh.univ-paris13.fr> Cc: chimera-dev@cgl.ucsf.edu, "chimera-users@cgl.ucsf.edu BB" <chimera-users@cgl.ucsf.edu> Subject: Re: [chimera-dev] Rotating about an axis with mouse Message-ID: <1A06A067-7C81-49D0-B154-D1CC50737764@cgl.ucsf.edu> Content-Type: text/plain; charset=iso-8859-1 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/constra...> (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
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

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/phan... 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@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/constra...> (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
participants (2)
-
ladam
-
Tom Goddard