def sculpt(self, cleanup=0): if not cleanup: cmd.set("suspend_updates", 1, quiet=1) cmd.disable() cmd.delete("sculpt") cmd.set("sphere_scale", "1.0") cmd.set("sphere_mode", 5) cmd.load("$PYMOL_DATA/demo/pept.pdb", "sculpt") cmd.hide("lines", "sculpt") # cmd.show("sticks","sculpt") cmd.show("spheres", "sculpt") # cmd.set("sphere_transparency","0.75","sculpt") # cmd.set("sphere_color","grey","sculpt") cmd.frame(1) cmd.set("auto_sculpt", 1) cmd.set("sculpting", 1) cmd.sculpt_activate("sculpt") cmd.set("sculpting_cycles", "100") cmd.do("edit_mode") cmd.set("valence", "0.05") cmd.set("suspend_updates", 0, quiet=0) cmd.sculpt_iterate("sculpt") cmd.alter_state(1, "sculpt", "x=x*1.5;y=y*0.1;z=z*1.5") cmd.zoom() cmd.unpick() else: cmd.set("valence", "0") cmd.set("sculpting", 0) cmd.set("auto_sculpt", 0) cmd.delete("sculpt") cmd.mouse()
def sculpt(self,cleanup=0): if not cleanup: cmd.set("suspend_updates",1,quiet=1) cmd.disable() cmd.delete("sculpt") cmd.set("sphere_scale","1.0") cmd.set("sphere_mode",5) cmd.load("$PYMOL_DATA/demo/pept.pdb","sculpt") cmd.hide("lines","sculpt") # cmd.show("sticks","sculpt") cmd.show("spheres","sculpt") # cmd.set("sphere_transparency","0.75","sculpt") # cmd.set("sphere_color","grey","sculpt") cmd.frame(1) cmd.set("auto_sculpt",1) cmd.set("sculpting",1) cmd.sculpt_activate("sculpt") cmd.set("sculpting_cycles","100") cmd.do("edit_mode") cmd.set("valence","0.05") cmd.set("suspend_updates",0,quiet=0) cmd.sculpt_iterate("sculpt") cmd.alter_state(1,"sculpt","x=x*1.5;y=y*0.1;z=z*1.5") cmd.zoom() cmd.unpick() else: cmd.set("valence","0") cmd.set("sculpting",0) cmd.set("auto_sculpt",0) cmd.delete("sculpt") cmd.mouse()
def ov(event): cmd.mouse('one_button_viewing')
def de(event): cmd.mouse('two_button_editing')
def ds(event): cmd.mouse('two_button_selecting')
def dv(event): cmd.mouse('two_button_viewing')
def te(event): cmd.mouse('three_button_editing')
def tv(event): cmd.mouse('three_button_viewing')