pKaTool/stab_fit/10R_unfold.py
def main(options):
    """Parse options and find out what to do"""
    if options.graph=='numsites':
        tms=[]
        sites=[]
        import pylab
        for sitenum in range(1,10):
            options.kin_sites=sitenum
            options.plot=False
            xs,ys,Tm=kinetic(options)
            pylab.plot(xs,ys,'o-',label='%d sites. Tm: %5.1f' %(sitenum,Tm),linewidth=2)
            sites.append(sitenum)
            tms.append(Tm)
        pylab.xlabel('Temperature (C)')
        pylab.ylabel('Residual activity (%)')
        pylab.ylim([0.0,100.0])
        pylab.legend()
        pylab.title('Number of protease sites')
        pylab.show()
        #
        pylab.clf()
        pylab.plot(sites,tms,'ro-',linewidth=2)
        pylab.xlabel('Number of sites')
        pylab.ylabel('T50')
        pylab.show()
        return
    elif options.graph=='twosites':
        # fast / slow site, + stabilization
        import pylab
        std_reactions=[[1E10,1E5,5E4,1E10],
                       [1E10,9E4,5E4,1E10]]
        for stab1,stab2 in [[0,0],[options.stab,0],[0,options.stab],[options.stab,options.stab]]:
            import string,copy
            options.reactions=copy.deepcopy(std_reactions)
            options.reactions[0][1]=options.reactions[0][1]+stab1*1000.0
            options.reactions[1][1]=options.reactions[1][1]+stab2*1000.0
            
            #options.reactions[0]=string.join(options.reactions[0],',')
            #options.reactions[1]=string.join(options.reactions[1],',')
            #
            options.plot=False
            #print options.reactions
            #print std_reactions,'R'
            xs,ys,Tm=kinetic(options)
            pylab.plot(xs,ys,'o-',label='%5.1f,%5.1f, T50: %5.1f' %(stab1,stab2,Tm))
        pylab.legend()
        
        pylab.suptitle('Ea1: %3.2e kJ/mol, Ea2 %3.2e kJ/mol stab: %5.1f kJ/mol' %(std_reactions[0][1],std_reactions[1][1],options.stab))
        pylab.title('Two sites')
        pylab.show()
    
    
    if options.unfoldtype=='kinetic':
        kinetic(options)
    elif options.unfoldtype=='equilibrium':
        equilibrium(options)
    else:
        raise Exception('unknown unfolding type: %s' %options.unfoldtype)
    #
                        
            
    
    return
Parse options and find out what to do
Parse options and find out what to do
Parse options and find out what to do
def main(options):
    if options.graph=='numsites':
        tms=[]
        sites=[]
        import pylab
        for sitenum in range(1,10):
            options.kin_sites=sitenum
            options.plot=False
            xs,ys,Tm=kinetic(options)
            pylab.plot(xs,ys,'o-',label='%d sites. Tm: %5.1f' %(sitenum,Tm),linewidth=2)
            sites.append(sitenum)
            tms.append(Tm)
        pylab.xlabel('Temperature (C)')
        pylab.ylabel('Residual activity (%)')
        pylab.ylim([0.0,100.0])
        pylab.legend()
        pylab.title('Number of protease sites')
        pylab.show()
        pylab.clf()
        pylab.plot(sites,tms,'ro-',linewidth=2)
        pylab.xlabel('Number of sites')
        pylab.ylabel('T50')
        pylab.show()
        return
    elif options.graph=='twosites':
         fast / slow site, + stabilization
        import pylab
        std_reactions=[[1E10,1E5,5E4,1E10],
                       [1E10,9E4,5E4,1E10]]
        for stab1,stab2 in [[0,0],[options.stab,0],[0,options.stab],[options.stab,options.stab]]:
            import string,copy
            options.reactions=copy.deepcopy(std_reactions)
            options.reactions[0][1]=options.reactions[0][1]+stab1*1000.0
            options.reactions[1][1]=options.reactions[1][1]+stab2*1000.0
            options.reactions[0]=string.join(options.reactions[0],',')
            options.reactions[1]=string.join(options.reactions[1],',')
            options.plot=False
            print options.reactions
            print std_reactions,'R'
            xs,ys,Tm=kinetic(options)
            pylab.plot(xs,ys,'o-',label='%5.1f,%5.1f, T50: %5.1f' %(stab1,stab2,Tm))
        pylab.legend()
        pylab.suptitle('Ea1: %3.2e kJ/mol, Ea2 %3.2e kJ/mol stab: %5.1f kJ/mol' %(std_reactions[0][1],std_reactions[1][1],options.stab))
        pylab.title('Two sites')
        pylab.show()
    if options.unfoldtype=='kinetic':
        kinetic(options)
    elif options.unfoldtype=='equilibrium':
        equilibrium(options)
    else:
        raise Exception('unknown unfolding type: %s' %options.unfoldtype)
    return
def main ( options ) : if options . graph == 'numsites' : tms = [ ] sites = [ ] import pylab for sitenum in range ( 1 , 10 ) : options . kin_sites = sitenum options . plot = False xs , ys , Tm = kinetic ( options ) pylab . plot ( xs , ys , 'o-' , label = '%d sites. Tm: %5.1f' % ( sitenum , Tm ) , linewidth = 2 ) sites . append ( sitenum ) tms . append ( Tm ) pylab . xlabel ( 'Temperature (C)' ) pylab . ylabel ( 'Residual activity (%)' ) pylab . ylim ( [ 0.0 , 100.0 ] ) pylab . legend ( ) pylab . title ( 'Number of protease sites' ) pylab . show ( ) pylab . clf ( ) pylab . plot ( sites , tms , 'ro-' , linewidth = 2 ) pylab . xlabel ( 'Number of sites' ) pylab . ylabel ( 'T50' ) pylab . show ( ) return elif options . graph == 'twosites' : import pylab std_reactions = [ [ 1E10 , 1E5 , 5E4 , 1E10 ] , [ 1E10 , 9E4 , 5E4 , 1E10 ] ] for stab1 , stab2 in [ [ 0 , 0 ] , [ options . stab , 0 ] , [ 0 , options . stab ] , [ options . stab , options . stab ] ] : import string , copy options . reactions = copy . deepcopy ( std_reactions ) options . reactions [ 0 ] [ 1 ] = options . reactions [ 0 ] [ 1 ] + stab1 * 1000.0 options . reactions [ 1 ] [ 1 ] = options . reactions [ 1 ] [ 1 ] + stab2 * 1000.0 options . plot = False xs , ys , Tm = kinetic ( options ) pylab . plot ( xs , ys , 'o-' , label = '%5.1f,%5.1f, T50: %5.1f' % ( stab1 , stab2 , Tm ) ) pylab . legend ( ) pylab . suptitle ( 'Ea1: %3.2e kJ/mol, Ea2 %3.2e kJ/mol stab: %5.1f kJ/mol' % ( std_reactions [ 0 ] [ 1 ] , std_reactions [ 1 ] [ 1 ] , options . stab ) ) pylab . title ( 'Two sites' ) pylab . show ( ) if options . unfoldtype == 'kinetic' : kinetic ( options ) elif options . unfoldtype == 'equilibrium' : equilibrium ( options ) else : raise Exception ( 'unknown unfolding type: %s' % options . unfoldtype ) return
Parse options and find out what to do
Parse options and find out what to do
"""Parse options and find out what to do""" # # fast / slow site, + stabilization #options.reactions[0]=string.join(options.reactions[0],',') #options.reactions[1]=string.join(options.reactions[1],',') # #print options.reactions #print std_reactions,'R' #
options