Re: [PyMOL] echo colour

2013-01-23 Thread Thomas Holder
Hi Joel, the color is stored as a numeric atom property, you can use iterate to get it. PyMOL> iterate (first objX), print color If you need the name of the color, get the index to name mapping as a dictionary from PyMOL like this: PyMOL> stored.cn = dict((i,c) for (c,i) in cmd.get_color_indice

Re: [PyMOL] How do I get current selection name from python?

2013-01-23 Thread Boris Kheyfets
It prints the selection all right. Why then save wouldn't save it: def bk_saves_unique_pdb(Selection = None): """Takes current selection (or "all" -- if nothing selected) and saves it as a uniquetly named pdb file (Frame_Selection_RandomString.pdb) in the current working directory.""" if n

Re: [PyMOL] How do I get current selection name from python?

2013-01-23 Thread Thomas Holder
http://docs.python.org/2/library/tempfile.html#tempfile.NamedTemporaryFile Quote: "If delete is true (the default), the file is deleted as soon as it is closed." Cheers, Thomas Boris Kheyfets wrote, On 01/23/13 14:47: > It prints the selection all right. Why then save wouldn't save it: > > >

Re: [PyMOL] echo colour

2013-01-23 Thread Joel Tyndall
Thanks Thomas, seems to work. -Original Message- From: Thomas Holder [mailto:thomas.hol...@schrodinger.com] Sent: Wednesday, 23 January 2013 10:47 p.m. To: pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] echo colour Hi Joel, the color is stored as a numeric atom property, you ca