From: Vermaas, Joshua (
Date: Fri Sep 30 2016 - 09:53:41 CDT

Hi Thomas,

Here is what I would do: Make one selection per color, and then use modulo arithmetic to try and get the atom colors spaced apart somewhat. If I wanted N distinct colors, I'd have N selections, each assigned to its own color using the atomselection interface. The text for each selection would be:

"index % N == 0"
"index % N == 1"
"index % N == 2"
"index % N == N-1"

This can of course also be scripted, but that's an exercise I'm leaving to you. :)


On 09/29/2016 04:23 PM, Albers, Thomas wrote:


I'm wondering if there is any straightforward way to set the colour of atoms individually using the solid colours. Right now the different atoms are assigned different segnames, depending on what their colour should be, and the colour is assigned accordingly. This works nicely, but the segname attribute can't be used for anything else.

Using the colour scale would restrict the choice of colours too much. Is there any other method?