Example #1
0
    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
Example #2
0
    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
Example #3
0
    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()
Example #4
0
    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()
Example #5
0
 def start(self):
     with pymol2_lock:
         _cmd._start(self._COb, self.cmd)
Example #6
0
 def start(self):
     with pymol2_lock:
         _cmd._start(self._COb, self.cmd)