This "Blueify map" function is very useful -- would it be just as easy
to "Yellowify" coordinates?
--James
On Feb 25, 2009, at 10:08 AM, Paul Emsley wrote:
Victor Alves wrote:
Hi
I have looked at the reference manual and can't seem to find a way
to fulfill my desire to change colors of the active map or molecule
at key-press.
All the commands I found use "imol" which means you have to know
the exact number. If you're launching Refmac from within Coot, its
useful that Coot changes the map and molecule colors (as it does
automatically) but sometimes I don't like the chosen colors and
would like to change them, just by pressing a key.
So, I would like to add a key binding to set the current (active)
map to a certain color and likewise do the same for the active
molecule.
Something like:
(add-key-binding "Blue Map" "b" (lambda () (set-map-colour *_active-
imol_* 51 128 178))
instead of having to use "imol".
Hi Victor,
First, to make the new maps from Refmac be the same colours as the
previous one, add to your ~/.coot file:
(set-keep-map-colour-after-refmac 1)
Secondly, to answer your question:
(add-key-binding "Blueify the Latest 2foFc Map" "b"
(lambda ()
(let loop ((l (reverse (map-molecule-list))))
(cond
((null? l) 'no-map)
((= (map-is-difference-map (car l)) 0)
(set-map-colour (car l) 0.1 0.5 0.68)
(graphics-draw))
(else
(loop (cdr l)))))))
i.e. we have to find the value of active-imol and we do that by
working backwards through the list of map molecule numbers and
finding the first one that is not a difference map.
Note the colour scales go from 0 to 1.
Paul.