[PyMOL] Get Protein Dimension

2011-04-26 Thread Martin Hediger
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 ---

Re: [PyMOL] Get Protein Dimension

2011-04-26 Thread Thomas Holder
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

Re: [PyMOL] Get Protein Dimension

2011-04-26 Thread Michael Lerner
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

[PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Harry Jubb
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 pro

Re: [PyMOL] Get Protein Dimension

2011-04-26 Thread Hongbo Zhu
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,a

Re: [PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Michael Lerner
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, measure

Re: [PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Hongbo Zhu
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.

Re: [PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Michael Lerner
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 wrote: > Hi Michael, > > Thank you for your response. The problem is that for types of > inter-molecular interaction all of the

Re: [PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Jason Vertrees
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

Re: [PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Harry Jubb
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

[PyMOL] openGL/GLEW problems when embedding a PyMOL instance in a PyQt4 widget

2011-04-26 Thread Kasper Thofte
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

[PyMOL] openGL/GLEW problems when embedding a PyMOL instance in a PyQt4 widget

2011-04-26 Thread Kasper Thofte
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

Re: [PyMOL] Get Protein Dimension

2011-04-26 Thread Martin Hediger
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

Re: [PyMOL] Hiding individual dash/distance objects within a merged-dash object

2011-04-26 Thread Harry Jubb
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 anot

Re: [PyMOL] openGL/GLEW problems when embedding a PyMOL instance in aPyQt4 widget

2011-04-26 Thread Schubert, Carsten [PRDUS]
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. Go