Пример #1
0
 def mouse_up(self, event):
     MouseMode.mouse_up(self, event)
     if self._markers:
         self._log_tape_command()
         self._markers = []
     else:
         self._clear()
Пример #2
0
 def mouse_up(self, event):
     if self._dragged:
         self.log_volume_command()
     elif self._multiwindow:
         self._window_num += 1
     self._maps = []
     MouseMode.mouse_up(self, event)
Пример #3
0
    def mouse_up(self, event):
        MouseMode.mouse_up(self, event)

        x, y = event.position()
        pick = self.view.picked_object(x, y)

        if isinstance(pick, PickedPseudobond) and not self._markerset:
            bond = pick.pbond
            if bond.group.name == "TS bonds":
                atom1, atom2 = bond.atoms
                run(self.session,
                    "~tsbond %s %s" % (atom1.atomspec, atom2.atomspec))
                self.reset()
            return

        if isinstance(pick, PickedBond) and not self._markerset:
            bond = pick.bond
            run(self.session, "tsbond %s" % bond.atomspec)
            self.reset()
            return

        if not self._atom1:
            return

        if isinstance(
                pick,
                PickedAtom) and pick.atom.structure is self._atom1.structure:
            atom = pick.atom
        else:
            atom = self._atom2

        if not atom:
            self.reset()
            return

        if atom.structure is self._atom1.structure and atom is not self._atom1:
            avg_radius = self.avg_bond_radius(self._atom1, atom)

            run(
                self.session, "tsbond %s %s radius %.3f" % (
                    self._atom1.atomspec,
                    atom.atomspec,
                    avg_radius,
                ))

        self.reset()
Пример #4
0
 def mouse_up(self, event):
     MouseMode.mouse_up(self, event)
     self._log_command()
     self._delete_bond_rotation()
Пример #5
0
 def mouse_up(self, event):
     MouseMode.mouse_up(self, event)
     x,y = event.position()
     pick = self.session.main_view.picked_object(x, y)
     self._picked_object(pick)
Пример #6
0
 def mouse_up(self, event):
     self._drawing.display=False
     MouseMode.mouse_up(self, event)
Пример #7
0
 def mouse_up(self, event):
     MouseMode.mouse_up(self, event)
     self.tugging = False
Пример #8
0
 def mouse_up(self, event):
     self._unlabel()
     MouseMode.mouse_up(self, event)
     _log_swapaa_command(self._residue)
     self._residue = None
     self._last_y = None
Пример #9
0
 def mouse_up(self, event):
     MouseMode.mouse_up(self, event)
Пример #10
0
 def mouse_up(self, event):
     self._log_label_move_command()
     self._label = None
     MouseMode.mouse_up(self, event)
Пример #11
0
 def mouse_up(self, event):
     self.log_volume_command()
     self._maps = []
     MouseMode.mouse_up(self, event)