[PyMOL] Dials revisited
Does anyone still have the software / scripts required to make SGI dials box work with Pymol? I found an old thred back in 2004 but all the links are dead. Dials may not be necessary, but as I have some lying around doing nothing, I¹d very much like to apply them to Pymol (especially as my SGI has no wheel mouse). Pparently SGI dials can be adapted to work on a PC, so if you find a dials box it could come in handy. Gary The original pymol-users message can be found here: http://sourceforge.net/mailarchive/message.php?msg_id=4ABE591494FF5246B38C0C DA4CBFAFE80154BE4A%40exchange4.slac.stanford.edu Prof. Gary J. Hunter, Department of Physiology and Biochemistry, University of Malta, Msida, MSD 06, Malta. phone: +356 2340 2917 phone: +356 21316655 (secretary), Fax: +356 21310577
Re: [PyMOL] Making transparent boxes with colored surfaces?
Hi Dean, The first issue I haven't encountered yet. I can't really say where that's coming from. As for the second issue, that is a known glitch. Pymol (at least up to 0.99rc6) has a problem with multiple transparencies in ray-tracing. If you really need it, you can export the scene to povray, which will allow you to build complex scenes with multiple transparent objects. This may be the same issue as losing the shaded face between two boxes. There it may help to define each plane uniquely, rather than placing two boxes with the faces coinciding. Or you can try to add a little bit of space between the boxes. But I should add that I haven't tried these things yet. By the way, I also bounce this mail the pymol user list, so that others may add their comments and/or can learn from it. Best, Tsjerk On Thu, Apr 24, 2008 at 3:41 PM, Dean Waldow wal...@chem.plu.edu wrote: Tsjerk, Thanks, perhaps that might related to other things I have noticed I have noticed some oddities (which I think I can work around) when I place multiple boxes next to each other and then do a ray. Have you seen anything like these and not that I expect you to have the answers... :) I thought I would mention them in case you have seen them. I'm using .99r6 I think. 1) Looking through one of the middle boxes molecules in there get a 'snow' look if the color settings are 1 but when I most the color settings a little lower than 1 that seems to got away. 2) One other obj (spheroid) which I had set at transparent disappears when viewed through a transparent box after issuing the ray command. 3) Also when I issue the ray command, I can't see the shadowed boundary between boxes like I can before before the ray command. Thanks again. I really appreciate the tips! Dean On Apr 24, 2008, at 2:21 AM, Tsjerk Wassenaar wrote: Hi Dean, Good that it works. I suspect the only real difference is the use of ALPHA, which sets the transparency. Do mind the position of the ALPHA keyword and it's value, as these are important. Best, Tsjerk On Wed, Apr 23, 2008 at 8:08 PM, Dean Waldow wal...@chem.plu.edu wrote: Hi Tsjerk, It works Great! Thanks so much. I'll have to study your code to see where I was going wrong. Dean On Apr 23, 2008, at 10:39 AM, Tsjerk Wassenaar wrote: Hi Dean, Funny, really. Last week I was just playing around a bit with creating boxes in pymol, e.g. to create a bounding box, and I wanted to have it transparent. So here's a script, giving you a function 'rect', which takes two tuples, specifying the far edges of the box: rect( [x0,y0,z0], [x1,y1,z1],name=box,rgbt=[1,1,0,0.5]) The rgbt argument specifies the color and transparency. Feel free to go through the code to see how things are done (although you won't hear me say it's perfect). In case you have any suggestions, also feel free to contact me, either on or off list. I hope it helps. Cheers, Tsjerk On Wed, Apr 23, 2008 at 5:22 PM, Dean Waldow wal...@chem.plu.edu wrote: Hi Folks, I am very new to pymol and have been learning a lot about using (mac)pymol. However, I seem to be unable to make a box which is transparent and has color. I have been able to make a box with the *.py script below but when I do the ray tracing to get a nice image the box turns to grey / black. I have also been able to to make prolate and oblate spheriods using ideas from the pymol wiki. My eventual goal is to have about three slabs or boxes with spheroids at the interface of these slabs and my pdb results from a monte carlo simulation where the spheriods highlight the changes in shape of my copolymers at the interface. Has anyone succeeded in making colored transparent boxes? Or might there be another strategy? Thanks, Dean Waldow Here is the script (modified from one that makes a bounding box I believe) that makes my current solid box which turns grey with I issue the ray command: from pymol.cgo import * from pymol import cmd # # SEGMENT 1 box = [ LINEWIDTH, 1.0, BEGIN, VERTEX, COLOR, 0.0, 0.0, 0.0, # Face 1 VERTEX, 55.000, 55.000, 55.000, VERTEX, 55.000,5.000, 55.000, VERTEX, 55.000,5.000,5.000, VERTEX, 55.000,5.000,5.000, VERTEX, 55.000, 55.000,5.000, VERTEX, 55.000, 55.000, 55.000, # Face 2 VERTEX,5.000, 55.000, 55.000, VERTEX,5.000,5.000, 55.000, VERTEX,5.000,5.000,5.000, VERTEX,5.000,5.000,5.000, VERTEX,5.000, 55.000,5.000, VERTEX,5.000, 55.000, 55.000, # Face 3 VERTEX, 55.000, 55.000, 55.000, VERTEX,5.000, 55.000, 55.000, VERTEX,5.000, 55.000,5.000, VERTEX,5.000, 55.000,5.000,
[PyMOL] Problem Saving Molecules from batch mode
Hi I'm writing a short script to use pymol to generate ideal alpha helices out of arbitrary sequences. I use a short script, BuildHelix.py: from pymol import cmd, stored def BuildMe(sequence): cmd.set(secondary_structure,1.00) for aa in sequence: cmd._alt(string.lower(aa)) cmd.save(sequence+.pdb) cmd.extend( BuildMe, BuildMe ) I can then run this from the gui prompt, or in interactive mode without the gui without issue, as follows: run BuildHelix.py BuildMe(A) quit However, as I want to use this in an automated way, I have been trying this command: echo 'run BuildHelix.py\nBuildMe(A)\nquit\n)' | pymol -xpic This works intermittently, roughly 1 in 3 or 4 times. Adding cmd.sync() lines to either the script or the command doesn't change the results. However, if I use the command quit() (rather than quit), pymol crashes with an error in threading.py and the file is correctly written out. The error given is PyMOLquit() Traceback (most recent call last): File /var/lib/python-support/python2.5/pymol/parser.py, line 456, in parse exec(layer.com2+\n,self.pymol_names,self.pymol_names) File string, line 1, in module File site.py, line 256, in __call__ raise SystemExit(code) SystemExit: None Exception in thread Thread-1: Traceback (most recent call last): File threading.py, line 460, in __bootstrap self.run() File threading.py, line 440, in run self.__target(*self.__args, **self.__kwargs) File /var/lib/python-support/python2.5/pymol/parser.py, line 500, in stdin_reader l = sys.stdin.readline() ValueError: I/O operation on closed file I'm running version 1.0re1, though I have also tested with 0.98. Any advice would be much appreciated. Thanks in advance Ben Hall
Re: [PyMOL] Making transparent boxes with colored surfaces?
Pymol (at least up to 0.99rc6) has a problem with multiple transparencies in ray-tracing. That's news to me. Combination of multiple transparent surfaces is indeed broken in the OpenGL viewer up into 1.x. However, the ray tracer has been able to do this almost since the beginning. The thing is, with PyMOL, you get to choose whether or not you see multiple transparent layers. Given the geometric intricacy of molecular surfaces, it is often preferable to only see the front-most transparent surface, so that is the default behavior: set transparency_mode, 2 If, instead, you want to render all transparent layers: set transparency_mode, 1 If you want increased contrast when rendering: set ray_transparency_contrast, 1.5 If you want to factor in surface normals: set ray_transparency_oblique, 1.1 If you don't want transparent surfaces casting a shadow: set ray_transparency_shadow, 0 If you don't want any shadows at all: set ray_shadow, 0 Cheers, Warren If you really need it, you can export the scene to povray, which will allow you to build complex scenes with multiple transparent objects. This may be the same issue as losing the shaded face between two boxes. There it may help to define each plane uniquely, rather than placing two boxes with the faces coinciding. Or you can try to add a little bit of space between the boxes. But I should add that I haven't tried these things yet. By the way, I also bounce this mail the pymol user list, so that others may add their comments and/or can learn from it. Best, Tsjerk On Thu, Apr 24, 2008 at 3:41 PM, Dean Waldow wal...@chem.plu.edu wrote: Tsjerk, Thanks, perhaps that might related to other things I have noticed I have noticed some oddities (which I think I can work around) when I place multiple boxes next to each other and then do a ray. Have you seen anything like these and not that I expect you to have the answers... :) I thought I would mention them in case you have seen them. I'm using .99r6 I think. 1) Looking through one of the middle boxes molecules in there get a 'snow' look if the color settings are 1 but when I most the color settings a little lower than 1 that seems to got away. 2) One other obj (spheroid) which I had set at transparent disappears when viewed through a transparent box after issuing the ray command. 3) Also when I issue the ray command, I can't see the shadowed boundary between boxes like I can before before the ray command. Thanks again. I really appreciate the tips! Dean On Apr 24, 2008, at 2:21 AM, Tsjerk Wassenaar wrote: Hi Dean, Good that it works. I suspect the only real difference is the use of ALPHA, which sets the transparency. Do mind the position of the ALPHA keyword and it's value, as these are important. Best, Tsjerk On Wed, Apr 23, 2008 at 8:08 PM, Dean Waldow wal...@chem.plu.edu wrote: Hi Tsjerk, It works Great! Thanks so much. I'll have to study your code to see where I was going wrong. Dean On Apr 23, 2008, at 10:39 AM, Tsjerk Wassenaar wrote: Hi Dean, Funny, really. Last week I was just playing around a bit with creating boxes in pymol, e.g. to create a bounding box, and I wanted to have it transparent. So here's a script, giving you a function 'rect', which takes two tuples, specifying the far edges of the box: rect( [x0,y0,z0], [x1,y1,z1],name=box,rgbt=[1,1,0,0.5]) The rgbt argument specifies the color and transparency. Feel free to go through the code to see how things are done (although you won't hear me say it's perfect). In case you have any suggestions, also feel free to contact me, either on or off list. I hope it helps. Cheers, Tsjerk On Wed, Apr 23, 2008 at 5:22 PM, Dean Waldow wal...@chem.plu.edu wrote: Hi Folks, I am very new to pymol and have been learning a lot about using (mac)pymol. However, I seem to be unable to make a box which is transparent and has color. I have been able to make a box with the *.py script below but when I do the ray tracing to get a nice image the box turns to grey / black. I have also been able to to make prolate and oblate spheriods using ideas from the pymol wiki. My eventual goal is to have about three slabs or boxes with spheroids at the interface of these slabs and my pdb results from a monte carlo simulation where the spheriods highlight the changes in shape of my copolymers at the interface. Has anyone succeeded in making colored transparent boxes? Or might there be another strategy? Thanks, Dean Waldow Here is the script (modified from one that makes a bounding box I believe) that makes my current solid box which
Re: [PyMOL] Making transparent boxes with colored surfaces?
Woops, sorry. See, that's why it's so much better to put things on the user list :) Tsjerk On Thu, Apr 24, 2008 at 6:23 PM, DeLano Scientific del...@delsci.info wrote: Pymol (at least up to 0.99rc6) has a problem with multiple transparencies in ray-tracing. That's news to me. Combination of multiple transparent surfaces is indeed broken in the OpenGL viewer up into 1.x. However, the ray tracer has been able to do this almost since the beginning. The thing is, with PyMOL, you get to choose whether or not you see multiple transparent layers. Given the geometric intricacy of molecular surfaces, it is often preferable to only see the front-most transparent surface, so that is the default behavior: set transparency_mode, 2 If, instead, you want to render all transparent layers: set transparency_mode, 1 If you want increased contrast when rendering: set ray_transparency_contrast, 1.5 If you want to factor in surface normals: set ray_transparency_oblique, 1.1 If you don't want transparent surfaces casting a shadow: set ray_transparency_shadow, 0 If you don't want any shadows at all: set ray_shadow, 0 Cheers, Warren If you really need it, you can export the scene to povray, which will allow you to build complex scenes with multiple transparent objects. This may be the same issue as losing the shaded face between two boxes. There it may help to define each plane uniquely, rather than placing two boxes with the faces coinciding. Or you can try to add a little bit of space between the boxes. But I should add that I haven't tried these things yet. By the way, I also bounce this mail the pymol user list, so that others may add their comments and/or can learn from it. Best, Tsjerk On Thu, Apr 24, 2008 at 3:41 PM, Dean Waldow wal...@chem.plu.edu wrote: Tsjerk, Thanks, perhaps that might related to other things I have noticed I have noticed some oddities (which I think I can work around) when I place multiple boxes next to each other and then do a ray. Have you seen anything like these and not that I expect you to have the answers... :) I thought I would mention them in case you have seen them. I'm using .99r6 I think. 1) Looking through one of the middle boxes molecules in there get a 'snow' look if the color settings are 1 but when I most the color settings a little lower than 1 that seems to got away. 2) One other obj (spheroid) which I had set at transparent disappears when viewed through a transparent box after issuing the ray command. 3) Also when I issue the ray command, I can't see the shadowed boundary between boxes like I can before before the ray command. Thanks again. I really appreciate the tips! Dean On Apr 24, 2008, at 2:21 AM, Tsjerk Wassenaar wrote: Hi Dean, Good that it works. I suspect the only real difference is the use of ALPHA, which sets the transparency. Do mind the position of the ALPHA keyword and it's value, as these are important. Best, Tsjerk On Wed, Apr 23, 2008 at 8:08 PM, Dean Waldow wal...@chem.plu.edu wrote: Hi Tsjerk, It works Great! Thanks so much. I'll have to study your code to see where I was going wrong. Dean On Apr 23, 2008, at 10:39 AM, Tsjerk Wassenaar wrote: Hi Dean, Funny, really. Last week I was just playing around a bit with creating boxes in pymol, e.g. to create a bounding box, and I wanted to have it transparent. So here's a script, giving you a function 'rect', which takes two tuples, specifying the far edges of the box: rect( [x0,y0,z0], [x1,y1,z1],name=box,rgbt=[1,1,0,0.5]) The rgbt argument specifies the color and transparency. Feel free to go through the code to see how things are done (although you won't hear me say it's perfect). In case you have any suggestions, also feel free to contact me, either on or off list. I hope it helps. Cheers, Tsjerk On Wed, Apr 23, 2008 at 5:22 PM, Dean Waldow wal...@chem.plu.edu wrote: Hi Folks, I am very new to pymol and have been learning a lot about using (mac)pymol. However, I seem to be unable to make a box which is transparent and has color. I have been able to make a box with the *.py script below but when I do the ray tracing to get a nice image the box turns to grey / black. I have also been able to to make prolate and oblate spheriods using ideas from the pymol wiki. My eventual goal is to have about three slabs or boxes with spheroids at the interface of these slabs and my pdb results
[PyMOL] Keeping PDB ordering
Hi all, is there a simple way to prevent reordering of atoms and insertion of additional TER records by pymol? I have a protein embedded in a bilayer with tip4p water, where this occurs when I delete parts and export the rest of the System. Best wishes Martin
Re: [PyMOL] Keeping PDB ordering
Matrin, set retain_order before loading the input PDB file. Depending on the application, you may also wish to set pdb_retain_ids Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:del...@delsci.info -Original Message- From: pymol-users-boun...@lists.sourceforge.net [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Martin Höfling Sent: Thursday, April 24, 2008 11:13 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Keeping PDB ordering Hi all, is there a simple way to prevent reordering of atoms and insertion of additional TER records by pymol? I have a protein embedded in a bilayer with tip4p water, where this occurs when I delete parts and export the rest of the System. Best wishes Martin -- --- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java .sun.com/javaone ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] Problem Saving Molecules from batch mode
Ben, Here are two answers: A) If you absolutely need to pipe commands into PyMOL, then you should use the -K option to keep PyMOL from automatically quitting once standard input has been exhausted: echo '...;quit' | pymol -pKcq Note that the '-i' and '-x' options are superfluous with '-c'. B) However, a cleaner approach would be to run the Python script as the first argument to PyMOL followed by a -d statement. pymol -cq BuildHelix.py -d 'BuildMe(A)' Cheers, Warren -- DeLano Scientific LLC Subscriber Support Services mailto:del...@delsci.info -Original Message- From: pymol-users-boun...@lists.sourceforge.net [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Benjamin Hall Sent: Thursday, April 24, 2008 8:35 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Problem Saving Molecules from batch mode Hi I'm writing a short script to use pymol to generate ideal alpha helices out of arbitrary sequences. I use a short script, BuildHelix.py: from pymol import cmd, stored def BuildMe(sequence): cmd.set(secondary_structure,1.00) for aa in sequence: cmd._alt(string.lower(aa)) cmd.save(sequence+.pdb) cmd.extend( BuildMe, BuildMe ) I can then run this from the gui prompt, or in interactive mode without the gui without issue, as follows: run BuildHelix.py BuildMe(A) quit However, as I want to use this in an automated way, I have been trying this command: echo 'run BuildHelix.py\nBuildMe(A)\nq uit\n)' | pymol -xpic This works intermittently, roughly 1 in 3 or 4 times. Adding cmd.sync() lines to either the script or the command doesn't change the results. However, if I use the command quit() (rather than quit), pymol crashes with an error in threading.py and the file is correctly written out. The error given is PyMOLquit() Traceback (most recent call last): File /var/lib/python-support/python2.5/pymol/parser.py, line 456, in parse exec(layer.com2+\n,self.pymol_names,self.pymol_names) File string, line 1, in module File site.py, line 256, in __call__ raise SystemExit(code) SystemExit: None Exception in thread Thread-1: Traceback (most recent call last): File threading.py, line 460, in __bootstrap self.run() File threading.py, line 440, in run self.__target(*self.__args, **self.__kwargs) File /var/lib/python-support/python2.5/pymol/parser.py, line 500, in stdin_reader l = sys.stdin.readline() ValueError: I/O operation on closed file I'm running version 1.0re1, though I have also tested with 0.98. Any advice would be much appreciated. Thanks in advance Ben Hall -- --- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java .sun.com/javaone ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users