[Chimera-users] retrieving assigned color and ribbon thickness

Eric Pettersen pett at cgl.ucsf.edu
Wed Jan 5 16:23:38 PST 2011


Hi Sumitro,
	It's doable, but requires some Python.  Open IDLE (under General  
Controls) and type:

for m in chimera.openModels.list(modelTypes=[chimera.Molecule]):
	vals = [r.ribbonStyle.size for r in m.residues]
	print m, min(vals), max(vals)

The above will print the min/max scale used for each molecule model  
you have open.  You could also put the above into a .py file (you  
would need to add "import chimera" as the first line though) and  
execute it using File->Open.  The numbers would then be printed to the  
reply log.

--Eric

                         Eric Pettersen
                         UCSF Computer Graphics Lab
                         http://www.cgl.ucsf.edu

On Jan 4, 2011, at 7:15 PM, Sumitro Harjanto wrote:

> Hi Elaine,
>
> Actually, I use "render by attribute" tool to set (scale) the ribbons'
> ('Worms') thickness accordingly. So I din actually use the Ribbon  
> style
> editor. I understand I should be able to find the absolute thickness  
> of
> each residue in the session file (somewhere), but is there a  
> relatively
> simple way to find out the scale I have used for the worms  
> thickness..?
>
> It's not really a big problem, I can always estimate the scale  
> again, so
> if it's complicated and having to dig deep into the session file then
> it's okay. =] thanks!
>
> Cheers,
> Sumitro
>
> -----Original Message-----
> From: Elaine Meng [mailto:meng at cgl.ucsf.edu]
> Sent: Wednesday, January 05, 2011 2:23 AM
> To: Sumitro Harjanto
> Cc: Chimera-users at cgl.ucsf.edu
> Subject: Re: [Chimera-users] retrieving assigned color and ribbon
> thickness
>
> Hi Sumitro,
> You can use the Selection Inspector to get color RGB values.  For
> example, you could Ctrl-click to select one residue's ribbon segment,
> then click the green magnifying glass on the lower right corner of the
> Chimera window to open the Selection Inspector, and then inspect
> "Residue" -- there will be a square color well with the ribbon color,
> and if you click that color well, the Color Editor will appear with  
> that
> color in it, and sliders showing the RGB values.
>
> When you were originally setting the ribbon dimensions in the Ribbon
> Style Editor, if you saved the settings with a name, the name will be
> shown as the "ribbon scaling" in the Residue part of the Selection
> Inspector.   You would have to reopen the Ribbon Style Editor and go  
> to
> that name again to see what the corresponding dimensions were.  If you
> didn't give the settings any name, however, I don't know of any easy  
> way
> to figure out the exact dimensions.  If you had a session file, it is
> embedded in there somewhere, but I don't know how to find it.  Maybe
> someone else can advise on that point.  However, clearly the better  
> way
> if you are starting anew is to give the settings a name in the Ribbon
> Style Editor before applying them to the structure.
>
> I hope this helps,
> Elaine
> ----------
> Elaine C. Meng, Ph.D.
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
> On Jan 3, 2011, at 9:40 PM, Sumitro Harjanto wrote:
>
>> Hi Elaine,
>> I'm wondering if it is possible to retrieve the numerical (RGB)  
>> values
> of the color & ribbon width that I have previously assigned to certain
> residue(s). I often try out a certain color and save it in a session,
> but when I come back to the session and try to apply the color to the
> other residues I realized I forgot what's the RGB value I've assigned
> and have to resort to visual inspection (which is not very accurate).
> The same problem I have experienced with the ribbon thickness. Is  
> there
> a way for me to keep a record of / retrieve these values? Thanks!
>> Cheers,
>> Sumitro
>
> Institute for Infocomm Research disclaimer:  "This email is  
> confidential and may be privileged. If you are not the intended  
> recipient, please delete it and notify us immediately. Please do not  
> copy or use it for any purpose, or disclose its contents to any  
> other person. Thank you."
>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20110105/e7ba9219/attachment.html>


More information about the Chimera-users mailing list