## Re: [PyMOL] rotate about an abitrary axis

 Re: [PyMOL] rotate about an abitrary axis From: Siv Midtun Hollup - 2007-06-25 10:58:52 Attachments: coordinateOperations.py ```Hi, I understood the question a little differently than Andreas, and I have a different answer to you. If what you want to do is to be able to define your own x, y and z axis and rotate about them, I can help you. I've made a script that will make a transformation matrix that can be input to transform_selection(). This will enable you to choose the x, y and z axis yourself, and after you've performed transform_selection(), you can rotete about your newly defined x, y and z axis using the rotate command as you would normally do. I'm including the script along with an example of a run here, so you can see how it works. Basically, you have to choose three atoms, given with a selection string each, and these three atoms will form a 2D plane. From the unit vectors the z axis can also be computed, and thus a transformation matrix can be generated. Note that transform_selection() is currently unsupported, so I don't know if this script will work through newer versions of Pymol. Also, I made this script purely for myself, so it doesn't contain alot of error checking :) Hope this helps! Example of usage: PyMOL>import coordinateOperations PyMOL>a = "r. CLA and i. 612 and n. C1B" PyMOL>b = "r. CLA and i. 612 and n. CHA" PyMOL>c = "r. CLA and i. 612 and n. C4C" PyMOL>matrix = coordinateOperations.getTransformationMatrix(a, b, c) PyMOL>m_list = coordinateOperations.listOfTransformationMatrix(matrix) PyMOL>cmd.transform_selection("all", m_list) Cheers, Siv On 2007-06-24 16:07:00, Andreas Henschel wrote: > you define a rotation axis by the rotation axis x, y or z (first > argument in cmd.rotate) and a point in 3d (origin argument in cmd.rotate). > Instead of rotations around axes that are not parallel to the x, y or z > axis you can do composite rotations. > > Btw, for the case of GroEL (PDB 2c7e), the structure is oriented along > the Z axis, so you can flap the flexible regions with a single rotation > around the axis that goes through the regions center of mass and is > parallel to the z-axis. > See the attached file. > > repeat the last rotate command from the gray window > cmd.rotate("z", 30, "flexregion", camera=0, origin=rotationCenter) > > Minh Nhat wrote: > >Hi everyone, > >Is it possible to make a selection rotate about an arbitrary axis > >(which we can actively define ourself (not x,y, z) ?) > >Thanks, > > > >Send instant messages to your online friends > >http://uk.messenger.yahoo.com > > > >------------------------------------------------------------------------ > > > >------------------------------------------------------------------------- > >This SF.net email is sponsored by DB2 Express > >Download DB2 Express C - the FREE version of DB2 express and take > >control of your XML. No limits. Just data. Click to get it now. > >http://sourceforge.net/powerbar/db2/ > >------------------------------------------------------------------------ > > > >_______________________________________________ > >PyMOL-users mailing list > >PyMOL-users@... > >https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > -- > Andreas Henschel > Bioinformatics Group > TU Dresden > Tatzberg 47-51 > 01307 Dresden, Germany > > Phone: +49 351 463 40063 > EMail: ah@... > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Siv Midtun Hollup PhD Student Dept. of Informatics University of Bergen, Norway sivh@... (NOTE: new email adress) - Blessed are the flexible, for they can be tied into knots. - ```

 [PyMOL] rotate about an abitrary axis From: Minh Nhat - 2007-06-22 18:56:16 Attachments: Message as HTML ```Hi everyone, Is it possible to make a selection rotate about an arbitrary axis (which we can actively define ourself (not x,y, z) ?) Thanks, Send instant messages to your online friends http://uk.messenger.yahoo.com ```
 Re: [PyMOL] rotate about an abitrary axis From: Andreas Henschel - 2007-06-24 14:07:03 Attachments: minhLocalRotationGroEL.py ```Hi Minh, you define a rotation axis by the rotation axis x, y or z (first argument in cmd.rotate) and a point in 3d (origin argument in cmd.rotate). Instead of rotations around axes that are not parallel to the x, y or z axis you can do composite rotations. Btw, for the case of GroEL (PDB 2c7e), the structure is oriented along the Z axis, so you can flap the flexible regions with a single rotation around the axis that goes through the regions center of mass and is parallel to the z-axis. See the attached file. repeat the last rotate command from the gray window cmd.rotate("z", 30, "flexregion", camera=0, origin=rotationCenter) hope that makes sense. Minh Nhat wrote: > Hi everyone, > Is it possible to make a selection rotate about an arbitrary axis > (which we can actively define ourself (not x,y, z) ?) > Thanks, > > Send instant messages to your online friends > http://uk.messenger.yahoo.com > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users > -- Andreas Henschel Bioinformatics Group TU Dresden Tatzberg 47-51 01307 Dresden, Germany Phone: +49 351 463 40063 EMail: ah@... ```
 Re: [PyMOL] rotate about an abitrary axis From: Siv Midtun Hollup - 2007-06-25 10:58:52 Attachments: coordinateOperations.py ```Hi, I understood the question a little differently than Andreas, and I have a different answer to you. If what you want to do is to be able to define your own x, y and z axis and rotate about them, I can help you. I've made a script that will make a transformation matrix that can be input to transform_selection(). This will enable you to choose the x, y and z axis yourself, and after you've performed transform_selection(), you can rotete about your newly defined x, y and z axis using the rotate command as you would normally do. I'm including the script along with an example of a run here, so you can see how it works. Basically, you have to choose three atoms, given with a selection string each, and these three atoms will form a 2D plane. From the unit vectors the z axis can also be computed, and thus a transformation matrix can be generated. Note that transform_selection() is currently unsupported, so I don't know if this script will work through newer versions of Pymol. Also, I made this script purely for myself, so it doesn't contain alot of error checking :) Hope this helps! Example of usage: PyMOL>import coordinateOperations PyMOL>a = "r. CLA and i. 612 and n. C1B" PyMOL>b = "r. CLA and i. 612 and n. CHA" PyMOL>c = "r. CLA and i. 612 and n. C4C" PyMOL>matrix = coordinateOperations.getTransformationMatrix(a, b, c) PyMOL>m_list = coordinateOperations.listOfTransformationMatrix(matrix) PyMOL>cmd.transform_selection("all", m_list) Cheers, Siv On 2007-06-24 16:07:00, Andreas Henschel wrote: > you define a rotation axis by the rotation axis x, y or z (first > argument in cmd.rotate) and a point in 3d (origin argument in cmd.rotate). > Instead of rotations around axes that are not parallel to the x, y or z > axis you can do composite rotations. > > Btw, for the case of GroEL (PDB 2c7e), the structure is oriented along > the Z axis, so you can flap the flexible regions with a single rotation > around the axis that goes through the regions center of mass and is > parallel to the z-axis. > See the attached file. > > repeat the last rotate command from the gray window > cmd.rotate("z", 30, "flexregion", camera=0, origin=rotationCenter) > > Minh Nhat wrote: > >Hi everyone, > >Is it possible to make a selection rotate about an arbitrary axis > >(which we can actively define ourself (not x,y, z) ?) > >Thanks, > > > >Send instant messages to your online friends > >http://uk.messenger.yahoo.com > > > >------------------------------------------------------------------------ > > > >------------------------------------------------------------------------- > >This SF.net email is sponsored by DB2 Express > >Download DB2 Express C - the FREE version of DB2 express and take > >control of your XML. No limits. Just data. Click to get it now. > >http://sourceforge.net/powerbar/db2/ > >------------------------------------------------------------------------ > > > >_______________________________________________ > >PyMOL-users mailing list > >PyMOL-users@... > >https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > -- > Andreas Henschel > Bioinformatics Group > TU Dresden > Tatzberg 47-51 > 01307 Dresden, Germany > > Phone: +49 351 463 40063 > EMail: ah@... > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Siv Midtun Hollup PhD Student Dept. of Informatics University of Bergen, Norway sivh@... (NOTE: new email adress) - Blessed are the flexible, for they can be tied into knots. - ```
 Re: [PyMOL] rotate about an abitrary axis From: DeLano Scientific - 2007-06-26 23:46:28 Attachments: Message as HTML ```Minh, This type of use is now covered under the "rotate" command in the official documentation for PyMOL 1.0 ( http://delsci.info/dsc ) as well as in the current open-source code. Warren -- DeLano Scientific LLC Subscriber Support Services mailto:delsci@... "Not yet a PyMOL Subscriber, but want to support the project? Email sales@... to quote your lab, school, or employer. Thank you for sponsoring this open-source endeavor!" -WLD _____ From: pymol-users-bounces@... [mailto:pymol-users-bounces@...] On Behalf Of Minh Nhat Sent: Friday, June 22, 2007 11:56 AM To: pymol-users@... Subject: [PyMOL] rotate about an abitrary axis Hi everyone, Is it possible to make a selection rotate about an arbitrary axis (which we can actively define ourself (not x,y, z) ?) Thanks, Send instant messages to your online friends http://uk.messenger.yahoo.com ```