Re: [PyMOL] Moveable Camera
Hi Tom, Okay, I thought you wanted to trace out a path through space for the camera. But for your purpose, it doesn't matter how the things are defined internally. That's just a matter of representation, which can be interconverted. What you really want is to place the center of your active site at the position of the camera (which has the same effect of doing it the other way around :p). I'm not sure whether there's a shortcut to it. But you can do it manually. First center the scene on your active site, and then move the scene to set the offset from the camera to zero: center my_active_site_selection cmd.move('z',-cmd.get_view()[11]) Hope it helps... and sorry for the confusion :) Cheers, Tsjerk On Thu, May 13, 2010 at 1:28 AM, Tom Dupree t.dup...@student.unsw.edu.au wrote: Thank you everyone for giving me your time, I think I failed to explain what I am trying to do correctly/clearly...or I simply do not understand your answers, either is possible :) What I really want is to be able to explore binding sites from inside the binding site. Take a room with a couch and a lamp in it, pymol allows me to look at the room from the outside from a wide range of perspectives and angles looking in at the room, it also allows me with clipping planes to remove (from view) walls so that I can see the contents of the room. I want to be able to walk into the room and turn around in the room looking out (and to move around in that room). As far as I understand it I can use the scene commands to switch from one preset view to another which is good, but my problem is I want free movement like you have when you turn/rotate your views. A better description is a to load up the molecule and then use a no-clipping mode of a first person computer game to move through and around it. My problem is that pymol (seems) to always have a fixed point that the camera is looking at (wrt turning). It is this property that I am trying to get away from/change. Is there a way to turn the look at vector x degrees horizontal and y degrees vertical? Tom -Original Message- From: Bard, Joel [mailto:joel.b...@pfizer.com] Sent: Wednesday, 12 May 2010 11:38 PM To: Tom Dupree; pymol-users@lists.sourceforge.net Subject: RE: [PyMOL] Moveable Camera Tom- Take a look at slerpy: http://pymolwiki.org/index.php/Slerpy It was written to do exactly what you describe...and of course it is the camera that moves. The coordinates of the molecule are not changed unless you go into edit mode. Best, Joel -Original Message- From: Dupree Tom [mailto:t.dup...@student.unsw.edu.au] Sent: Tuesday, May 11, 2010 8:27 PM To: Bard, Joel; pymol-users@lists.sourceforge.net Subject: [PyMOL] Moveable Camera Hello everyone, I am trying to do something that seems a little uncommon. I wish to have a moveable camera. So instead of rotating/translating the protein/molecule/DNA I move the camera point/location and the vector that the camera points in. I wish to be able to move into the molecule and view binding pockets from the perspective of the molecule. I have tried a few web searches on this and thought I would ask everyone here if they have heard of something similar? I am currently trying to find some 3d modelling software that will load a .PDB file so that I can export it to a game engine (Unreal development kit) as a back up method if all else fails. Thanks for your time, Tom -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group Groningen Institute for Biomolecular Research and Biotechnology University of Groningen The Netherlands -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Moveable Camera
Hi all, PyMOL allows for both camera and object coordinate changes. When you use the mouse to move stuff around, that's the camera moving*--just like the 'turn' command. When you use rotate, object dragging or some of the other matrix transformation commands (fit, super, align, matrix_copy, update, etc) you are affecting the coordinates of the objects themselves. Try the following ton convince yourself: # get a protein fetch 1oky, async=0 # the original view matrix get_view # move the camera get view turn x, 90 get_view # rotate 1oky get view rotate x, 90, 1oky get_view Compare the values after turning vs rotating. This brings up another point, for large molecular assemblies, it's much faster internally to use 'turn' rather than 'rotate'. 'Turn' is simply a matrix multiplication, the other is that and storing the new coordinates back into the object. Cheers, -- Jason * -- you can move objects themselves with the mouse, but only in editing or dragging mode On Wed, May 12, 2010 at 4:27 AM, Tsjerk Wassenaar tsje...@gmail.com wrote: Hi Robert, PyMOLhelp rotate DESCRIPTION rotate can be used to rotate the atomic coordinates of a molecular object. Behavior differs depending on whether or not the object parameter is specified. snip So much for rotate. The help for turn is misleading: PyMOLhelp turn DESCRIPTION turn rotates the camera about one of the three primary axes, centered at the origin. snip It does not turn the camera, actually. It changes the orientation of the scene with respect to the camera. The effect is the same, and you can interconvert. That is the basis for the povray macros I wrote some while ago to combine things in object space with those in the pymol camera space in the exported scene. Cheers, Tsjerk On Wed, May 12, 2010 at 9:21 AM, Robert Fenwick robert.fenw...@irbbarcelona.org wrote: What is the difference between the turn and the rotate commands? On 12 May 2010, at 06:21, Tsjerk Wassenaar wrote: Hi Mike, Tom, If I'm not mistaken, it is always the camera that is moving when you rotate a molecule. Unfortunately I have to inform you that you are mistaken... In Pymol the camera is always fixed. That also means that it is not possible to have the camera fly through the protein. But there isn't really any difference with the protein flying around the camera. You can interconvert object oriented view and camera oriented view. Have a look at http://pymolwiki.org/index.php/Get_view, http://pymolwiki.org/index.php/Set_view and http://pymolwiki.org/index.php/Scene for starters. Hope it helps, Tsjerk Hello everyone, I am trying to do something that seems a little uncommon. I wish to have a moveable camera. So instead of rotating/translating the protein/molecule/DNA I move the camera point/location and the vector that the camera points in. I wish to be able to move into the molecule and view binding pockets from the perspective of the molecule. I have tried a few web searches on this and thought I would ask everyone here if they have heard of something similar? I am currently trying to find some 3d modelling software that will load a .PDB file so that I can export it to a game engine (Unreal development kit) as a back up method if all else fails. Thanks for your time, Tom -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- Michael Zimmermann Ph.D. student in Bioinformatics and Computational Biology Department of Biochemistry, Biophysics and Molecular Biology Iowa State University -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group Groningen Institute for Biomolecular Research and Biotechnology University of Groningen The Netherlands -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net R. Bryn Fenwick robert.fenw...@irbbarcelona.org Post-doctoral fellow Chemistry and Molecular Pharmacology Programme Institute for Research in Biomedicine (IRB Barcelona) Parc Científic de Barcelona Baldiri Reixac 10, 08028 Barcelona, SPAIN Tel. (+34) 9340
Re: [PyMOL] Moveable Camera
Tom- Take a look at slerpy: http://pymolwiki.org/index.php/Slerpy It was written to do exactly what you describe...and of course it is the camera that moves. The coordinates of the molecule are not changed unless you go into edit mode. Best, Joel -Original Message- From: Dupree Tom [mailto:t.dup...@student.unsw.edu.au] Sent: Tuesday, May 11, 2010 8:27 PM To: Bard, Joel; pymol-users@lists.sourceforge.net Subject: [PyMOL] Moveable Camera Hello everyone, I am trying to do something that seems a little uncommon. I wish to have a moveable camera. So instead of rotating/translating the protein/molecule/DNA I move the camera point/location and the vector that the camera points in. I wish to be able to move into the molecule and view binding pockets from the perspective of the molecule. I have tried a few web searches on this and thought I would ask everyone here if they have heard of something similar? I am currently trying to find some 3d modelling software that will load a .PDB file so that I can export it to a game engine (Unreal development kit) as a back up method if all else fails. Thanks for your time, Tom -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Moveable Camera
Thank you everyone for giving me your time, I think I failed to explain what I am trying to do correctly/clearly...or I simply do not understand your answers, either is possible :) What I really want is to be able to explore binding sites from inside the binding site. Take a room with a couch and a lamp in it, pymol allows me to look at the room from the outside from a wide range of perspectives and angles looking in at the room, it also allows me with clipping planes to remove (from view) walls so that I can see the contents of the room. I want to be able to walk into the room and turn around in the room looking out (and to move around in that room). As far as I understand it I can use the scene commands to switch from one preset view to another which is good, but my problem is I want free movement like you have when you turn/rotate your views. A better description is a to load up the molecule and then use a no-clipping mode of a first person computer game to move through and around it. My problem is that pymol (seems) to always have a fixed point that the camera is looking at (wrt turning). It is this property that I am trying to get away from/change. Is there a way to turn the look at vector x degrees horizontal and y degrees vertical? Tom -Original Message- From: Bard, Joel [mailto:joel.b...@pfizer.com] Sent: Wednesday, 12 May 2010 11:38 PM To: Tom Dupree; pymol-users@lists.sourceforge.net Subject: RE: [PyMOL] Moveable Camera Tom- Take a look at slerpy: http://pymolwiki.org/index.php/Slerpy It was written to do exactly what you describe...and of course it is the camera that moves. The coordinates of the molecule are not changed unless you go into edit mode. Best, Joel -Original Message- From: Dupree Tom [mailto:t.dup...@student.unsw.edu.au] Sent: Tuesday, May 11, 2010 8:27 PM To: Bard, Joel; pymol-users@lists.sourceforge.net Subject: [PyMOL] Moveable Camera Hello everyone, I am trying to do something that seems a little uncommon. I wish to have a moveable camera. So instead of rotating/translating the protein/molecule/DNA I move the camera point/location and the vector that the camera points in. I wish to be able to move into the molecule and view binding pockets from the perspective of the molecule. I have tried a few web searches on this and thought I would ask everyone here if they have heard of something similar? I am currently trying to find some 3d modelling software that will load a .PDB file so that I can export it to a game engine (Unreal development kit) as a back up method if all else fails. Thanks for your time, Tom -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net -- ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net