Coot



My .coot (inlcluding powermate dial setup)

(define *probe-command* "/usr/local/molprobity3/bin/macosx/probe")
(define *reduce-command* "/usr/local/molprobity3/bin/macosx/reduce")
(add-key-binding "Add Water" "w" (lambda () (place-typed-atom-at-pointer "Water")))
(add-key-binding "Autofit Rotamer" "j" (lambda () (auto-fit-rotamer-active-residue)))
(add-key-binding "Go To Blob" "g" (lambda () (blob-under-pointer-to-screen-centre)))
(add-key-binding "Delete this water" "D" (lambda () (apply delete-atom (active-residue))))
(add-key-binding "Regularize Residues" "B"
   (lambda ()
     (using-active-atom
      (regularize-zone aa-imol aa-chain-id (- aa-res-no 1) (+ aa-res-no 1) aa-alt-conf))))

;;   This allows the powermate dial to be used to rotate the view in coot, in +/- x,y,z.
;;   The F1 key rotates forward, and the F2 key rotates in reverse.  The F3 key permutes the
;;   direction of rotation from x to y to z to x. To use this, assign F1/F2 to left/right rotation,
;;   and F3 to push down in the Powermate Driver software.
;;
;;   William Scott and Alastair Fyfe, Sept. 12, 2007.

;; Set the initial direction to y
(define direction 2)

(define graphics-general-key-press-hook
   (lambda (key)
      (format #t "key: ~s~%" key)
         (cond

        ;; Bind the F3 key to toggle direction
   ((= key 65472) (cond
           ((= direction 1) (set! direction 2 ))
           ((= direction 2) (set! direction 3 ))
           ((= direction 3) (set! direction 1 ))
             ))

   ;; bind the F1 key, action depends on the current value of variable "direction"
   ((= key 65470) (cond
           ((= direction 1) (rotate-x-scene 1 3.0 ))
           ((= direction 2) (rotate-y-scene 1 3.0 ))
           ((= direction 3) (rotate-z-scene 1 3.0 ))
             ))
  ;; bind the F2 key, action depends on the current value of variable "direction"
   ((= key 65471) (cond
           ((= direction 1) (rotate-x-scene 1 -3.0 ))
           ((= direction 2) (rotate-y-scene 1 -3.0 ))
           ((= direction 3) (rotate-z-scene 1 -3.0 ))
             ))
                   )
   )
  )

Set bond thickness

set-bond-thickness thickness imol

Display hydrogens

set-draw-hydrogens mol-no 1

And use 0 (set-draw-hydrogens mol-no 0) to hide them.

Show anisotropic atoms

set-show-aniso 1 

Set map line width

set-map-line-width 2

Rotate (transform) maps

NO NEED TO GO THROUGH ALL THIS BELOW, FROM VERSION 0.6 THERE IS MENU IN EXTENSION-->MAPS THAT DOES EXACTLY THIS
(from: http://www.ysbl.york.ac.uk/~emsley/coot/doc/chapters/user-manual_6.html#SEC174)
(transform-map imol rotation-matrix trans point radius)

Example:
open pdb and map molecule A
use script scheme and type 
(rotation-centre)
this will give as output something like
(-103.580749511719 23.567419052124 -23.8161735534668) 
that is the center of molecule A,
now open pdb and map molecule B
use 
Calculate>LSQ Superpose 
and rotate B on A, 
the terminal gives matrix output something like:
-0.4999, 0.8661, 0.00163
0.8661, 0.4999, -0.002215
-0.002733, 0.0003047, -1
( -0.1185, 0.04244, 12.24)

the first three rows (orange) are the "rotation-matrix" to use as argument in the command above, the forth (purple) is the argument for "trans", and the output of (rotation-centre) and the radius of the map are arguments for "point" and "radius", respectively.

Now, write in the scripting menu the whole thing:
(transform-map 4 (list -0.4999 0.8661 0.00163 0.8661 0.4999 -0.002215 -0.002733 0.0003047 -1) (list -0.1185 0.04244 12.24) (list -103.580749511719 3.567419052124 -23.8161735534668) 5)

At this point coot should create a new map, called Transformed map.

Open automatically pdb and mtz from shell

% coot --pdb refine.pdb --auto refine.mtz

Low resolution data 

Constrain the omega angles

(add-planar-peptide-restraints) 

Adjust the weight between the X-ray terms and the gemoetry terms

(set-matrix 20.0) 

[Default is 60, the lower you set it the stronger the geometry] 

Improve rotamer and add terminal residue

(set-terminal-residue-do-rigid-body-refine 0) 
(set-add-terminal-residue-do-post-refine 1) 
(set-mutate-auto-fit-do-post-refine 1) 

Real-space refinement and low resolution ED maps

to increase the weight on the geometry terms use the weight in Coot: 
(set-weight 10) 

Keys

Control of rotations with keys: 

     Q 
     |  
     | 
R <----->E 
     | 
     | 
     W 

Rot along Z: T & Y
Slab: D & F 
Zoom: N & M 
Rock: I 
Next Residue Space Bar 

Difference map colouring 
To have difference maps coloured with red as positive and green as negative: 
(set-swap-difference-map-colours 1)