==Overview==
When sifting through many similar structures for days on end, mousing around the object pane can become strenuous. This script binds the left and right arrows on your keyboard to moving up and down the object list. Note that this script supports objects, but is untested for groups.
<source lang="python">
from pymol import cmd
def move_down():
enabled_objs = cmd.get_names("object",enabled_only=1)
all_objs = cmd.get_names("object",enabled_only=0)
for obj in enabled_objs:
cmd.disable(obj)
last_obj=obj
for i in range(0,len(all_objs)):
if all_objs[i] == obj:
if i+1 >= len(all_objs):
cmd.enable( all_objs[0] )
else:
cmd.enable( all_objs[i+1] )
cmd.orient
def move_up():
enabled_objs = cmd.get_names("object",enabled_only=1)
all_objs = cmd.get_names("object",enabled_only ..→