Exemplo n.º 1
0
    def fit(mobile,
            target,
            mobile_state=0,
            target_state=0,
            quiet=1,
            matchmaker=0,
            cutoff=2.0,
            cycles=0,
            object=None,
            _self=cmd):
        '''
DESCRIPTION

	"fit" superimposes the model in the first selection on to the model
	in the second selection.
	
USAGE

	fit mobile, target

EXAMPLES

	fit protA, protB

NOTES

	Only matching atoms in both selections will be used for the fit.
	
	Since atoms are matched based on all of their identifiers
	(including segment and chain identifiers), this command is only
	helpful when comparing very similar structures.

SEE ALSO

	align, super, pair_fit, rms, rms_cur, intra_fit, intra_rms, intra_rms_cur
		'''
        r = DEFAULT_ERROR
        a = str(mobile)
        b = str(target)
        # preprocess selections
        a = selector.process(a)
        b = selector.process(b)
        #
        if object == None: object = ''
        if int(matchmaker) == 0:
            sele1 = "((%s) in (%s))" % (str(a), str(b))
            sele2 = "((%s) in (%s))" % (str(b), str(a))
        else:
            sele1 = str(a)
            sele2 = str(b)
        try:
            _self.lock(_self)
            r = _cmd.fit(_self._COb, sele1, sele2, 2,
                         int(mobile_state) - 1,
                         int(target_state) - 1, int(quiet), int(matchmaker),
                         float(cutoff), int(cycles), str(object))
        finally:
            _self.unlock(r, _self)
        if _self._raising(r, _self): raise pymol.CmdException
        return r
Exemplo n.º 2
0
 def expfit(a,b,_self=cmd): # Huh?
     r = DEFAULT_ERROR
     try:
         _self.lock(_self)   
         r = _cmd.fit(_self._COb,a,b,2)
     finally:
         _self.unlock(r,_self)
     if _self._raising(r,_self): raise pymol.CmdException                  
     return r
Exemplo n.º 3
0
 def expfit(a, b, _self=cmd):  # Huh?
     r = DEFAULT_ERROR
     try:
         _self.lock(_self)
         r = _cmd.fit(_self._COb, a, b, 2)
     finally:
         _self.unlock(r, _self)
     if _self._raising(r, _self): raise pymol.CmdException
     return r
Exemplo n.º 4
0
    def rms(mobile,
            target,
            mobile_state=0,
            target_state=0,
            quiet=1,
            matchmaker=0,
            cutoff=2.0,
            cycles=0,
            object=None,
            _self=cmd):
        '''
DESCRIPTION

	"rms" computes a RMS fit between two atom selections, but does not
	tranform the models after performing the fit.

USAGE

	rms (selection), (target-selection)

EXAMPLES

	fit ( mutant and name ca ), ( wildtype and name ca )

SEE ALSO

	fit, rms_cur, intra_fit, intra_rms, intra_rms_cur, pair_fit	  
		'''
        r = DEFAULT_ERROR
        a = str(mobile)
        b = str(target)
        # preprocess selections
        a = selector.process(a)
        b = selector.process(b)
        #
        if object == None: object = ''
        if int(matchmaker) == 0:
            sele1 = "((%s) in (%s))" % (str(a), str(b))
            sele2 = "((%s) in (%s))" % (str(b), str(a))
        else:
            sele1 = str(a)
            sele2 = str(b)
        try:
            _self.lock(_self)
            r = _cmd.fit(_self._COb, sele1, sele2, 1,
                         int(mobile_state) - 1,
                         int(target_state) - 1, int(quiet), int(matchmaker),
                         float(cutoff), int(cycles), str(object))
        finally:
            _self.unlock(r, _self)
        if _self._raising(r, _self): raise pymol.CmdException
        return r
Exemplo n.º 5
0
    def fit(mobile, target, mobile_state=0, target_state=0,
              quiet=1, matchmaker=0, cutoff=2.0, cycles=0, object=None, _self=cmd):
        '''
DESCRIPTION

    "fit" superimposes the model in the first selection on to the model
    in the second selection.
    
USAGE

    fit mobile, target

EXAMPLES

    fit protA, protB

NOTES

    Only matching atoms in both selections will be used for the fit.
    
    Since atoms are matched based on all of their identifiers
    (including segment and chain identifiers), this command is only
    helpful when comparing very similar structures.

SEE ALSO

    align, super, pair_fit, rms, rms_cur, intra_fit, intra_rms, intra_rms_cur
        '''
        r = DEFAULT_ERROR      
        a=str(mobile)
        b=str(target)
        # preprocess selections
        a = selector.process(a)
        b = selector.process(b)
        #
        if object==None: object=''
        if int(matchmaker)==0:
            sele1 = "((%s) in (%s))" % (str(a),str(b))
            sele2 = "((%s) in (%s))" % (str(b),str(a))
        else:
            sele1 = str(a)
            sele2 = str(b)
        try:
            _self.lock(_self)
            r = _cmd.fit(_self._COb,sele1,sele2,2,
                             int(mobile_state)-1,int(target_state)-1,
                             int(quiet),int(matchmaker),float(cutoff),
                             int(cycles),str(object))
        finally:
            _self.unlock(r,_self)
        if _self._raising(r,_self): raise pymol.CmdException         
        return r
Exemplo n.º 6
0
    def rms_cur(mobile,
                target,
                mobile_state=0,
                target_state=0,
                quiet=1,
                matchmaker=0,
                cutoff=2.0,
                cycles=0,
                object=None,
                _self=cmd):
        '''
DESCRIPTION

	"rms_cur" computes the RMS difference between two atom
	selections without performing any fitting.

USAGE

	rms_cur (selection), (selection)

SEE ALSO

	fit, rms, intra_fit, intra_rms, intra_rms_cur, pair_fit	  
		'''
        r = DEFAULT_ERROR
        a = str(mobile)
        b = str(target)
        # preprocess selections
        a = selector.process(a)
        b = selector.process(b)
        #
        if object == None: object = ''
        if int(matchmaker) == 0:
            sele1 = "((%s) in (%s))" % (str(a), str(b))
            sele2 = "((%s) in (%s))" % (str(b), str(a))
        else:
            sele1 = str(a)
            sele2 = str(b)
        try:
            _self.lock(_self)
            r = _cmd.fit(_self._COb, sele1, sele2, 0,
                         int(mobile_state) - 1,
                         int(target_state) - 1, int(quiet), int(matchmaker),
                         float(cutoff), int(cycles), str(object))
        finally:
            _self.unlock(r, _self)
        if _self._raising(r, _self): raise pymol.CmdException
        return r
Exemplo n.º 7
0
    def rms(mobile, target, mobile_state=0, target_state=0, quiet=1,
              matchmaker=0, cutoff=2.0, cycles=0, object=None, _self=cmd):
        '''
DESCRIPTION

    "rms" computes a RMS fit between two atom selections, but does not
    tranform the models after performing the fit.

USAGE

    rms (selection), (target-selection)

EXAMPLES

    fit ( mutant and name ca ), ( wildtype and name ca )

SEE ALSO

    fit, rms_cur, intra_fit, intra_rms, intra_rms_cur, pair_fit   
        '''
        r = DEFAULT_ERROR      
        a=str(mobile)
        b=str(target)
        # preprocess selections
        a = selector.process(a)
        b = selector.process(b)
        #
        if object==None: object=''      
        if int(matchmaker)==0:
            sele1 = "((%s) in (%s))" % (str(a),str(b))
            sele2 = "((%s) in (%s))" % (str(b),str(a))
        else:
            sele1 = str(a)
            sele2 = str(b)
        try:
            _self.lock(_self)   
            r = _cmd.fit(_self._COb,sele1,sele2,1,
                             int(mobile_state)-1,int(target_state)-1,
                             int(quiet),int(matchmaker),float(cutoff),
                             int(cycles),str(object))
        finally:
            _self.unlock(r,_self)
        if _self._raising(r,_self): raise pymol.CmdException         
        return r
Exemplo n.º 8
0
    def rms_cur(mobile, target, mobile_state=0, target_state=0,
                quiet=1, matchmaker=0, cutoff=2.0, cycles=0,
                object=None, _self=cmd):
        
        '''
DESCRIPTION

    "rms_cur" computes the RMS difference between two atom
    selections without performing any fitting.

USAGE

    rms_cur (selection), (selection)

SEE ALSO

    fit, rms, intra_fit, intra_rms, intra_rms_cur, pair_fit   
        '''
        r = DEFAULT_ERROR      
        a=str(mobile)
        b=str(target)
        # preprocess selections
        a = selector.process(a)
        b = selector.process(b)
        #
        if object==None: object=''            
        if int(matchmaker)==0:
            sele1 = "((%s) in (%s))" % (str(a),str(b))
            sele2 = "((%s) in (%s))" % (str(b),str(a))
        else:
            sele1 = str(a)
            sele2 = str(b)
        try:
            _self.lock(_self)
            r = _cmd.fit(_self._COb,sele1,sele2,0,
                             int(mobile_state)-1,int(target_state)-1,
                             int(quiet),int(matchmaker),float(cutoff),
                             int(cycles),str(object))
        finally:
            _self.unlock(r,_self)
        if _self._raising(r,_self): raise pymol.CmdException         
        return r