pKa/find_simple.py
def background():
    """Find correlation between background interaction energy and number of hbonds"""
    import os
    dirs=os.listdir('data')
    xs=[]
    ys=[]
    count=0
    #dirs=['1bli']
    for dir in dirs:
        print 'Processing %s' %dir
        #
        # find the PDB file
        #
        realdir=os.path.join(os.getcwd(),'data',dir)
        files=os.listdir(realdir)
        for file in files:
            realfile=os.path.join(realdir,file)
            if file[-4:]=='.pdb':
                import pKaTool.pKaIO
                X=pKaTool.pKaIO.pKaIO(realfile)
                X.assess_status()
                if X.calculation_completed==1:
                    #
                    # Hurra, the calc is complete. Load the desolvation energies
                    #
                    PBEbackground=X.read_backgr()
                    #
                    # Now calculate the desolvation energies with Protool
                    #
                    P=Protool.structureIO()
                    P.readpdb(realfile)
                    P.get_titratable_groups()
                    P.calculate_background()
                    #
                    #
                    x=[]
                    y=[]
                    residues= PBEbackground.keys()
                    residues.sort()
                    for residue in residues:
                        if P.background.has_key(residue) and PBEbackground[residue]<19.0:
                            x.append(P.background[residue])
                            #x.append(count)
                            count=count+1
                            y.append(PBEbackground[residue])
                            print '%12s %5.2f %5.2f' %(residue,P.background[residue],PBEbackground[residue])
                    xs.append(x)
                    ys.append(y)
    plotit(xs,ys,'Background',dirs)
    return
Find correlation between background interaction energy and number of hbonds
Find correlation between background interaction energy and number of hbonds
Find correlation between background interaction energy and number of hbonds
def background():
    import os
    dirs=os.listdir('data')
    xs=[]
    ys=[]
    count=0
    for dir in dirs:
        print 'Processing %s' %dir
         find the PDB file
        realdir=os.path.join(os.getcwd(),'data',dir)
        files=os.listdir(realdir)
        for file in files:
            realfile=os.path.join(realdir,file)
            if file[-4:]=='.pdb':
                import pKaTool.pKaIO
                X=pKaTool.pKaIO.pKaIO(realfile)
                X.assess_status()
                if X.calculation_completed==1:
                     Hurra, the calc is complete. Load the desolvation energies
                    PBEbackground=X.read_backgr()
                     Now calculate the desolvation energies with Protool
                    P=Protool.structureIO()
                    P.readpdb(realfile)
                    P.get_titratable_groups()
                    P.calculate_background()
                    x=[]
                    y=[]
                    residues= PBEbackground.keys()
                    residues.sort()
                    for residue in residues:
                        if P.background.has_key(residue) and PBEbackground[residue]<19.0:
                            x.append(P.background[residue])
                            x.append(count)
                            count=count+1
                            y.append(PBEbackground[residue])
                            print '%12s %5.2f %5.2f' %(residue,P.background[residue],PBEbackground[residue])
                    xs.append(x)
                    ys.append(y)
    plotit(xs,ys,'Background',dirs)
    return
def background ( ) : import os dirs = os . listdir ( 'data' ) xs = [ ] ys = [ ] count = 0 for dir in dirs : print 'Processing %s' % dir realdir = os . path . join ( os . getcwd ( ) , 'data' , dir ) files = os . listdir ( realdir ) for file in files : realfile = os . path . join ( realdir , file ) if file [ - 4 : ] == '.pdb' : import pKaTool . pKaIO X = pKaTool . pKaIO . pKaIO ( realfile ) X . assess_status ( ) if X . calculation_completed == 1 : PBEbackground = X . read_backgr ( ) P = Protool . structureIO ( ) P . readpdb ( realfile ) P . get_titratable_groups ( ) P . calculate_background ( ) x = [ ] y = [ ] residues = PBEbackground . keys ( ) residues . sort ( ) for residue in residues : if P . background . has_key ( residue ) and PBEbackground [ residue ] < 19.0 : x . append ( P . background [ residue ] ) count = count + 1 y . append ( PBEbackground [ residue ] ) print '%12s %5.2f %5.2f' % ( residue , P . background [ residue ] , PBEbackground [ residue ] ) xs . append ( x ) ys . append ( y ) plotit ( xs , ys , 'Background' , dirs ) return
Find correlation between background interaction energy and number of hbonds
Find correlation between background interaction energy and number of hbonds
"""Find correlation between background interaction energy and number of hbonds""" #dirs=['1bli'] # # find the PDB file # # # Hurra, the calc is complete. Load the desolvation energies # # # Now calculate the desolvation energies with Protool # # # #x.append(count)