dump_modify to specify colors for coloring by mass

Hello,

I am stuck on a (possibly very simple) visualization problem, which I haven’t been able to solve…

I am simulating a molecule and would like to color my atoms by mass. However, some masses (such as nitrogen and oxygen) are pretty close, and thus the default colors are hard to distinguish. I was trying to use the dump_modify command to define the four ranges into which H, C, O and N would fall and specify a color for each of them according to:

0.0 - 2.0: H -> red

2.1 - 13.0: C -> green

13.1 - 14.5: N -> blue

14.6 - 18.0: O -> yellow

However, I do get a “Illegal dump_modify command” message. Does anyone have an idea where I might be doing something wrong?

This is my code:
dump dump_image all image ${max_it} Chain.jpg mass type size 2500 2500 axes yes 0.8 0.02 zoom 1.5 view 90 90
dump_modify dump_image amap 0.0 18.0 da 0.0 4 0.0 2.0 red 2.1 13.0 green 13.1 14.5 blue 14.6 18.0 yellow

Thanks a lot in advance!

There was a bug in the discrete map processing - will post a patch later today.

But also,
From the dump_modify amap doc page:

For discrete color maps, each entry has a lo and hi value and a color. The lo and hi settings are either numbers within the range of values or lo can be min or hi can be max. The lo and hi settings of the last entry must be min and max. Other entries can have any lo and hi values and the sub-ranges of different values can overlap. Note that numeric lo and hi values can be specified either as absolute numbers or as fractions (0.0 to 1.0) of the range, depending on the “a” or “f” in the style setting for the color map.

You have to use min/max for your last entry.

Steve