Hello Byron.
byron delabarre wrote:
>
> I'm looking for an easy way in coot to trim residues back to Cbeta.
There is now.
> 1) Is there an easy way to do this, other than: click mutate, click
> residue, click trim to Cb, click mutate to xxxx?
Bleugh!
> 2) I wrote a script but couldn't get it to work. I'm not familiar with
> scheme/gui enough to pick out the problems.
>
>
> The gui appears and asks for values - when I enter them and click the
> action button nothing happens.
There was an error in delete-sidechain-range :(
> I can code in specific values for the delete-sidechain-range function
> and have it work, but this defeats the purpose of having a gui.
Indeed.
> The problem appears to be in how to transfer the values from the gui
> input to the delete-sidechain-range function.
See attached (I think this should go into the Wiki.)
Regards,
Paul.
;; Delete (back to the CB stub) the side change in the range
;; resno-start to resno-end
;;
(define delete-sidechain-range
(lambda (imol chain-id resno-start resno-end)
(map (lambda (resno)
(delete-residue-sidechain imol chain-id resno "" 0))
(number-list resno-start resno-end))))
(let ((menu (coot-menubar-menu "Extensions")))
(add-simple-coot-menu-menuitem
menu "Trim back sidechains"
(lambda ()
(generic-chooser-and-entry
"Choose a molecule to have its sidechains chopped"
"Chain ID: " ""
(lambda (imol chain-id)
(generic-double-entry "Starting Resno"
"End Resno"
"" "" #f #f " Chop Sidechains "
(lambda (text-1 text-2 dummy)
(let ((resno-1 (string->number text-1))
(resno-2 (string->number text-2)))
(if (and (number? resno-1)
(number? resno-2))
(delete-sidechain-range imol chain-id resno-1 resno-2))))))))))
|