Yellowify molecule keys.py

From CCP4 wiki
Jump to navigation Jump to search
# 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()))