pKarun/WI_tools.py
def dellig_addallhyd(pdbfile,renumb=1):
    """Remove all ligands and water, correct all, and add all hydrogens smartly (to correct flips), delete hyds and then add them back stupidly (incl. Asp and Glu)"""
    newpdbfile=os.path.split(pdbfile)[1]+'.new'
    command='getmol '+os.path.split(pdbfile)[1]+' \n Y \n 1 \n 1 \n dellig \n'
    if renumb:
        command=command+' %renumb \n tot \n 1 \n '
    # Addhyd
    command=command+'modpka \n makpsf \n  y \n n \n 1.0 \n \n'
    command=command+'putpsc \n'
    #
    # Save the new PDB file
    #
    command=command+'%makmol \n \n'+newpdbfile+' \n \n tot 0 \n'
    print 'writing',newpdbfile
    #
    # Run WHAT IF
    #
    logfile,files=RunWI(command,[newpdbfile],None,[pdbfile,'HTOP'])
    return logfile,files
Remove all ligands and water, correct all, and add all hydrogens smartly (to correct flips), delete hyds and then add them back stupidly (incl. Asp and Glu)
Remove all ligands and water, correct all, and add all hydrogens smartly (to correct flips), delete hyds and then add them back stupidly (incl. Asp and Glu)
Remove all ligands and water correct all and add all hydrogens smartly ( to correct flips ) delete hyds and then add them back stupidly ( incl . Asp and Glu )
def dellig_addallhyd(pdbfile,renumb=1):
    newpdbfile=os.path.split(pdbfile)[1]+'.new'
    command='getmol '+os.path.split(pdbfile)[1]+' \n Y \n 1 \n 1 \n dellig \n'
    if renumb:
        command=command+' %renumb \n tot \n 1 \n '
    command=command+'modpka \n makpsf \n  y \n n \n 1.0 \n \n'
    command=command+'putpsc \n'
     Save the new PDB file
    command=command+'%makmol \n \n'+newpdbfile+' \n \n tot 0 \n'
    print 'writing',newpdbfile
     Run WHAT IF
    logfile,files=RunWI(command,[newpdbfile],None,[pdbfile,'HTOP'])
    return logfile,files
def dellig_addallhyd ( pdbfile , renumb = 1 ) : newpdbfile = os . path . split ( pdbfile ) [ 1 ] + '.new' command = 'getmol ' + os . path . split ( pdbfile ) [ 1 ] + ' \n Y \n 1 \n 1 \n dellig \n' if renumb : command = command + ' %renumb \n tot \n 1 \n ' command = command + 'modpka \n makpsf \n  y \n n \n 1.0 \n \n' command = command + 'putpsc \n' command = command + '%makmol \n \n' + newpdbfile + ' \n \n tot 0 \n' print 'writing' , newpdbfile logfile , files = RunWI ( command , [ newpdbfile ] , None , [ pdbfile , 'HTOP' ] ) return logfile , files
Remove all ligands and water, correct all, and add all hydrogens smartly (to correct flips), delete hyds and then add them back stupidly (incl.
Remove all ligands and water correct all and add all hydrogens smartly ( to correct flips ) delete hyds and then add them back stupidly ( incl .
"""Remove all ligands and water, correct all, and add all hydrogens smartly (to correct flips), delete hyds and then add them back stupidly (incl. Asp and Glu)""" # Addhyd # # Save the new PDB file # # # Run WHAT IF #
pdbfile
renumb