How to customize Coot


This is probably common knowledge for many crystallographers using Coot, but I had never customized Coot before, so I had to figure out how to do it.

Turns out it is pretty simple (at least for the linux version that I use) and you can basically change whatever you want to.  There are multiple ways, but I find it easiest to use the ~/.coot file. NB. Coot does not create the ~/.coot file but will read during startup it if it exists.

In the .coot file I have added some scheme scripts (as in copy pasted the code) that I otherwise had to import manually every time I started Coot, such as the jiggle-fit and morph modeling extensions.

Other useful examples could be

(set-default-initial-contour-level-for-map 1.2)
(set-default-initial-contour-level-for-difference-map 3.8)
(set-map-radius 25.00)

You can also change the size and location of  the graphic window, and decide which pop-up windows you want to open and where they should be etc.

(set-graphics-window-size 1200 800)
(set-graphics-window-position 600 40)
(set-go-to-atom-window-position 70 25)

I also use the ~/ file for adding modifications written in python.

For example I am currently following keybind:

add_key_binding("Stereo", "t", lambda: stereo_mono_toggle())

Which keybinds the “toggle hardware stereo mode” on and off to the key “t”. This way I don’t have to go through the menus each time I want to turn on/off stereo mode.

I have also added some of the python scripts that I found on the Coot CCP4 wiki, such as blueify map (turns your map blue by tapping the “b” key) and yellowify molecule (turn your last molecule yellow by tapping the “y” key).

# bluefy last map
def blue_map_func1():
   ls = map_molecule_list()
   for map_mol in ls:
       if not map_is_difference_map(map_mol):
           set_map_colour(map_mol, 0.1, 0.5, 0.68)
add_key_binding("Blueify the Latest 2FoFc Map", "b",
# yellowify last coordinate molecule
# Note: this may overwrite the 'usual' short-cut of 'y' to add a terminal residue
def yellow_coords_func1():
   ls = model_molecule_list()
   if len(ls) > 0:
       set_molecule_bonds_colour_map_rotation(ls[-1], 20)

add_key_binding("Yellowify last coordinates", "y",

Whatever customization you need you can get it.

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/ on line 405

One thought on “How to customize Coot”

Leave a Reply

Your email address will not be published. Required fields are marked *