Yellowify molecule keys.py

From CCP4 wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
# 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)
       graphics_draw()

add_key_binding("Yellowify last coordinates", "y",
               yellow_coords_func1)
# yellowify all coordinate molecules
add_key_binding("Yellowify all coordinates", "Y",
               lambda: ([set_molecule_bonds_colour_map_rotation(imol, 20)
                            for imol in model_molecule_list()],
                        graphics_draw()))