[PyMOL] Get Protein Dimension
Dear all I found that PyMOL offer the cmd.get_extent('protein') function, which returns the dimensions of the selection. Is it complicated to make this function available from within an ordinary Pythonscript? Thanks for hints. Martin -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Get Protein Dimension
On 04/26/2011 01:40 PM, Martin Hediger wrote: Dear all I found that PyMOL offer the cmd.get_extent('protein') function, which returns the dimensions of the selection. Is it complicated to make this function available from within an ordinary Pythonscript? what do you mean with ordinary Pythonscript? Either your script is called by PyMOL directly (with pymol -cqr yourscript.py), or you have set up PYTHONPATH, PYMOL_PATH and PYMOL_DATA, run python and launch the PyMOL process within the script. Maybe these pages will help: http://pymolwiki.org/index.php/Launching_From_a_Script http://pymolwiki.org/index.php/Python_Integration Cheers, Thomas -- Thomas Holder MPI for Developmental Biology -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Get Protein Dimension
Hi Martin, The following works for me, although I needed to change 'protein' to 'polymer'. Is 'protein' normally supported as a selection? It doesn't seem to be in 1.4.1. from pymol import cmd cmd.fetch('1rx1') a = cmd.get_extent('polymer') print a is,a Hope that helps, -Michael On Tue, Apr 26, 2011 at 7:40 AM, Martin Hediger ma@bluewin.ch wrote: Dear all I found that PyMOL offer the cmd.get_extent('protein') function, which returns the dimensions of the selection. Is it complicated to make this function available from within an ordinary Pythonscript? Thanks for hints. Martin -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Get Protein Dimension
you can write your own loop in python to implement the function. fh = open(pdbfilename) coords = numpy.array([[float(line[30:38]),float(line[38:46]),float(line[46:54])] for line in fh.readlines() if line.startswith('ATOM ') or line.startswith('HETATM')]) fh.close() extent = (numpy.min(coords,axis=0), numpy.max(coords,axis=0)) or course the code needs to be tuned if you need only the first MODEL or only the first alternate position etc. cheers,hongbo On 04/26/2011 01:40 PM, Martin Hediger wrote: Dear all I found that PyMOL offer the cmd.get_extent('protein') function, which returns the dimensions of the selection. Is it complicated to make this function available from within an ordinary Pythonscript? Thanks for hints. Martin -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi Harry, If they've been combined using the group command, you can ungroup them: fetch 1rx1 # make some distance objects dist measure01, 19/C, 20/C dist measure02, 20/C, 21/C dist measure03, 158/C, 159/C dist measure04, 157/C, 159/C # group them group g1, measure01 or measure02 group g2, measure03 or measure04 #ungroup all of them (this leaves empty groups, which you can delete if you'd like) ungroup measure* Hope that helps, -Michael On Tue, Apr 26, 2011 at 5:47 AM, Harry Jubb hj...@cam.ac.uk wrote: Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi, Harry, I am curious. How do you merge objects resulting from distance ? Do you mean to group them? If so, you can use ungroup command to, well, ungroup them. But if the merged object is generated using a CGO, I doubt you can unmerge the CGO object. But I don't know dash CGOs, either. (Unless you make dashes using small line fragments :) So do you have dashes or solid lines? Do you see a plus sign before the object in PyMOL? hongbo On 04/26/2011 11:47 AM, Harry Jubb wrote: Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi Harry, As far as I know, this is not currently possible in PyMOL, but perhaps someone will correct me on this. -Michael On Tue, Apr 26, 2011 at 9:27 AM, Harry Jubb hj...@cam.ac.uk wrote: Hi Michael, Thank you for your response. The problem is that for types of inter-molecular interaction all of the visual distances are merged into one object in the sidebar (as if created using the measurement wizard with the merge with previous option on), for which unfortunately the ungroup command doesn't seem to work for. Left-clicking on the interaction type in the GUI sidebar toggles show/hide for every distance of that interaction type, and there are no further disclosure squares which indicates that the distances are grouped rather than merged. Ideally I'd like to be able to un-merge these objects to make each dash an object that I can hide or show individually so I can switch off the ones not connected to a residue of interest. Even better (if possible) would be to only show dashes connected to a residue of choice. I hope that makes sense. Thank you for your help, Harry On 26 Apr 2011, at 13:59, Michael Lerner wrote: Hi Harry, If they've been combined using the group command, you can ungroup them: fetch 1rx1 # make some distance objects dist measure01, 19/C, 20/C dist measure02, 20/C, 21/C dist measure03, 158/C, 159/C dist measure04, 157/C, 159/C # group them group g1, measure01 or measure02 group g2, measure03 or measure04 #ungroup all of them (this leaves empty groups, which you can delete if you'd like) ungroup measure* Hope that helps, -Michael On Tue, Apr 26, 2011 at 5:47 AM, Harry Jubb hj...@cam.ac.uk wrote: Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) --- Harry Jubb Part II Biochemistry Homerton College UTN: 131 2726 M: 0790 813 4735 -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi Harry, For measures (distances, angles, dihedrals), PyMOL can color down to the level of an object (eg. color blue, measure01). So, once you add another measure into an extant object, PyMOL cannot separate those two colors. My suggestion is that you measure into new objects if you need new coloring. If you have lots of measurements as a result, then you can group them and color by wildcard. Cheers, -- Jason On Tue, Apr 26, 2011 at 5:47 AM, Harry Jubb hj...@cam.ac.uk wrote: Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi Michael, Thank you for your response. The problem is that for types of inter-molecular interaction all of the visual distances are merged into one object in the sidebar (as if created using the measurement wizard with the merge with previous option on), for which unfortunately the ungroup command doesn't seem to work for. Left-clicking on the interaction type in the GUI sidebar toggles show/hide for every distance of that interaction type, and there are no further disclosure squares which indicates that the distances are grouped rather than merged. Ideally I'd like to be able to un-merge these objects to make each dash an object that I can hide or show individually so I can switch off the ones not connected to a residue of interest. Even better (if possible) would be to only show dashes connected to a residue of choice. I hope that makes sense. Thank you for your help, Harry On 26 Apr 2011, at 13:59, Michael Lerner wrote: Hi Harry, If they've been combined using the group command, you can ungroup them: fetch 1rx1 # make some distance objects dist measure01, 19/C, 20/C dist measure02, 20/C, 21/C dist measure03, 158/C, 159/C dist measure04, 157/C, 159/C # group them group g1, measure01 or measure02 group g2, measure03 or measure04 #ungroup all of them (this leaves empty groups, which you can delete if you'd like) ungroup measure* Hope that helps, -Michael On Tue, Apr 26, 2011 at 5:47 AM, Harry Jubb hj...@cam.ac.uk wrote: Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) --- Harry Jubb Part II Biochemistry Homerton College UTN: 131 2726 M: 0790 813 4735 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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] openGL/GLEW problems when embedding a PyMOL instance in a PyQt4 widget
Dear pymol user and developer community I am trying to embed a pymol2.PyMOL instance in a PyQt4 widget. I am using the latest beta v1.4.1 (although it still says v1.4.0 in layer0/Version.h, I assume you just forgot to update?). I use ubuntu on a macbook. I got it to display a black window inside a PyQt4 app, and I was even able to produce som ugly little white square H atoms one time, plus som menus only half visible. Yes, kind of strange. The problem is openGL related. When typing pymol -v at the command line, it tells me that my openGL version is pre 2.0, which is not true. (Well, actually I wasn't entirely sure what precisely to look for in the synaptic package manager, but libqt4-opengl is v4:4.7.0, python-opengl is v3.0.1, python-qt4-gl is v4.7.4, freeglut3-dev is v2.6.0, libglew1.5-dev is, well v1.5.2 glutg3-dev is 3.7-25) Anyway, when I runt the following code (which may also contain the source of the problem, I don't know): class PymolQWidget(QGLWidget): def __init__(self, parent=None): QGLWidget.__init__(self, parent=parent) self.pymolInstance = pymol2.PyMOL() self.pymolInstance.start() self.pymolInstance.cmd.load('home-directory/GUI/H2.pdb')' self.pymolInstance.cmd.draw() self.pymolInstance.cmd.show_as(sticks) app = QtGui.QApplication(sys.argv) pymolWidget = PymolQWidget() pymolWidget.show() sys.exit(app.exec_()) I get the following error message: ShaderMgrInit-Error: Could not initialize GLEW:Missing GL version which means that GLEW_OK!=err at line 145 in layer0/ShaderMgr.c, which means the glew hasn't been initialized, which is as far as I was able to get. Needless to say, help would be greatly appreaciated. Best, Kasper Thofte University of Copenhagent -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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] openGL/GLEW problems when embedding a PyMOL instance in a PyQt4 widget
Dear pymol user and developer community I am trying to embed a pymol2.PyMOL instance in a PyQt4 widget. I am using the latest beta v1.4.1 (although it still says v1.4.0 in layer0/Version.h, I assume you just forgot to update?). I use ubuntu on a macbook. I got it to display a black window inside a PyQt4 app, and I was even able to produce som ugly little white square H atoms one time, plus som menus only half visible. Yes, kind of strange. The problem is openGL related. When typing pymol -v at the command line, it tells me that my openGL version is pre 2.0, which is not true. (Well, actually I wasn't entirely sure what precisely to look for in the synaptic package manager, but libqt4-opengl is v4:4.7.0, python-opengl is v3.0.1, python-qt4-gl is v4.7.4, freeglut3-dev is v2.6.0, libglew1.5-dev is, well v1.5.2 glutg3-dev is 3.7-25) Anyway, when I runt the following code (which may also contain the source of the problem, I don't know): class PymolQWidget(QGLWidget): def __init__(self, parent=None): QGLWidget.__init__(self, parent=parent) self.pymolInstance = pymol2.PyMOL() self.pymolInstance.start() self.pymolInstance.cmd.load('home-directory/GUI/H2.pdb')' self.pymolInstance.cmd.draw() self.pymolInstance.cmd.show_as(sticks) app = QtGui.QApplication(sys.argv) pymolWidget = PymolQWidget() pymolWidget.show() sys.exit(app.exec_()) I get the following error message: ShaderMgrInit-Error: Could not initialize GLEW:Missing GL version which means that GLEW_OK!=err at line 145 in layer0/ShaderMgr.c, which means the glew hasn't been initialized, which is as far as I was able to get. Needless to say, help would be greatly appreaciated. Best, Kasper Thofte University of Copenhagent -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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] Get Protein Dimension
Thanks for the feedback. Yes, the idea was to expose the PyMOL function to Python. I'll check out the relevant pages mentioned. On 26.04.11 14:52, Hongbo Zhu wrote: you can write your own loop in python to implement the function. fh = open(pdbfilename) coords = numpy.array([[float(line[30:38]),float(line[38:46]),float(line[46:54])] for line in fh.readlines() if line.startswith('ATOM ') or line.startswith('HETATM')]) fh.close() extent = (numpy.min(coords,axis=0), numpy.max(coords,axis=0)) or course the code needs to be tuned if you need only the first MODEL or only the first alternate position etc. cheers,hongbo On 04/26/2011 01:40 PM, Martin Hediger wrote: Dear all I found that PyMOL offer the cmd.get_extent('protein') function, which returns the dimensions of the selection. Is it complicated to make this function available from within an ordinary Pythonscript? Thanks for hints. Martin -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] Hiding individual dash/distance objects within a merged-dash object
Hi Jason, Thanks for your response. The colouring is all correct as there is an object for each interaction type, the problem now is splitting the measures back into single objects, which Dr Lerner has mentioned is not currently possible. If this is the case I will try to refine my figures another way, the main objective was to selectively hide all the dashes except for those connected to a residue of interest purely for clarity of presentation. Thanks once more, Harry On 26 Apr 2011, at 15:50, Jason Vertrees wrote: Hi Harry, For measures (distances, angles, dihedrals), PyMOL can color down to the level of an object (eg. color blue, measure01). So, once you add another measure into an extant object, PyMOL cannot separate those two colors. My suggestion is that you measure into new objects if you need new coloring. If you have lots of measurements as a result, then you can group them and color by wildcard. Cheers, -- Jason On Tue, Apr 26, 2011 at 5:47 AM, Harry Jubb hj...@cam.ac.uk wrote: Hi Everyone, I'd like to ask for some help with dash/distance objects. I have PyMOL session files which show inter-molecular interactions using PyMOL distance objects. These were created using a script which colours each distance object and merges them according to type of interaction. The problem I'm having is that I would prefer to visualise the interactions on a per-residue basis, i.e. showing all the interactions for one or more residues but not the others, but as the dashes are merged by interaction type I can only hide by that category. Extensive Googling has not led me to a solution to select and hide individual dashes that are merged into one UI object, so I'd like to ask if it is possible to do this? I'm unfortunately no longer able to run the script again (I am at the end of a time limited project and am preparing figures) and I would prefer not to replace each dash manually. I hope this is clear, the crux of what I am asking is if it is possible to select and/or hide individual distance objects in a pymol session after they have been merged into one object. Un-merging them would also be an attractive solution. Thanks, Harry -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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 PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 --- Harry Jubb Part II Biochemistry Homerton College UTN: 131 2726 M: 0790 813 4735 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ 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] openGL/GLEW problems when embedding a PyMOL instance in aPyQt4 widget
Kasper, not sure if this will help you, but I think the GLEW stuff was added recently in V1.4.x and it seems to be still somewhat experimental. May be to get you started you could switch to v1.3r1 from the repository and try to embedd that version. V1.3.x should not contain the new GL stuff. Good luck Carsten From: Kasper Thofte [mailto:kasper.tho...@gmail.com] Sent: Tuesday, April 26, 2011 10:34 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] openGL/GLEW problems when embedding a PyMOL instance in aPyQt4 widget Dear pymol user and developer community I am trying to embed a pymol2.PyMOL instance in a PyQt4 widget. I am using the latest beta v1.4.1 (although it still says v1.4.0 in layer0/Version.h, I assume you just forgot to update?). I use ubuntu on a macbook. I got it to display a black window inside a PyQt4 app, and I was even able to produce som ugly little white square H atoms one time, plus som menus only half visible. Yes, kind of strange. The problem is openGL related. When typing pymol -v at the command line, it tells me that my openGL version is pre 2.0, which is not true. (Well, actually I wasn't entirely sure what precisely to look for in the synaptic package manager, but libqt4-opengl is v4:4.7.0, python-opengl is v3.0.1, python-qt4-gl is v4.7.4, freeglut3-dev is v2.6.0, libglew1.5-dev is, well v1.5.2 glutg3-dev is 3.7-25) Anyway, when I runt the following code (which may also contain the source of the problem, I don't know): class PymolQWidget(QGLWidget): def __init__(self, parent=None): QGLWidget.__init__(self, parent=parent) self.pymolInstance = pymol2.PyMOL() self.pymolInstance.start() self.pymolInstance.cmd.load('home-directory/GUI/H2.pdb')' self.pymolInstance.cmd.draw() self.pymolInstance.cmd.show_as(sticks) app = QtGui.QApplication(sys.argv) pymolWidget = PymolQWidget() pymolWidget.show() sys.exit(app.exec_()) I get the following error message: ShaderMgrInit-Error: Could not initialize GLEW:Missing GL version which means that GLEW_OK!=err at line 145 in layer0/ShaderMgr.c, which means the glew hasn't been initialized, which is as far as I was able to get. Needless to say, help would be greatly appreaciated. Best, Kasper Thofte University of Copenhagent -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ 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