Hi Warren, I have a related question. just wrote a little extension for pymol that generates stereo figures and merges the right and left stereo image to complete the figure.
util.stpng(["filename"]). the extension is written in python and uses PIL (the python image library) to manipulate the images. It can output the merged figures in all standard image formats (png, tiff, jpeg, ps, pdf, etc only depends on the libraries you have installed) and derives the format from the extension of the output filename. anyway, playing around I realised that it would be nice to be able to read out the pymol settings, such as 'bg_color', 'antialias' and any other variables. is there such a pymol function? cheers peter :)__________________________________________ Peter Haebel Laboratory of Structural Biology, Phone: +64-9-373 7599 ext. 7237 School of Biological Sciences, Fax: +64-9-373 7414 University of Auckland Email: p.hae...@auckland.ac.nz New Zealand http://www.netcolony.com/life/phaebel Meet LISA at http://lisa.sbs.auckland.ac.nz On Wed, 24 Oct 2001 pymol-users-requ...@lists.sourceforge.net wrote: > Send PyMOL-users mailing list submissions to > pymol-users@lists.sourceforge.net > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/pymol-users > or, via email, send a message with subject or body 'help' to > pymol-users-requ...@lists.sourceforge.net > > You can reach the person managing the list at > pymol-users-ad...@lists.sourceforge.net > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of PyMOL-users digest..." > > > Today's Topics: > > 1. getting image sizes (Ben Cornett) > 2. RE: getting image sizes (DeLano, Warren) > > --__--__-- > > Message: 1 > To: pymol-users@lists.sourceforge.net > From: Ben Cornett <acor...@emory.edu> > Date: 24 Oct 2001 09:09:18 -0400 > Subject: [PyMOL] getting image sizes > > Does anyone know how to get the size (pixels) of the viewer? I'd like > to be able to write a python script that orients and colors a molecule > and then renders it at whatever dpi I provide as a command-line > argument. > > Best, > > Ben > > > > --__--__-- > > Message: 2 > Subject: RE: [PyMOL] getting image sizes > Date: Wed, 24 Oct 2001 09:06:42 -0700 > From: "DeLano, Warren" <war...@sunesis.com> > To: "Ben Cornett" <acor...@emory.edu>, > <pymol-users@lists.sourceforge.net> > > Welcome everybody to the PyMOL mailing list. There are over 30 > subscribers. I am very pleased that so many people want to use (and > thereby improve) the package. > > > From: Ben Cornett=20 > > > Does anyone know how to get the size (pixels) of the viewer? I'd like > > to be able to write a python script that orients and colors a molecule > > and then renders it at whatever dpi I provide as a command-line > > argument. > > Ben, > > Hmm, not all of those features may exist yet, but the following will > help. > > The "viewport" command can be used to change the window size. > Alternatively, the "ray" command can take width and height arguments. > > Remember that two options exist for scripting: PyMOL commands and > Python. The former is easier for quick-and-dirty tasks. > > # SCRIPT fig1.pml (PyMOL command language) > # RUN AS "pymol -c fig1.pml" > viewport 1024,768 > load example.pdb > color marine > orient > ray=20 > png fig1.png > # END > > versus=20 > > # SCRIPT fig2.py (Python) > # RUN AS "pymol -c fig2.py" > from pymol import cmd > cmd.viewport(1024,768) > cmd.load("example.pdb") > cmd.color("marine") > cmd.orient() > cmd.ray() > cmd.png("fig2.png") > # END > > also equivalent to=20 > # SCRIPT fig3.pml (PyMOL) > # RUN AS "pymol -c fig3.pml" > load example.pdb > color marine > orient > ray 1024,768 > png fig3.png > # END > > Passing additional command arguments can't yet be done reliably, but you > might try playing around with -d (at least on unix). Note single quotes > and no spaces within the quote. > > pymol -d 'w=3D1024;h=3D768' > > should define "w" and "h" in the interpreter namespace. > > Thus, the following works... > > # SCRIPT fig3.py (Python) > # RUN AS "pymol -c -d 'w=3D1024;h=3D768' fig3.py " > from pymol import cmd > cmd.load("example.pdb") > cmd.color("marine") > cmd.orient() > cmd.ray(w,h) > cmd.png("fig3.png") > # END > > You might even be able to pass in the input and output filenames: > > pymol -c -d 'w=3D1024;h=3D768;i=3Dexample.pdb;o=3Dfig4.png' fig4.py > > # SCRIPT fig4.py (Python) > from pymol import cmd > cmd.load(i) > cmd.color("marine") > cmd.orient() > cmd.ray(w,h) > cmd.png(o) > # END > > - Warren > > > > --__--__-- > > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > End of PyMOL-users Digest >