On Thu, 2007-04-12 at 01:14 +0100, Frank von Delft wrote:
> Hi Paul
>
> How do I make a residue active, so that the new "Active Residue" commands
> work? That'd be (refine-active-residue), (refine-active-residue-triple) and
> (autofit-rotamer-active-residue).
This could do with more explanation, thanks for the prompt.
Coot already has several key bindings, R,T,Y,A,S,I,D,L,C,E,Q,W to name a
few.
Note that the P key is bound to the "Update from Current Position"
function, which takes you to the nearest displayed atom, with a
preference for CAs, if it can find one.
Also the O key is now bound to skip-to-next-ncs-chain
If you look at the console when you type a key letter, those without a
binding say something like
key: 110
when you press it. Those that do have a internal binding don't say
anything [1].
Redefining graphics-general-key-press-hook is how you attach bindings:
(define graphics-general-key-press-hook
(lambda (key)
(cond
; H key
((= key 120) ; X key
(refine-active-residue))
((= key 104) ; H key
(refine-active-residue-triple))
((= key 107) ; K key
(auto-fit-rotamer-active-residue))
;; other binding (place atom at pointer when V key hit)
((= key 118) ; V key
(set-pointer-atom-is-dummy 1)
(place-atom-at-pointer)))))
This binds (hopefully useful) functions to the X, H, K and V keys.
I am going off this method and will use something easier in a future
release.
I like the idea of "bring blob under the mouse to the screen centre" and
will implement it soon(ish). That will also have a key binding.
Paul.
[1] except the O and P keys (and this has been corrected in the
pre-release)
|