Re: [PyMOL] object-specific Z-clipping
Hi Carsten e.a., > I am thinking that if it would be possible to write out the orientation > of the clipping planes/slabs as PovRay objects, they could be used as > bounding objects in PovRay. Since the placement of the clipping planes > is easily achieved in Pymol this could be done interactively. All the > user has to do is to associate clipping plane(s) with a graphics object, > place the planes and write out the corresponding PovRay code of the > object and the planes. Of course the code of the clipping objects needs > to be separate from the other stuff, so expanding the "PovRay tuple" > into (matrix,clipping,data) parts would help. > Getting it all together requires some knowledge of PovRay but examples > in the Wiki should help to get over the initial pain. > > Any thoughts on this approach? > This is actually almost trivial, since the clipping planes are stored in the view setting. Okay, it may not seem trivial if you lack experience with the Pymol/POVRay communication, and with POVRay macros. Unfortunately I don't have time now or the coming two weeks, but I'll try and put it into an easily accessible form soon. Maybe to Wiki is the right place to expand on this. For those interested, I'll add this to my pymolmacro.inc POVRay include file, which should be in the archives somewhere. Cheers, Tsjerk -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
[PyMOL] Newbie attempting to python script: ImportError: No module named _cmd
Hi, I'm trying to set up my machine to be able to run python scripts using the PyMol API, but whenever I try to import the pymol module, I get the following output: > Traceback (most recent call last): > File "/Users/lukegoodsell/Documents/Rotation 2/PDB/potentials.py", > line 9, in > import pymol > File > "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/pymol/pymol/__init__.py", > > line 438, in > import _cmd > ImportError: No module named _cmd Does anyone have any idea why this is? A search of Google and this mailing list's archive didn't turn up anything useful. My script contains only the following (as pulled from PyMol wiki, iirc): > #!/usr/bin/env python > > # Tell PyMOL we don't want any GUI features. > import __main__ > __main__.pymol_argv = [ 'pymol', '-Gi' ] > > # Importing the PyMOL module will create the window. > > import pymol > > # Call the function below before using any PyMOL modules. > > pymol.finish_launching() > > from pymol import cm I get the same error when attempting 'import pymol' from the python shell. I am running Mac OS X 10.5.6. I downloaded MacPyMol 1.1r1 from http://delsci.com/macpymol/ (the educational edition, as I am a student). My PYMOL_PATH: /Applications/PyMOLX11Hybrid.app/pymol My PYMOL_EXE: /Applications/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL My PYTHONPATH (split for easier reading): /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackates /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5.zip /System/Library/Frameworks/Python.framework/Versions/2.5/lib/pymol I copied the contents of /Applications/PyMOLX11Hybrid.app/pymol/modules to /System/Library/Frameworks/Python.framework/Versions/2.5/lib/pymol, as per my understanding of the top of __init__.py I am new to Macs, Python and the PyMol API, so the probability of a simple oversight on my part is high. I appreciate any help. -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
[PyMOL] GitHub for pymol-scripts
Dear all, yesterday I created a GitHub to collect and enlarge the scripts collection for pymol. I started to import the already posted ones from the pymolwiki.org. In my opinion this is a smooth way to maintain the code of the scripts and it is a good addition to the wiki pages. I'd like everyone to check out the repo and contribute. http://github.com/jlec/Pymol-script-repo/tree/master If you have problem with git, just mail me. Thanks justin -- Justin Lecher Institute for Neuroscience and Biophysics ISB 3 - Institute for structural biochemistry Research Centre Juelich GmbH, 52425 Juelich,Germany phone: +49 2461 61 5385 --- --- Forschungszentrum Jülich GmbH 52425 Jülich Sitz der Gesellschaft: Jülich Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498 Vorsitzende des Aufsichtsrats: MinDir'in Bärbel Brumme-Bothe Geschäftsführung: Prof. Dr. Achim Bachem (Vorsitzender), Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt, Prof. Dr. Sebastian M. Schmidt --- --- -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
[PyMOL] Vector-Based Figure Export
Hi Warren, I know that there has been some discussion on implementing a vector-based figure export. I was wondering if there were any updates on this? I think that this would be an amazing feature to have. Thanks! Sean _ Internet explorer 8 lets you browse the web faster. http://go.microsoft.com/?linkid=9655582-- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] Newbie attempting to python script: ImportError: No module named _cmd
On Fri, May 1, 2009 at 3:57 AM, Luke Goodsell wrote: > I'm trying to set up my machine to be able to run python scripts using > the PyMol API, but whenever I try to import the pymol module, I get the > following output: > . . . > I am running Mac OS X 10.5.6. I downloaded MacPyMol 1.1r1 from > http://delsci.com/macpymol/ (the educational edition, as I am a student). > My PYMOL_PATH: /Applications/PyMOLX11Hybrid.app/pymol > My PYMOL_EXE: /Applications/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL > . . . > I copied the contents of /Applications/PyMOLX11Hybrid.app/pymol/modules > to /System/Library/Frameworks/Python.framework/Versions/2.5/lib/pymol, > as per my understanding of the top of __init__.py > It's not entirely clear to me what you're trying to do, but I'm pretty certain it's guaranteed not to work. You can't just take compiled objects from inside app bundles and move them around - especially on Mac. You definitely shouldn't be installing PyMOL modules that way. If you need them available for importing by /usr/bin/python, download the open-source version from SourceForge and install it using python distutils (i.e. "python setup.py build" and so on). I just tried this and it seems to work fine - only takes about 10 minutes. -Nat -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] Newbie attempting to python script: ImportError: Nomodule named _cmd
Folks, I'll second what Nat wrote. One of the reasons PyMOL is open-source is so that outside developers can compile and use PyMOL with their own external Python interpreters without regard to what Python version, operating system, or hardware platform they are using. Practically speaking, it would be impossible for DeLano Scientific to support such degeneracy with precompiled binaries -- there are simply too many versions of Python, too many word sizes & byte orders, and too many binary-incompatible operating systems. Accordingly, our precompiled binaries embed Python and are primarily intended to serve ordinary end-users and Python-only developers who do not need to integrate with native external code libraries other than those which ship with PyMOL. PyMOL is a Python interpreter, and you can run Python scripts (with our without use of the PyMOL API) from directly within it (via run) or on the command line: pymol -qr script.py -- ...arguments... # is roughly equivalent to: pymol script.py ...arguments... That is the situation today, though we may release a PyMOL SDK in the future to address specific unmet needs on proprietary operating systems. But right now, if you're doing PyMOL-based development with native external code libraries, then (A) you should be compiling PyMOL yourself via distutils, and (B) you should be using an open-source platform, preferably Linux or FreeBSD. Of course, to the the extent that they can effectively emulate a Linux-like open-source environment, X11/Fink under Mac OS X and X11/Cygwin under Windows may also be able to compile the PyMOL open-source code, as Nat just confirmed, but with no guarantees: Although the PyMOL license is permissive, we, as a company, only target and support Linux with our Open-Source code. Cheers, Warren From: Nathaniel Echols [mailto:nathaniel.ech...@gmail.com] Sent: Friday, May 01, 2009 9:25 AM To: pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] Newbie attempting to python script: ImportError: Nomodule named _cmd On Fri, May 1, 2009 at 3:57 AM, Luke Goodsell wrote: I'm trying to set up my machine to be able to run python scripts using the PyMol API, but whenever I try to import the pymol module, I get the following output: . . . I am running Mac OS X 10.5.6. I downloaded MacPyMol 1.1r1 from http://delsci.com/macpymol/ (the educational edition, as I am a student). My PYMOL_PATH: /Applications/PyMOLX11Hybrid.app/pymol My PYMOL_EXE: /Applications/PyMOLX11Hybrid.app/Contents/MacOS/MacPyMOL . . . I copied the contents of /Applications/PyMOLX11Hybrid.app/pymol/modules to /System/Library/Frameworks/Python.framework/Versions/2.5/lib/pymol, as per my understanding of the top of __init__.py It's not entirely clear to me what you're trying to do, but I'm pretty certain it's guaranteed not to work. You can't just take compiled objects from inside app bundles and move them around - especially on Mac. You definitely shouldn't be installing PyMOL modules that way. If you need them available for importing by /usr/bin/python, download the open-source version from SourceForge and install it using python distutils (i.e. "python setup.py build" and so on). I just tried this and it seems to work fine - only takes about 10 minutes. -Nat -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] GitHub for pymol-scripts
Justin, Thank you for doing this! It is also probably also worth mentioning that Jason recently reorganized the script presentation on PyMOLWiki so as to make PyMOLWiki scripts easier to find. http://pymolwiki.org/index.php/Category:Script_Library There may be some redundancy between the two resources, but for now, let's just observe how both evolve going forward and follow the lead of users within the community. It might make sense to adopt GitHub as the preferred way obtaining, maintaining, redistributing scripts (no more clumsy copying & pasting!) with PyMOLWiki continuing to host supporting information, sample images, and other related content associated with each script. Such a divison of labor & purpose could work quite well. Cheers, Warren > -Original Message- > From: Justin Lecher [mailto:j.lec...@fz-juelich.de] > Sent: Friday, May 01, 2009 5:02 AM > To: pymol-users@lists.sourceforge.net > Subject: [PyMOL] GitHub for pymol-scripts > > Dear all, > > yesterday I created a GitHub to collect and enlarge the > scripts collection for pymol. I started to import the already > posted ones from the pymolwiki.org. > In my opinion this is a smooth way to maintain the code of > the scripts and it is a good addition to the wiki pages. I'd > like everyone to check out the repo and contribute. > > http://github.com/jlec/Pymol-script-repo/tree/master > > If you have problem with git, just mail me. > > Thanks justin > > > -- > Justin Lecher > Institute for Neuroscience and Biophysics ISB 3 - Institute > for structural biochemistry Research Centre Juelich GmbH, > 52425 Juelich,Germany > phone: +49 2461 61 5385 > > > > --- > --- > Forschungszentrum Jülich GmbH > 52425 Jülich > > Sitz der Gesellschaft: Jülich > Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498 > Vorsitzende des Aufsichtsrats: MinDir'in Bärbel Brumme-Bothe > Geschäftsführung: Prof. Dr. Achim Bachem (Vorsitzender), > Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > --- > --- > > -- > > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use > code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] object-specific Z-clipping
Carsten, I think you're on to something. So long as this rendering problem remains too hard for us to solve with PyMOL alone, probably the next best thing would be for us to figure out at least an interim PovRay or Raster3D-based process for creating such figures. Having an object-selective but non-renderable OpenGL-based clipping plane available could certainly help with that! Cheers, Warren > -Original Message- > From: Schubert, Carsten [PRDUS] [mailto:cschu...@its.jnj.com] > Sent: Thursday, April 30, 2009 1:40 PM > To: Warren DeLano; pymol-users@lists.sourceforge.net > Subject: Re: [PyMOL] object-specific Z-clipping > > Hi Warren, > > I would be interested to see the OpenGL version implemented, > despite the lack of raytracing support. In a pinch the draw > command could just be sufficient to produce a good picture. > > As for the implementation in a raytracer context I second > Tsjerk's and Harry's thoughts on the subject. Probably some > sort of PovRay based implementation would help in the > interim. What I find most challenging with that approach is > the fact that the placement of the clipping objects is > difficult to achieve in PovRay since it lacks the > interactivity of a graphics program. I.e. finding the right > cut through a protein surface when depicting a ligand in a > cut-away surface is tough. Although there are other ways to > achieve this they require some "cheating" or creative use of > Photoshop/PowerPoint to phrase it differently. > I am thinking that if it would be possible to write out the > orientation of the clipping planes/slabs as PovRay objects, > they could be used as bounding objects in PovRay. Since the > placement of the clipping planes is easily achieved in Pymol > this could be done interactively. All the user has to do is > to associate clipping plane(s) with a graphics object, place > the planes and write out the corresponding PovRay code of the > object and the planes. Of course the code of the clipping > objects needs to be separate from the other stuff, so > expanding the "PovRay tuple" > into (matrix,clipping,data) parts would help. > Getting it all together requires some knowledge of PovRay but > examples in the Wiki should help to get over the initial pain. > > Any thoughts on this approach? > > Carsten > > > > -Original Message- > > From: Warren DeLano [mailto:war...@delsci.com] > > Sent: Wednesday, April 29, 2009 10:36 PM > > To: Mankin Alexander; pymol-users@lists.sourceforge.net > > Subject: Re: [PyMOL] object-specific Z-clipping > > > > Sorry, still not done (I have made two attempts, but both failed). > > > > While OpenGL supports arbitrary clipping planes, accomplishing this > > correctly in the ray tracer is a much harder problem that one might > > think... > > > > Cheers, > > Warren > > > > > -Original Message- > > > From: Mankin Alexander [mailto:sh...@uic.edu] > > > Sent: Wednesday, April 29, 2009 6:18 AM > > > To: pymol-users@lists.sourceforge.net > > > Subject: [PyMOL] object-specific Z-clipping > > > > > > Dear all, > > > Does anyone know whether object-selective z-clipping has been > > > implemented in the newer Pymol version(s)? If not, has > anyone found > > > any solution around (since 2002 no new threads on the matter)? > > > Thanks, > > > Shura Mankin > > > > > > > > > > > > -- > - > > --- > > Register Now & Save for Velocity, the Web Performance & Operations > > Conference from O'Reilly Media. Velocity features a full day of > > expert-led, hands-on workshops and two days of sessions > from industry > > leaders in dedicated Performance & Operations tracks. Use code > vel09scf > > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > > ___ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > -- > > Register Now & Save for Velocity, the Web Performance & > Operations Conference from O'Reilly Media. Velocity features > a full day of expert-led, hands-on workshops and two days of > sessions from industry leaders in dedicated Performance & > Operations tracks. Use code vel09scf and Save an extra 15% > before 5/3. http://p.sf.net/sfu/velocityconf > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf