|
From: DeLano, W. <wa...@su...> - 2001-10-24 20:25:19
|
> From: Peter Haebel [mailto:p.h...@au...]
> anyway, playing around I realised that it would be nice to be=20
> 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 =3D 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. =20
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. =20
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.=20
Cheers,
Warren
--
mailto:wa...@su...
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.h...@au...]
> Sent: Wednesday, October 24, 2001 1:12 PM
> To: pym...@li...
> Subject: [PyMOL] Re: PyMOL-users digest, Vol 1 #2 - 2 msgs
>=20
>=20
> Hi Warren,
>=20
> I have a related question. just wrote a little extension for=20
> pymol that
> generates stereo figures and merges the right and left stereo image to
> complete the figure.
>=20
> util.stpng(["filename"]).
>=20
> the extension is written in python and uses PIL (the python=20
> image library)
> to manipulate the images. It can output the merged figures in=20
> all standard
> image formats (png, tiff, jpeg, ps, pdf, etc only depends on=20
> the libraries
> you have installed) and derives the format from the extension of the=20
> output filename.
>=20
> anyway, playing around I realised that it would be nice to be=20
> able to read
> out the pymol settings, such as 'bg_color', 'antialias' and any other
> variables. is there such a pymol function?
>=20
> cheers
>=20
|