Hi Jon,

this will give you the A1 object color:

s = cmd.get_session("A1", partial=1, compress=0)
print cmd.get_color_tuple(s["names"][0][5][0][2])

I use to query the color of the first atom instead of the "object color", see 
psico.querying.get_color:
https://github.com/speleo3/pymol-psico/blob/master/psico/querying.py

Cheers,
  Thomas

On 25 Nov 2013, at 06:42, Jonathan Grimes <jonat...@strubi.ox.ac.uk> wrote:
> dear all,
> 
>  i am having implementing these instructions.  
> 
>  i would like to work out what color an object is……
> 
>  how is this defined …..
> 
>> s["names"][1][5][0][1]
>> 
>> equals your object name.
> 
>  if I have an object called A1…i am unsure how to 
>   make A1 equal to s["names"][1][5][0][1]
> 
> 
>  many thanks
> 
>  jon
> 
> 
> Dr. Jonathan M. Grimes, 
> NDM Senior Reseach Fellow
> University Research Lecturer
> DIAMOND Research Fellow
> 
> Division of Structural Biology
> Wellcome Trust Centre for Human Genetics
> University of Oxford
> Roosevelt Drive,
> Oxford OX3 7BN, UK
> 
> Email: jonat...@strubi.ox.ac.uk, Web: www.strubi.ox.ac.uk 
> Tel: (+44) - 1865 - 287561, FAX: (+44) - 1865 - 287547       

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
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