def grow(self, name, pos, geom, text): if "pk1" in self.cmd.get_names("selections"): self.cmd.select(active_sele,"byobj pk1") editor.attach_fragment("pk1", name, pos, geom, _self=self.cmd) self.doAutoPick() else: self.cmd.unpick() AttachWizard(self.cmd).toggle(name, pos, geom, text)
def do_pick(self, bondFlag): if self.mode == 0: self.cmd.select(active_sele, "bymol pk1") editor.attach_fragment("pk1", self.fragment, self.position, self.geometry, _self=self.cmd) elif self.mode == 1: self.cmd.select(active_sele, "bymol pk1") editor.combine_fragment("pk1", self.fragment, self.position, self.geometry, _self=self.cmd) self.mode = 0 self.cmd.refresh_wizard() self.cmd.unpick() if not self.getRepeating(): self.actionWizardDone()