Re: [PyMOL] using pymol from python script

2011-02-18 Thread John Russo
Thanks, it seems that Ubuntu has a quite updated pymol version in its repositories. I will install a new version by hand. John On 02/18/2011 05:43 PM, Jason Vertrees wrote: > Hi John, > >> I'm running version Version 1.2r2. > This is probably why. I don't recall the exact version in which th

Re: [PyMOL] using pymol from python script

2011-02-18 Thread Jason Vertrees
Hi John, > I'm running version Version 1.2r2. This is probably why. I don't recall the exact version in which this became doable, but it's now available in the latest version. Cheers, -- Jason -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (

Re: [PyMOL] using pymol from python script

2011-02-18 Thread John Russo
Hi, your program looks exactly like mine, but I don't get the png image if I don't raytrace it before. I think everything else is working because if I run interectively the molecule is loaded properly, and by just adding the cmd.ray command gives me a correct image (but raytraced). I'm running ver

Re: [PyMOL] using pymol from python script

2011-02-18 Thread Jason Vertrees
Hi John, You don't actually need to ray trace before saying any more. That was an older "feature". Here's what worked for me: # save this to examply.py from pymol import cmd cmd.load(sys.argv[1]) cmd.hide() cmd.show("spheres") cmd.set('sphere_scale',0.3) cmd.set('orthoscopic',1) cmd.png("print

Re: [PyMOL] using pymol from python script

2011-02-18 Thread John Russo
Thanks for the reply (and the welcome). With your suggestion I can get a raytraced image. Is there a way to get a normal/OpenGL image staying in batch mode? All those shades are quite disturbing, since real molecules don't have a shade! :-) On 02/18/2011 04:52 PM, Tsjerk Wassenaar wrote: > Hi

Re: [PyMOL] using pymol from python script

2011-02-17 Thread Tsjerk Wassenaar
Hi John, It's what we're here for. If we care not to be bothered, we can unsubscribe. Anyway, you have to raytrace the image if you don't have an OpenGL window. Add cmd.ray(xresolution,yresolution) before, or add it to the cmd.png command directly. Cheers, Tsjerk On Fri, Feb 18, 2011 at 8:46 AM

Re: [PyMOL] using pymol from python script

2011-02-17 Thread John Russo
I'm sorry to bother this mailing list so much but it seems that I cannot save images. This is the script examply.py from pymol import cmd cmd.load(sys.argv[1]) cmd.hide() cmd.show("spheres") cmd.set('sphere_scale',0.3) cmd.set('orthoscopic',1) cmd.png("printme

Re: [PyMOL] using pymol from python script

2011-02-17 Thread John Russo
Thank you, this indeed solves the problem! Now everything seems to work smoothely. I also set an alias to mypymol="pyplot -r script.py -- " so now everything is very simple. Thanks to all for the help. John On 02/17/2011 07:30 PM, David Hall wrote: > No idea if this will fix your problem,

Re: [PyMOL] using pymol from python script

2011-02-17 Thread David Hall
No idea if this will fix your problem, but what I've found is portable across binaries from Delano Scientific/Schroedinger and OS/self-compiled versions of pymol is to instead run: pymol -r examply.py -- mymolecule.xyz (or if I'm making pngs, usually pymol -qrck examply.py -- mymolecule.xyz ) Th

Re: [PyMOL] using pymol from python script

2011-02-17 Thread Tsjerk Wassenaar
Hi John, Folmer, First, in reply to Folmer's comment, it did cross my mind whether it was necessary to call Pymol from a script, rather than the reverse. But John gave an example with the file to load as command line argument (./examply.py mymolecule.xyz). If the filename is required internally in

Re: [PyMOL] using pymol from python script

2011-02-17 Thread Folmer Fredslund
Dear John 2011/2/17 John Russo : > Hi, > I'm sorry for making such beginner's questions but searching the manual, > google > or the wiki didn't help me. > You're welcome to ask here. > I know how to extend pymol by writing python functions (through the > extend command). > But is it possible to

Re: [PyMOL] using pymol from python script

2011-02-17 Thread John Russo
Thanks, that is what I was looking for! I just made a simple script out of it which looks like this #!/usr/bin/env python import pymol from pymol import cmd import mymodule pymol.finish_launching() cmd.load("mymolecule.xyz") cmd.hide() cmd.show("spheres") mymodule.dosomething() I've noticed s

Re: [PyMOL] using pymol from python script

2011-02-16 Thread Tsjerk Wassenaar
Hi John, Is this what you're looking for?: http://www.pymolwiki.org/index.php/Launching_From_a_Script Cheers, Tsjerk On Thu, Feb 17, 2011 at 8:19 AM, John Russo wrote: > Hi, > I'm sorry for making such beginner's questions but searching the manual, > google > or the wiki didn't help me. > > I