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 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_indices()) 
PyMOL> iterate (first objX), print stored.cn[color]

Last but not least, there is the psico.querying.get_color function in the PSICO 
module :)

Cheers,
  Thomas

Joel Tyndall wrote, On 01/23/13 02:04:
> Hi list,
> 
> With the myriad of colours in Pymol, I tend to forget which shade of 
> what I have used. Is there a way/command to print the colour I have 
> used to colour object X?
> 
> Cheers
> 
> Joel
> _________________________________
> 
> Joel Tyndall, PhD
> 
> Senior Lecturer in Medicinal Chemistry National School of Pharmacy 
> University of Otago PO Box 56 Dunedin 9054 New Zealand
> 
> Skype: jtyndall
> 
> Ph: +64 3 479 7293

--
Thomas Holder
PyMOL Developer
Schrödinger Contractor

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, 
Windows 8 Apps, JavaScript and much more. Keep your skills current with 
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. 
ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to