2009/2/24 Victor Alves <[email protected]>:
> 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".
>
> Thank you
>
> Victor Alves
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
This would colour the last non-difference map:
(add-key-binding "Blue Map" "b"
(lambda ()
(let loop ((map-imol-list (reverse (map-molecule-list))))
(if (not (null? map-imol-list))
(if (= (map-is-difference-map (car map-imol-list)) 0)
(set-map-colour (car map-imol-list) 51 128 178)
(loop (cdr map-imol-list)))))))