pKaTool/pKaIO.py
def read_WIfile(self,lines,dict,format):
        """
        # Read a DESOLV file or a BACKGR file
        """
        import string
        x=1
        done=None
        Nterm=0
        while not done:
            x=x+1
            #
            # Read first line for this residue
            #
            term=None
            if lines[x].strip()=='TERMINAL GROUP:':
                Nterm=abs(Nterm-1)
                term=True
                x=x+1
            nline=string.replace(lines[x],'(','')
            nline=string.replace(nline,')','')
            list=string.split(nline)
            resid=pKaUT.getWI_resid2(lines[x])
            if term:
                #
                # Replace the residue name by the terminal name
                #
                resname=resid.split(':')[-1]
                d={1:'NTERM',0:'CTERM'}
                resid=resid.replace(resname,d[Nterm])
            #
            dict[resid]=string.atof(list[-1])
            if string.strip(lines[x+1])=='End of file':
                done=1
        return dict

        # Read a DESOLV file or a BACKGR file
        
Read a DESOLV file or a BACKGR file
Read a DESOLV file or a BACKGR file
def read_WIfile(self,lines,dict,format):
        import string
        x=1
        done=None
        Nterm=0
        while not done:
            x=x+1
             Read first line for this residue
            term=None
            if lines[x].strip()=='TERMINAL GROUP:':
                Nterm=abs(Nterm-1)
                term=True
                x=x+1
            nline=string.replace(lines[x],'(','')
            nline=string.replace(nline,')','')
            list=string.split(nline)
            resid=pKaUT.getWI_resid2(lines[x])
            if term:
                 Replace the residue name by the terminal name
                resname=resid.split(':')[-1]
                d={1:'NTERM',0:'CTERM'}
                resid=resid.replace(resname,d[Nterm])
            dict[resid]=string.atof(list[-1])
            if string.strip(lines[x+1])=='End of file':
                done=1
        return dict
def read_WIfile ( self , lines , dict , format ) : import string x = 1 done = None Nterm = 0 while not done : x = x + 1 term = None if lines [ x ] . strip ( ) == 'TERMINAL GROUP:' : Nterm = abs ( Nterm - 1 ) term = True x = x + 1 nline = string . replace ( lines [ x ] , '(' , '' ) nline = string . replace ( nline , ')' , '' ) list = string . split ( nline ) resid = pKaUT . getWI_resid2 ( lines [ x ] ) if term : resname = resid . split ( ':' ) [ - 1 ] d = { 1 : 'NTERM' , 0 : 'CTERM' } resid = resid . replace ( resname , d [ Nterm ] ) dict [ resid ] = string . atof ( list [ - 1 ] ) if string . strip ( lines [ x + 1 ] ) == 'End of file' : done = 1 return dict
Read a DESOLV file or a BACKGR file
Read a DESOLV file or a BACKGR file
"""
        # Read a DESOLV file or a BACKGR file
        """ # # Read first line for this residue # # # Replace the residue name by the terminal name # #
self
lines
dict
format