[Chimera-users] retrieving assigned color and ribbon thickness
pett at cgl.ucsf.edu
Wed Jan 5 16:23:38 PST 2011
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
UCSF Computer Graphics Lab
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
> editor. I understand I should be able to find the absolute thickness
> each residue in the session file (somewhere), but is there a
> simple way to find out the scale I have used for the worms
> 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!
> -----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
> 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
> 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
> 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
> 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
> 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 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)
> 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
> a way for me to keep a record of / retrieve these values? Thanks!
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users