def intra_fit(selection, state=1, quiet=1, mix=0, _self=cmd): ''' DESCRIPTION "intra_fit" fits all states of an object to an atom selection in the specified state. It returns the rms values to python as an array. USAGE intra_fit selection [, state] ARGUMENTS selection = string: atoms to fit state = integer: target state PYMOL API cmd.intra_fit( string selection, int state ) EXAMPLES intra_fit ( name ca ) PYTHON EXAMPLE from pymol import cmd rms = cmd.intra_fit("(name ca)",1) SEE ALSO fit, rms, rms_cur, intra_rms, intra_rms_cur, pair_fit ''' # preprocess selection selection = selector.process(selection) # r = DEFAULT_ERROR state = int(state) mix = int(mix) try: _self.lock(_self) r = _cmd.intrafit(_self._COb,"("+str(selection)+")",int(state)-1,2,int(quiet),int(mix)) finally: _self.unlock(r,_self) if r<0.0: r = DEFAULT_ERROR elif not quiet: st = 1 for a in r: if a>=0.0: if mix: print " cmd.intra_fit: %5.3f in state %d vs mixed target"%(a,st) else: print " cmd.intra_fit: %5.3f in state %d vs state %d"%(a,st,state) st = st + 1 if _self._raising(r,_self): raise pymol.CmdException return r
def intra_rms(selection, state=0, quiet=1, _self=cmd): ''' DESCRIPTION "intra_rms" calculates rms fit values for all states of an object over an atom selection relative to the indicated state. Coordinates are left unchanged. The rms values are returned as a python array. EXAMPLE from pymol import cmd rms = cmd.intra_rms("(name ca)",1) print rms PYMOL API cmd.intra_rms(string selection, int state) SEE ALSO fit, rms, rms_cur, intra_fit, intra_rms_cur, pair_fit ''' # preprocess selection selection = selector.process(selection) # r = DEFAULT_ERROR state = int(state) try: _self.lock(_self) r = _cmd.intrafit(_self._COb, "(" + str(selection) + ")", int(state) - 1, 1, int(quiet), int(0)) finally: _self.unlock(r, _self) if r < 0.0: r = DEFAULT_ERROR elif not quiet: st = 1 for a in r: if a >= 0.0: print " cmd.intra_rms: %5.3f in state %d vs state %d" % ( a, st, state) st = st + 1 if _self._raising(r, _self): raise pymol.CmdException return r
def intra_rms(selection, state=0, quiet=1, _self=cmd): ''' DESCRIPTION "intra_rms" calculates rms fit values for all states of an object over an atom selection relative to the indicated state. Coordinates are left unchanged. The rms values are returned as a python array. EXAMPLE from pymol import cmd rms = cmd.intra_rms("(name ca)",1) print rms PYMOL API cmd.intra_rms(string selection, int state) SEE ALSO fit, rms, rms_cur, intra_fit, intra_rms_cur, pair_fit ''' # preprocess selection selection = selector.process(selection) # r = DEFAULT_ERROR state = int(state) try: _self.lock(_self) r = _cmd.intrafit(_self._COb,"("+str(selection)+")",int(state)-1,1,int(quiet),int(0)) finally: _self.unlock(r,_self) if r<0.0: r = DEFAULT_ERROR elif not quiet: st = 1 for a in r: if a>=0.0: print " cmd.intra_rms: %5.3f in state %d vs state %d"%(a,st,state) st = st + 1 if _self._raising(r,_self): raise pymol.CmdException return r
def intra_fit(selection, state=1, quiet=1, mix=0, _self=cmd): ''' DESCRIPTION "intra_fit" fits all states of an object to an atom selection in the specified state. It returns the rms values to python as an array. USAGE intra_fit selection [, state] ARGUMENTS selection = string: atoms to fit state = integer: target state PYMOL API cmd.intra_fit( string selection, int state ) EXAMPLES intra_fit ( name ca ) PYTHON EXAMPLE from pymol import cmd rms = cmd.intra_fit("(name ca)",1) SEE ALSO fit, rms, rms_cur, intra_rms, intra_rms_cur, pair_fit ''' # preprocess selection selection = selector.process(selection) # r = DEFAULT_ERROR state = int(state) mix = int(mix) try: _self.lock(_self) r = _cmd.intrafit(_self._COb, "(" + str(selection) + ")", int(state) - 1, 2, int(quiet), int(mix)) finally: _self.unlock(r, _self) if r < 0.0: r = DEFAULT_ERROR elif not quiet: st = 1 for a in r: if a >= 0.0: if mix: print " cmd.intra_fit: %5.3f in state %d vs mixed target" % ( a, st) else: print " cmd.intra_fit: %5.3f in state %d vs state %d" % ( a, st, state) st = st + 1 if _self._raising(r, _self): raise pymol.CmdException return r