Re: [PyMOL] Managing Viewport Location
Thank you for noticing my sending mistake, Takanori. This import os, __main__, wx os.environ['PYMOL_PATH'] = C:\Python27\PyMOL pyMolX=300 pyMolY=500 __main__.pymol_argv = [ 'pymol', -qxX,pyMolX,-Y,pyMolY] # Quiet, no ext GUI, pos(pyMolX,pyMolY) import pymol, pymol.cmd pymol.finish_launching() pymol.cmd.load(water.pdb) ...fixes the problem with initial values, but I have yet to find a way to deal with freezing after cmd.window() calls on Windows. I noticed that manually inputting cmd.window('position',x=100,y=200) in the external GUI or internal command line does not cause freezing. Is there a way to pass a string to the PyMOL interpreter externally with python? -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb___ 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] Managing Viewport Location
Hi, import os, __main__, time os.environ['PYMOL_PATH'] = C:\Python27\PyMOL __main__.pymol_argv = [ 'pymol', -qx] # Quiet and no GUI import pymol pymol.finish_launching() pymol.cmd.load(water.pdb) time.sleep(1) pymol.cmd.window(position, 500, 300) ...in Python, Pymol freezes. If I remove the sleep command, it freezes before even displaying the test water molecules. I couldn't reproduce it. On my Ubuntu with PyMOL 1.5.0.1 Python 2.7, your script works just fine. As I don't use Windows version of PyMOL, I cannot test more. Best regards, Takanori Nakane -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ 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] Managing Viewport Location
Is it possible to control the screen location of the viewport during run time through the API? Currently I am using... import os, wx, __main__ app = wx.App() os.environ['PYMOL_PATH'] = C:\Python27\PyMOL __main__.pymol_argv = [ 'pymol', -qx] # Quiet and no GUI import pymol pymol.finish_launching() app.MainLoop() ...to load PyMol without the external GUI in quiet mode. I tried passing -qxX 30Y 50 in argv, but that change causes PyMol to load forever, also that would only give control over the initial position if it worked. -- Wilson Omesiete School of Biochemistry Georgia Institute of Technology -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb___ 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] Managing Viewport Location
Hi Wilson, The following works for me: # put the PyMOL window at 100,100 on startup ./pymol -X 100 -Y 100 I don't think we can programmatically move the OpenGL window once it's started up, however. On MacOS X 10.8 and the windowing system overrides these values; Linux and Windows should operate correctly. Cheers, -- Jason On Fri, Feb 8, 2013 at 4:04 PM, Wilson Omesiete womesi...@gmail.com wrote: Is it possible to control the screen location of the viewport during run time through the API? Currently I am using... import os, wx, __main__ app = wx.App() os.environ['PYMOL_PATH'] = C:\Python27\PyMOL __main__.pymol_argv = [ 'pymol', -qx] # Quiet and no GUI import pymol pymol.finish_launching() app.MainLoop() ...to load PyMol without the external GUI in quiet mode. I tried passing -qxX 30Y 50 in argv, but that change causes PyMol to load forever, also that would only give control over the initial position if it worked. -- Wilson Omesiete School of Biochemistry Georgia Institute of Technology -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ 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 -- Jason Vertrees, PhD Director of Core Modeling Product Management Schrödinger, Inc. (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb___ 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] Managing Viewport Location
Hi, I don't think we can programmatically move the OpenGL window once it's started up, however. What about cmd.window()? For example, cmd.window(position, 500, 300) It worked fine on Ubuntu. help window says DESCRIPTION window controls the visibility of PyMOL's output window USAGE window [ action [, x [, y [, width [, height ] NOTES This command is not fully implemented in MacPyMOL. PYMOL API cmd.window(string action, int x, int y, int width, int height) action is one of the following, judging from the error message. box, fit, hide, position, size, defocus, focus, maximize, show Best regards, Takanori Nakane -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ 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