> From: Peter Haebel [mailto:p.hae...@auckland.ac.nz]
> 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? For well defined settings, this can be easily done, although the API is somewhat incomplete. (in python) from pymol import cmd print cmd.get_setting_tuple('bg_rgb') my_variable = cmd.get_setting_tuple('antialias') etc. You will get a tuple of length 2. The first field is a type identifier, and the second is the value corresponding to the setting. Current type identifiers: 3 for a float, 4 for a nested tuple of three floats. In the future, 1 will be a boolean, and 2 will be an int. Settings are still in the process of being de-homogenized from being pure floating point values. Eventually we will supplement this function with something more descriptive and user-friendly -- it only exists this early because I needed it to support the first external GUI. Please contribute your extension for inclusion in util.py when it is done. Note that you can use cmd.extend to bind it to a command for maximum convenience. Cheers, Warren -- mailto:war...@sunesis.com Warren L. DeLano, Ph.D. Informatics Scientist Sunesis Pharmaceuticals, Inc. 341 Oyster Point Blvd. S. San Francisco, CA 94080 (650)-266-3606 fax: (650)-266-3501 > -----Original Message----- > From: Peter Haebel [mailto:p.hae...@auckland.ac.nz] > Sent: Wednesday, October 24, 2001 1:12 PM > To: pymol-users@lists.sourceforge.net > Subject: [PyMOL] Re: PyMOL-users digest, Vol 1 #2 - 2 msgs > > > 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 >