Opened 2 years ago

Closed 2 years ago

#9281 closed defect (not a bug)

Issue in Atom Structure color retrieval

Reported by: iacedoagui@… Owned by: Eric Pettersen
Priority: normal Milestone:
Component: Structure Analysis Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Hello,

I'm having issues retrieving the Atom Structure color in a model using the command info models #1 attribute color. It is giving me the same color for all structures.
I'm using the command in a .cxs model created by using symmetry.

I attach a photo of the issue.

Thank you,
- Ivan Acedo Aguilar

color issue.png

Attachments (1)

color issue.png (1.7 MB ) - added by iacedoagui@… 2 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (3)

by iacedoagui@…, 2 years ago

Attachment: color issue.png added

Added by email2trac

comment:1 by Eric Pettersen, 2 years ago

Component: UnassignedStructure Analysis
Owner: set to Eric Pettersen
Platform: all
Project: ChimeraX
Status: newaccepted

comment:2 by Eric Pettersen, 2 years ago

Resolution: not a bug
Status: acceptedclosed

Hi Ivan,

Models don't really have a "color" attribute per se. Their "color" attribute is really a convenience for setting all the atom and ribbon colors at once, or finding out the atom/ribbon colors if they are all the same. But if atom and ribbon colors differ in a model then that model's "color" attribute will report something like the 178 178 178 255 value that you got.
From the resolution of the image you sent, I can't really tell if the structure is showing ribbons or atoms, but the solution is to ask the atoms/ribbons for their colors. To avoid an overwhelming amount of output, you'd still prefer to get just one value per model. Let's say you know that every model has a chain A, and that there is a residue 5 in every chain A. You could ask for one atom color per model with:

info atoms /A:5@ca attribute color

and one ribbon color per model with:

info residues /A:5 attribute ribbon_color

--Eric

Eric Pettersen
UCSF Computer Graphics Lab

Note: See TracTickets for help on using tickets.