Using powermate dials with coot

From OS X Scientific Computing

Contents

Creating an interface for the Powermate Dial for COOT

Background

The Powermate dial can be used with coot. One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions. The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses. I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z. The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.

The Dials Script

Here are two (presumably identical) versions. The first is my copy. The second is on the coot wiki site.

powermate-coot.scm

or

powermate-coot.scm


Running the Dials Script Within Coot

I have the following lines in my ~/.coot file:

 (let ((menu (coot-menubar-menu "Dials")))
 
   (add-simple-coot-menu-menuitem
    menu "PowerMate"
    (lambda ()
  ;;(load "/Users/wgscott/.coot-dials.scm")
  (load (append-dir-file (getenv "HOME") ".coot-dials.scm")))))

I also renamed the powermate-coot.scm file to ~/.coot-dials.scm in my home directory. The dot at the front keeps it invisible; that is the only reason for the change.

Making the Powermate Dial Available to Coot

This will be improved, but for now,

  1. Install the PowerMate Driver
  2. Program in analogy to what is done for PyMOL, but use "X11.app" as the application.

(I don't know of a way to fine-tune it more specifically.)


PowerMate dial configuration v2.x

Using powermate dials with PyMOL