def start(self): cmd = pymol.cmd if cmd._COb is not None: raise RuntimeError('can only start SingletonPyMOL once') with pymol2_lock: cmd._COb = _cmd._new(pymol, pymol.invocation.options) _cmd._start(cmd._COb, cmd) # this instance tracking is redundant with the "cmd" module itself self._COb = cmd._COb self.cmd = cmd
def start(self): pymol2_lock.acquire() try: # fire off the C code _cmd._start(self._COb, self.cmd) # add in some additional Python modules self.chempy = pymol.chempy self.bonds = pymol.bonds self.models = pymol.models except: traceback.print_exc() pymol2_lock.release()
def start(self): with pymol2_lock: _cmd._start(self._COb, self.cmd)