Mark Brooks wrote:
Hello all,
rotamers are a popular subject, apparently.
Would it be possible to display the closest rotamer to the currently
selected residue in the status bar? This would be a luxury because I
guess similar information is in the "rotamer analysis" window. I must
say that I've been pining for this for a while, but I can't contain
myself any longer!
OK. Implemented in revision 1215.
Attached is a bit of code to bind the "~" key to this function.
Paul.
(add-key-binding "Rotamer name in Status Bar" "~"
(lambda ()
(let ((active-atom (active-residue)))
(if (not active-residue)
(add-status-bar-text "No residue found")
(let ((imol (list-ref active-atom 0))
(chain-id (list-ref active-atom 1))
(res-no (list-ref active-atom 2))
(ins-code (list-ref active-atom 3))
(atom-name (list-ref active-atom 4))
(alt-conf (list-ref active-atom 5)))
(let ((name (get-rotamer-name imol chain-id res-no ins-code)))
(if (not name)
(add-status-bar-text "No name found")
(if (string=? "" name)
(add-status-bar-text "No name for this")
(add-status-bar-text (string-append "Rotamer name: " name))))))))))