[PyMOL] Path problem when running a script
Hi, I'm trying to run the align_all.py script (http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/align_all.py) in PyMol running on Linux. I've put the script in /opt/pymol/scripts, and in my .pymolrc file, I have the following: sys.path.append(/opt/pymol/scripts) and if I print sys.path in the pymol command line, I get the following: PyMOLprint sys.path ['', '/opt/pymol/modules', '/opt/pymol/ext/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg', '/opt/pymol/ext/lib/python2.5/site-packages/simplejson-2.0.5-py2.5-linux-i686.egg', '/opt/pymol/ext/lib/python25.zip', '/opt/pymol/ext/lib/python2.5', '/opt/pymol/ext/lib/python2.5/plat-linux2', '/opt/pymol/ext/lib/python2.5/lib-tk', '/opt/pymol/ext/lib/python2.5/lib-dynload', '/opt/pymol/ext/lib/python2.5/site-packages', '/opt/pymol/scripts'] However, if I try running the script, I get the following: PyMOLrun align_all.py Traceback (most recent call last): File /home/vertrees/work/products/pymol/edu_build/dist/pymol/./modules/pymol/parser.py, line 338, in parse File /opt/pymol/modules/pymol/parsing.py, line 455, in run_file execfile(file,global_ns,local_ns) IOError: [Errno 2] No such file or directory: 'align_all.py' If I run the full path to the script it works: PyMOLrun /opt/pymol/scripts/align_all.py And I can then use the command. Is there any obvious reason why it's not looking in the /opt/pymol/scripts directory, even when this is in the sys.path? Thanks, Jens -- 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] Path problem when running a script
Hi Jens, the run command is not identical to the python import statement. It does not search sys.path but takes an absolute or relative (from the current working directory) file name. Both of these will work: PyMOLrun /opt/pymol/scripts/align_all.py PyMOLimport align_all See also: http://pymolwiki.org/index.php/Run http://pymolwiki.org/index.php/Pwd Cheers, Thomas Thomas, Jens wrote, On 02/12/13 10:47: Hi, I'm trying to run the align_all.py script (http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/align_all.py) in PyMol running on Linux. I've put the script in /opt/pymol/scripts, and in my .pymolrc file, I have the following: sys.path.append(/opt/pymol/scripts) and if I print sys.path in the pymol command line, I get the following: PyMOLprint sys.path ['', '/opt/pymol/modules', '/opt/pymol/ext/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg', '/opt/pymol/ext/lib/python2.5/site-packages/simplejson-2.0.5-py2.5-linux-i686.egg', '/opt/pymol/ext/lib/python25.zip', '/opt/pymol/ext/lib/python2.5', '/opt/pymol/ext/lib/python2.5/plat-linux2', '/opt/pymol/ext/lib/python2.5/lib-tk', '/opt/pymol/ext/lib/python2.5/lib-dynload', '/opt/pymol/ext/lib/python2.5/site-packages', '/opt/pymol/scripts'] However, if I try running the script, I get the following: PyMOLrun align_all.py Traceback (most recent call last): File /home/vertrees/work/products/pymol/edu_build/dist/pymol/./modules/pymol/parser.py, line 338, in parse File /opt/pymol/modules/pymol/parsing.py, line 455, in run_file execfile(file,global_ns,local_ns) IOError: [Errno 2] No such file or directory: 'align_all.py' If I run the full path to the script it works: PyMOLrun /opt/pymol/scripts/align_all.py And I can then use the command. Is there any obvious reason why it's not looking in the /opt/pymol/scripts directory, even when this is in the sys.path? Thanks, Jens -- Thomas Holder PyMOL Developer Schrödinger Contractor -- 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] Install pymol on OSX easier than ever
Hi all This option to install pymol is great!. However, I tried to install it in my 10.8.2 with xquartz intalled and it was crashing. For it to run well, you need to enable threads, do: brew uninstall tcl brew uninstall tk brew uninstall python brew install tk --enable-threads brew install tcl --enable-threads brew install python --with-brewed-tk -- Camilo Jiménez On Tue, Feb 12, 2013 at 10:22 AM, Derek Ashley Thomas derekatho...@gmail.com wrote: Dear all, We just got pymol into the popular package manager for OSX, homebrew. To install pymol on with brew, just run the following two commands (% stands for the shell prompt and should not be typed in: % brew tap homebrew/science % brew install pymol That's it, you should be on your way to using pymol soon after the installation finishes. Also, this installation switches the stereo/mono graphics paradigm. Recent builds of OSX with intel chips seem to crash with stereo graphics. Therefore, pymol defaults assumes the -M flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the -S flag. Alternatively, you can install pymol with original stereo graphics on as default by installing with brew install pymol --default-stereo Hope this helps bring pymol to more people! Best Regards, Derek Thomas -- 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 -- 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] freeglut error
There should be No asterixs. I tried to mark the part in bold via email. best 2013/2/12 mark m.r...@5-cent.us On 02/11/13 09:30, Troels Emtekær Linnet wrote: Hi. Well, I don't know really what you wan't, but I remember pain with graphics and computers. :-) I see the same error (X Error of failed request) when I get a kernel update to my CentOS comp. That screws up my NVIDIA driver installation, pymol fails, and I have to reinstall the driver package. Nope, not needed. I had not updated the system before the pymol package was installed - it did come as a package from a standard repository. The term LIBGL_ALWAYS_INDIRECT=1, is controlling something with which method draws the window. By OpenGL or by the mesa driver. (Something like that). The OpenGL is super fast, and mesa driver is slow. Yeah, it appears to definitely be freeglut. In googling, I found several references to a variable or function name change. snip If this can help, our execution script for pymol is: --**--** -- [tlinnet@tomat pymolsvn]$ cat pymolMPEG.sh #!/bin/bash if [ ! -f $HOME/.local/share/**applications/pymolsvn.desktop ]; then ln -s /ourlab/software/pymolsvn/**pymolsvn.desktop $HOME/.local/share/**applications/pymolsvn.desktop fi export FREEMOL=/ourlab/software/**pymolsvn/svnfreemol/freemol export PYMOL_GIT_MOD=/ourlab/**software/pymolsvn/Pymol-**script-repo/modules export PYTHONPATH=$PYTHONPATH:/**ourlab/software/x64/lib64/** python2.6/site-packages/PIL export PYTHONPATH=$PYTHONPATH:/**ourlab/software/x64/lib64/** python2.6/site-packages/lib-tk export PYTHONPATH=$PYTHONPATH:/**ourlab/software/x64/lib64/** python2.6/site-packages/lib-**dynload export PYTHONPATH=/ourlab/software/**pymolsvn/Pymol-script-repo/** modules:$PYTHONPATH export PYTHONPATH=/ourlab/software/**pymolsvn/Pymol-script-repo:$** PYTHONPATH export LD_LIBRARY_PATH=$LD_LIBRARY_**PATH:/ourlab/software/x64/lib/**pymollib *export LIBGL_ALWAYS_INDIRECT=no* /usr/bin/python /ourlab/software/pymolsvn/**modules/pymol/__init__.py $@ snip I'll look at that tomorrow. One thing I question: why are there asterisks around the export LIBGL_ALWAYS_INDIRECT? mark -- 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] Install pymol on OSX easier than ever
Thanks Camilo! You're absolutely right that it needs python and TK with those options. Sorry that I forgot that. That being said, it should not have installed pymol without those packages. I suggest you run brew updatebefore installing. Also, if you run brew install tk --enable-threads it should automatically install TCL with threads too. Best, Derek Thomas On Wed, Feb 13, 2013 at 2:21 AM, Camilo Andrés Jimenez Cruz camilo.jimen...@gmail.com wrote: Hi all This option to install pymol is great!. However, I tried to install it in my 10.8.2 with xquartz intalled and it was crashing. For it to run well, you need to enable threads, do: brew uninstall tcl brew uninstall tk brew uninstall python brew install tk --enable-threads brew install tcl --enable-threads brew install python --with-brewed-tk -- Camilo Jiménez On Tue, Feb 12, 2013 at 10:22 AM, Derek Ashley Thomas derekatho...@gmail.com wrote: Dear all, We just got pymol into the popular package manager for OSX, homebrew. To install pymol on with brew, just run the following two commands (% stands for the shell prompt and should not be typed in: % brew tap homebrew/science % brew install pymol That's it, you should be on your way to using pymol soon after the installation finishes. Also, this installation switches the stereo/mono graphics paradigm. Recent builds of OSX with intel chips seem to crash with stereo graphics. Therefore, pymol defaults assumes the -M flag has been passed to it. You can switch to stereo graphics (if you know it won't crash your computer) with the -S flag. Alternatively, you can install pymol with original stereo graphics on as default by installing with brew install pymol --default-stereo Hope this helps bring pymol to more people! Best Regards, Derek Thomas -- 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 -- 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 -- 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] freeglut error
Troels Emtekær Linnet wrote: There should be No asterixs. 2013/2/12 mark m.r...@5-cent.us On 02/11/13 09:30, Troels Emtekær Linnet wrote: snip I see the same error (X Error of failed request) when I get a kernel update to my CentOS comp. That screws up my NVIDIA driver installation, pymol fails, and I have to reinstall the driver package. It's not screwed up, you have a new kernel, with different entry points. Reinstalling the driver means rebuilding it. You *might* want to look at kmod-nvidia from elrepo. I believe that rebuilds automagically. snip The term LIBGL_ALWAYS_INDIRECT=1, is controlling something with which method draws the window. By OpenGL or by the mesa driver. (Something like that). The OpenGL is super fast, and mesa driver is slow. Very odd: if I export LIBGL_ALWAYS_INDIRECT, glxgears fails. If I set it to *anything* - yes, no, 1, 0, glxgears *works*. However, pymol fails, always. As I said at the beginning of this thread, it's very aggravating, since I can run it on other people's workstations, but *not* on this server. This is interesting. I just installed pymol on another headless server, and it won't run on *that*, either. snip Btw, the script doesn't help, since a) it looks for a desktop icon; b) it sets up git and svn environments, and then does the export with LIBGL_ALWAYS_INDIRECT. Thanks, anyway. mark -- 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