Opened 7 years ago

Closed 7 years ago

#1253 closed defect (fixed)

Remove CPK colours from list of possible chain colours

Reported by: Tristan Croll Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Graphics Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

When loading a large model with lots of chains, some chains will end up the same colour as nitrogen, oxygen, sulphur etc. Any colour used when colouring by atom should be blacklisted for automatic chain colouring.

Change History (3)

comment:1 by Tom Goddard, 7 years ago

Please explain why. I don't see how these initial colors cause a problem.

Also the initial colors do not include red, blue or yellow (oxygen, nitrogen, sulfur) although the include different shades of those colors (like pink, violet, gold). Do you really mean all shades of CPK colors should be avoided -- that won't leave any colors.

in reply to:  2 ; comment:2 by tic20@…, 7 years ago

If I open a large structure with lots of chains (say, 3j3y), then click 
the "color by chain" button...

import numpy
m = session.models.list()[]
colors = numpy.unique[m.atoms.colors, axis=0]

colors[colors[:,0]==255]


array([[255,   0,   0, 255],
        [255, 127,  80, 255],
        [255, 150, 128, 255],
        [255, 152, 213, 255],
        [255, 181, 208, 255],
        [255, 216, 157, 255],
        [255, 255,   0, 255],
        [255, 255, 150, 255]], dtype=uint8)

Fully saturated red (oxygen) and yellow (sulphur) are in the list. Turns 
out that saturated blue (nitrogen) never does show up. I've run into 
both red and yellow in less extreme cases (that is, models I've actually 
been working on in ISOLDE), and it's a little disconcerting when you hit 
a chain where you simply can't see one of your atom types. A minor 
cosmetic thing, of course.


On 2018-08-15 01:47, ChimeraX wrote:

comment:3 by Tom Goddard, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

I replace 5 default chain colors (chains I,O,N,2,3) that were close to blue, red or yellow with other colors.

The default chain colors are in the distribution in chimerax/atomic/colors.py.

Note: See TracTickets for help on using tickets.