pKaTool/pKaIO.py
def write_pKacoop_submission(self,filename='submit.pkac',prediction_name='TEST',groups=[]):
        """Write a submission file for the pKa cooperative"""
        if groups==[]:
            return
        groups.sort()
        tcs=self.readtitcurv()
        fd=open(filename,'w')
        for group in groups:
            fd.write('PREDICTION: %s\n' %prediction_name)
            number=group.split(':')
            name='%s %s %s' %(number[2],number[0],number[1])
            fd.write('TITGROUP: %s\n' %name)
            pHs=tcs[group].keys()
            pHs.sort()
            pHs.remove('pKa')
            for pH in pHs:
                fd.write('%5.2f, %5.2f\n' %(pH,tcs[group][pH]))
            fd.write('END\n')
        fd.close()
Write a submission file for the pKa cooperative
Write a submission file for the pKa cooperative
Write a submission file for the pKa cooperative
def write_pKacoop_submission(self,filename='submit.pkac',prediction_name='TEST',groups=[]):
        if groups==[]:
            return
        groups.sort()
        tcs=self.readtitcurv()
        fd=open(filename,'w')
        for group in groups:
            fd.write('PREDICTION: %s\n' %prediction_name)
            number=group.split(':')
            name='%s %s %s' %(number[2],number[0],number[1])
            fd.write('TITGROUP: %s\n' %name)
            pHs=tcs[group].keys()
            pHs.sort()
            pHs.remove('pKa')
            for pH in pHs:
                fd.write('%5.2f, %5.2f\n' %(pH,tcs[group][pH]))
            fd.write('END\n')
        fd.close()
def write_pKacoop_submission ( self , filename = 'submit.pkac' , prediction_name = 'TEST' , groups = [ ] ) : if groups == [ ] : return groups . sort ( ) tcs = self . readtitcurv ( ) fd = open ( filename , 'w' ) for group in groups : fd . write ( 'PREDICTION: %s\n' % prediction_name ) number = group . split ( ':' ) name = '%s %s %s' % ( number [ 2 ] , number [ 0 ] , number [ 1 ] ) fd . write ( 'TITGROUP: %s\n' % name ) pHs = tcs [ group ] . keys ( ) pHs . sort ( ) pHs . remove ( 'pKa' ) for pH in pHs : fd . write ( '%5.2f, %5.2f\n' % ( pH , tcs [ group ] [ pH ] ) ) fd . write ( 'END\n' ) fd . close ( )
Write a submission file for the pKa cooperative
Write a submission file for the pKa cooperative
"""Write a submission file for the pKa cooperative"""
self
filename
prediction_name
groups