37
edits
(reading MTZ file with experimental PHI and FOM using --auto) |
No edit summary |
||
Line 575: | Line 575: | ||
Q: There is the --auto <filename> commandline option for auto-reading mtz files (mtz file has the default labels FWT, PHWT). Can this be made to work with a SHELXE .phs output file after converting with convert2mtz ? - the resulting MTZ file has labels F PHI FOM. | Q: There is the --auto <filename> commandline option for auto-reading mtz files (mtz file has the default labels FWT, PHWT). Can this be made to work with a SHELXE .phs output file after converting with convert2mtz ? - the resulting MTZ file has labels F PHI FOM. | ||
A: use coot --python -c 'make_and_draw_map("sad.mtz", "F", "PHI", "FOM", "/HKL_base/HKL_base/FOM",1, 0)' --no- | A: use: coot --python -c 'make_and_draw_map("sad.mtz", "F", "PHI", "FOM", "/HKL_base/HKL_base/FOM",1, 0)' | ||
== NCS Rotamer differences == | |||
Show me where NCS-related side-chains have different rotamers | |||
(define (compare-ncs-rotamer imol chain-A chain-B) | |||
(let ((n-residues (chain-n-residues chain-A imol)) | |||
(mismatched-rotamers '())) | |||
(for-each | |||
(lambda (serial-number) | |||
(let ((res-name-A (resname-from-serial-number imol chain-A serial-number)) | |||
(res-no-A (seqnum-from-serial-number imol chain-A serial-number)) | |||
(ins-code-A (insertion-code-from-serial-number imol chain-A serial-number)) | |||
(res-name-B (resname-from-serial-number imol chain-A serial-number)) | |||
(res-no-B (seqnum-from-serial-number imol chain-A serial-number)) | |||
(ins-code-B (insertion-code-from-serial-number imol chain-A serial-number))) | |||
(if (not (= res-no-A res-no-B)) | |||
(begin | |||
(format #t "sequence number for ~s do not match~%" res-no-A)) | |||
(if (not (string=? res-name-A res-name-B)) | |||
(begin | |||
(format #t "residue names for ~s do not match~%" res-no-A)) | |||
(let ((rot-name-A (get-rotamer-name imol chain-A res-no-A ins-code-A)) | |||
(rot-name-B (get-rotamer-name imol chain-B res-no-B ins-code-B))) | |||
(if (not (string=? rot-name-A rot-name-B)) | |||
(begin | |||
(format #t "mismatch rotamers ~s ~s~%" rot-name-A rot-name-B) | |||
(set! mismatched-rotamers | |||
(cons (list imol chain-A res-no-A ins-code-A | |||
res-name-A | |||
(if (string=? rot-name-A "") "-" rot-name-A) | |||
(if (string=? rot-name-B "") "-" rot-name-B)) | |||
mismatched-rotamers)))) | |||
))))) | |||
(range n-residues)) | |||
(dialog-box-of-buttons "Mismatched Rotamers" | |||
(cons 300 300) | |||
(map (lambda(rotamer) | |||
(let ((label (string-append " " | |||
(list-ref rotamer 1) | |||
" " | |||
(number->string (list-ref rotamer 2)) | |||
(list-ref rotamer 3) | |||
" " | |||
(list-ref rotamer 4) ;; res-name | |||
": " | |||
(list-ref rotamer 5) | |||
" vs. " | |||
(list-ref rotamer 6))) | |||
(thunk (lambda () | |||
(set-go-to-atom-molecule imol) | |||
(set-go-to-atom-chain-residue-atom-name | |||
(list-ref rotamer 1) | |||
(list-ref rotamer 2) " CA ")))) | |||
(list label thunk))) | |||
mismatched-rotamers) | |||
" Close "))) | |||
And one would use this something like: | |||
;; example usage: | |||
(let ((imol (read-pdb "test.pdb"))) | |||
(compare-ncs-rotamer imol "A" "B")) |
edits