Jingjie, I've used a script for calculating the principal components ( https://github.com/sbliven/principal_axes). The computeprincipalaxes function returns the axes. With a bit of linear algebra you should be able to use that to get a transformation matrix to apply to the coordinates. This can be passed to Transform_selection <http://www.pymolwiki.org/index.php/Transform_selection>.
Another approach might be to use the orient command, and then use get_view to extract the view matrix. Applying the inverse of this to the coordinates should orient them along the XY axes. -Spencer On Thu, Sep 1, 2016 at 3:46 PM, #YEO JINGJIE# <jy...@e.ntu.edu.sg> wrote: > Hi Jared, > > Thank you very much for your information. However, it seems that orient > only changes the viewpoint, may I know whether it would possible to change > the coordinates accordingly and save it into a pdb? > > Best Regards, > Jingjie > > On 31 Aug 2016, at 10:16 PM, Sampson, Jared M. <jms2...@cumc.columbia.edu> > wrote: > > Hi Jingjie - > > The `orient <http://www.pymolwiki.org/index.php/Orient>` command does > this, although you can't specify which axis. However, when combined with ` > turn <http://www.pymolwiki.org/index.php/Turn>` or `rotate > <http://www.pymolwiki.org/index.php/Rotate>`, you can get the molecule > aligned in whichever orientation you prefer. E.g: > > orient myprotein > turn x, 90 > turn y, -90 > > Hope that helps. > > Cheers, > Jared > > > > On Aug 31, 2016, at 6:10 PM, #YEO JINGJIE# <jy...@e.ntu.edu.sg> wrote: > > Dear Users, > > May I know whether there are any methods in pymol to rotate a protein such > that it's longest principal axis is in a particular direction, for instance > aligned to the x-axis? > > Best Regards, > Jingjie > **Disclaimer** The sender of this email does not represent Nanyang > Technological University and this email does not express the views or > opinions of the 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 > > > > **Disclaimer** The sender of this email does not represent Nanyang > Technological University and this email does not express the views or > opinions of the 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 >
------------------------------------------------------------------------------
_______________________________________________ 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