Exemplo n.º 1
0
    def align(mobile,
              target,
              cutoff=2.0,
              cycles=5,
              gap=-10.0,
              extend=-0.5,
              max_gap=50,
              object=None,
              matrix="BLOSUM62",
              mobile_state=0,
              target_state=0,
              quiet=1,
              max_skip=0,
              transform=1,
              reset=0,
              _self=cmd):
        '''
DESCRIPTION

        "align" performs a sequence alignment followed by a structural
        superposition, and then carries out zero or more cycles of
        refinement in order to reject outliers.

USAGE 

        align mobile, target [, object=name ]

ARGUMENTS

        mobile = string: atom selection for mobile atoms

        target = string: atom selection for target atoms

        object = string: name of alignment object to create
        
NOTES

        If object is specified, then align will create an object which
        indicates paired atoms and supports visualization of the alignment
        in the sequence viewer.

EXAMPLE

        align protA////CA, protB////CA, object=alnAB

SEE ALSO

        super, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur
                '''
        r = DEFAULT_ERROR
        mobile = selector.process(mobile)
        target = selector.process(target)
        matrix = str(matrix)
        if matrix.lower() in ['none', '']:
            mfile = ''
        elif os.path.exists(matrix):
            mfile = matrix
        else:
            mfile = cmd.exp_path("$PYMOL_DATA/pymol/matrices/" + matrix)
        if object == None: object = ''
        # delete existing alignment object (if asked to reset it)
        try:
            _self.lock(_self)
            r = _cmd.align(_self._COb, mobile,
                           "(" + target + ")", float(cutoff), int(cycles),
                           float(gap), float(extend), int(max_gap),
                           str(object), str(mfile),
                           int(mobile_state) - 1,
                           int(target_state) - 1, int(quiet), int(max_skip),
                           int(transform), int(reset), -1.0, 0.0, 0.0, 0.0,
                           0.0, 0.0, 0, 0.0)
        finally:
            _self.unlock(r, _self)
        if _self._raising(r, _self): raise pymol.CmdException
        return r
Exemplo n.º 2
0
    def align(mobile, target, cutoff=2.0, cycles=5, gap=-10.0,
              extend=-0.5, max_gap=50, object=None,
              matrix="BLOSUM62", mobile_state=0, target_state=0,
              quiet=1, max_skip=0, transform=1, reset=0, _self=cmd):
        
        '''
DESCRIPTION

    "align" performs a sequence alignment followed by a structural
    superposition, and then carries out zero or more cycles of
    refinement in order to reject outliers.

USAGE 

    align mobile, target [, object=name ]

ARGUMENTS

    mobile = string: atom selection for mobile atoms

    target = string: atom selection for target atoms

    object = string: name of alignment object to create
    
NOTES

    If object is specified, then align will create an object which
    indicates paired atoms and supports visualization of the alignment
    in the sequence viewer.

EXAMPLE

    align protA////CA, protB////CA, object=alnAB

SEE ALSO

    super, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur
        '''
        r = DEFAULT_ERROR
        mobile = selector.process(mobile)
        target = selector.process(target)
        matrix = str(matrix)
        if string.lower(matrix)=='none':
            matrix=''
        if len(matrix):
            mfile = cmd.exp_path("$PYMOL_DATA/pymol/matrices/"+matrix)
        else:
            mfile = ''
        if object==None: object=''
        # delete existing alignment object (if asked to reset it)
        try:
            _self.lock(_self)
            r = _cmd.align(_self._COb,mobile,"("+target+")",
                           float(cutoff),int(cycles),float(gap),
                           float(extend),int(max_gap),str(object),str(mfile),
                           int(mobile_state)-1,int(target_state)-1,
                           int(quiet),int(max_skip),int(transform),int(reset),
                           -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0.0)
        finally:
            _self.unlock(r,_self)
        if _self._raising(r,_self): raise pymol.CmdException         
        return r
Exemplo n.º 3
0
    def super(mobile,
              target,
              cutoff=2.0,
              cycles=5,
              gap=-1.5,
              extend=-0.7,
              max_gap=50,
              object=None,
              matrix="BLOSUM62",
              mobile_state=0,
              target_state=0,
              quiet=1,
              max_skip=0,
              transform=1,
              reset=0,
              seq=0.0,
              radius=12.0,
              scale=17.0,
              base=0.65,
              coord=0.0,
              expect=6.0,
              window=3,
              ante=-1.0,
              _self=cmd):
        '''
DESCRIPTION

        NOTE: This feature is experimental and unsupported.
        
        "super" performs a residue-based pairwise alignment followed by a
        structural superposition, and then carries out zero or more cycles
        of refinement in order to reject outliers.

USAGE 

        super mobile, target [, object=name ]

NOTES

        By adjusting various parameters, the nature of the initial
        alignment can be modified to include or exclude various factors
        including sequence similarity, main chain path, secondary &
        tertiary structure, and current coordinates.

EXAMPLE

        super protA////CA, protB////CA, object=supeAB

SEE ALSO

        align, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur
        '''
        r = DEFAULT_ERROR
        mobile = selector.process(mobile)
        target = selector.process(target)
        if object == None: object = ''
        matrix = str(matrix)
        if matrix.lower() in ['none', '']:
            mfile = ''
        elif os.path.exists(matrix):
            mfile = matrix
        else:
            mfile = cmd.exp_path("$PYMOL_DATA/pymol/matrices/" + matrix)
        # delete existing alignment object (if asked to reset it)
        try:
            _self.lock(_self)

            r = _cmd.align(_self._COb, mobile,
                           "(" + target + ")", float(cutoff), int(cycles),
                           float(gap), float(extend), int(max_gap),
                           str(object), str(mfile),
                           int(mobile_state) - 1,
                           int(target_state) - 1, int(quiet), int(max_skip),
                           int(transform), int(reset), float(seq),
                           float(radius), float(scale), float(base),
                           float(coord), float(expect), int(window),
                           float(ante))

        finally:
            _self.unlock(r, _self)
        if _self._raising(r, _self): raise pymol.CmdException
        return r
Exemplo n.º 4
0
    def super(mobile, target, cutoff=2.0, cycles=5,
              gap=-1.5, extend=-0.7, max_gap=50, object=None,
              matrix="BLOSUM62", mobile_state=0, target_state=0, 
              quiet=1, max_skip=0, transform=1, reset=0,
              seq=0.0, radius=12.0, scale=17.0, base=0.65,
              coord=0.0, expect=6.0, window=3, ante=-1.0,
              _self=cmd):
        
        '''
DESCRIPTION

    NOTE: This feature is experimental and unsupported.
    
    "super" performs a residue-based pairwise alignment followed by a
    structural superposition, and then carries out zero or more cycles
    of refinement in order to reject outliers.

USAGE 

    super mobile, target [, object=name ]

NOTES

    By adjusting various parameters, the nature of the initial
    alignment can be modified to include or exclude various factors
    including sequence similarity, main chain path, secondary &
    tertiary structure, and current coordinates.

EXAMPLE

    super protA////CA, protB////CA, object=supeAB

SEE ALSO

    align, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur
    '''
        r = DEFAULT_ERROR
        mobile = selector.process(mobile)
        target = selector.process(target)
        if object==None: object=''
        matrix = str(matrix)
        if string.lower(matrix)=='none':
            matrix=''
        if len(matrix):
            mfile = cmd.exp_path("$PYMOL_DATA/pymol/matrices/"+matrix)
        else:
            mfile = ''        
        # delete existing alignment object (if asked to reset it)
        try:
            _self.lock(_self)
            
            r = _cmd.align(_self._COb,mobile,"("+target+")",float(cutoff),
                           int(cycles),float(gap),float(extend),int(max_gap),
                           str(object),str(mfile),
                           int(mobile_state)-1,int(target_state)-1,
                           int(quiet),int(max_skip),int(transform),
                           int(reset),float(seq),
                           float(radius),float(scale),float(base),
                           float(coord),float(expect),int(window),
                           float(ante))
            
        finally:
            _self.unlock(r,_self)
        if _self._raising(r,_self): raise pymol.CmdException         
        return r