On 20/04/11 15:48, Francis E Reyes wrote:
Hi all

I'm currently in the process of completing a heavy atom model so I
need to be able to compare fractional coordinates of possible heavy
atom's (fractional seems the easiest way to think about it for me). Is
there anyway to get the heavy atom fractional coordinates to appear in
the status bar? It currently displays the orthogonal (?) coordinates
so I figure this is an easy thing to add.

Well nothing built into Coot - you can do a bit of scripting though:


(define atom->coords (lambda (atom) (car (cddr atom))))

(if (defined? 'coot-menubar-menu)
    (let ((menu (coot-menubar-menu "Frac")))
      (add-simple-coot-menu-menuitem
       menu
       "Frac coords of atom..."
       (lambda ()

     (user-defined-click
      1
      (lambda (atom-specs)
        (let ((atom-spec (car atom-specs)))
          (format #t "atom-spec: ~s~%" atom-spec)
          (let ((atom (get-atom (list-ref atom-spec 1)
                    (list-ref atom-spec 2)
                    (list-ref atom-spec 3)
                    (list-ref atom-spec 4)
                    (list-ref atom-spec 5))))
        (if atom
            (let ((coords (atom->coords atom)))
              (let ((frac-coords
(map / coords (list-head (cell (list-ref atom-spec 1)) 3))))
            (add-status-bar-text
             (apply string-append
                (cons
                 "Frac coords  (  "
                 (append
                  (map (lambda (f)
                     (string-append (substring (number->string f) 0 6)
                            "  "))
                       frac-coords)
                  (list ")"))))))))))))))))



This is for orthorhombic space groups... somewhat embarrassingly I don't recall the general form of the transformation off the top of my head.

Paul.

Reply via email to