Re: [PyMOL] Rotate protein to align principal axes

2016-09-01 Thread #YEO JINGJIE#
Hi Spencer,

Thank you very much for the script! I'll test it out right away.

Best,
JJ

On 1 Sep 2016, at 10:31 AM, Spencer Bliven 
> wrote:

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.

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# 
> 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. 
> wrote:

Hi Jingjie -

The `orient` command does this, 
although you can't specify which axis.  However, when combined with 
`turn` or 
`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# 
> 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


**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

Re: [PyMOL] Rotate protein to align principal axes

2016-09-01 Thread Spencer Bliven
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
.

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#  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. 
> wrote:
>
> Hi Jingjie -
>
> The `orient ` command does
> this, although you can't specify which axis.  However, when combined with `
> turn ` or `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#  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

Re: [PyMOL] Rotate protein to align principal axes

2016-09-01 Thread #YEO JINGJIE#
I think I've answered my own question:
https://sourceforge.net/p/pymol/mailman/message/27824450/

Thanks a lot Jared!

On 1 Sep 2016, at 9:47 AM, #YEO JINGJIE# 
> 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. 
> wrote:

Hi Jingjie -

The `orient` command does this, 
although you can't specify which axis.  However, when combined with 
`turn` or 
`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# 
> 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

Re: [PyMOL] Pymol Command window not displaying

2016-09-01 Thread Thomas Holder
Hi Srikanth,

Is your custom Python installation properly set up with the custom Tcl/Tk 
installation? Does the following work and open a Tk window?

shell> /app/python/intel/2.7.12/bin/python # path guessed
python> import Tkinter
python> Tkinter.Tk()

If not, then I think you need to set TCL_LIBRARY and/or TK_LIBRARY environment 
variables first.

Hope that helps.

Cheers,
  Thomas

On 31 Aug 2016, at 00:46, Srikanth Gumma  wrote:

> Hi,
> 
> I recently installed pymol from source using python-2.7.12 in my cluster. I 
> have to install python, tcl in a non standard location as this is a cluster. 
> 
> After successful installation of pymol, I'm facing an issue while opening 
> pymol. I'm not able to see pymol command window, and receiving the below 
> error on the console. 
> 
> PyMOL(TM) Molecular Graphics System, Version 1.8.2.0.
>  Copyright (c) Schrodinger, LLC.
>  All Rights Reserved.
> 
> Created by Warren L. DeLano, Ph.D.
> 
> PyMOL is user-supported open-source software.  Although some versions
> are freely available, PyMOL is not in the public domain.
> 
> If PyMOL is helpful in your work or study, then please volunteer
> support for our ongoing efforts to create open and affordable scientific
> software by purchasing a PyMOL Maintenance and/or Support subscription.
> 
> More information can be found at "http://www.pymol.org;.
> 
> Enter "help" for a list of commands.
> Enter "help " for information on a specific command.
> 
>  Hit ESC anytime to toggle between text and graphics.
> 
>  Detected OpenGL version prior to 2.0. Shaders and volumes unavailable.
>  OpenGL graphics engine:
>   GL_VENDOR:   Intel
>   GL_RENDERER: Intel(R) HD Graphics 4600
>   GL_VERSION:  1.4 (4.0.0 - Build 9.18.10.3272)
> Traceback (most recent call last):
>   File "/app/python/intel/pymol/lib/python/pmg_tk/__init__.py", line 35, in 
> run
> PMGApp(pymol_instance,skin).run(poll)
>   File "/app/python/intel/pymol/lib/python/pmg_tk/PMGApp.py", line 323, in 
> __init__
> self.root = Tk() # creates the root window for the application
>   File "/app/python/intel/2.7.12/lib/python2.7/lib-tk/Tkinter.py", line 1815, 
> in __init__
> self.tk = _tkinter.create(screenName, baseName, className, interactive, 
> wantobjects, useTk, sync, use)
> TclError: invalid command name "tcl_findLibrary"
>  Detected 24 CPU cores.  Enabled multithreaded rendering.
> 
> 
> Appreciate any help to resolve the issue. 
> 
> -srikanth

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


--
___
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] Rotate protein to align principal axes

2016-09-01 Thread #YEO JINGJIE#
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. 
> wrote:

Hi Jingjie -

The `orient` command does this, 
although you can't specify which axis.  However, when combined with 
`turn` or 
`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# 
> 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