Protool/mutate.py
def Model_Mutations_old(pdbfile,mol2files,mutations,max_overlap=0.5,return_score=False):
    """Model a number of mutations in a pdbfile when one or more ligands are present"""
    #
    # Initialise mutate routines
    #
    MUT=Mutate(max_bump=max_overlap)
    #
    # Read PDB file
    #
    import Protool
    P=Protool.structureIO()
    P.readpdb(pdbfile)
    P.remove_all_hydrogens()
    #
    # Read mol2 file
    #
    L=Protool.ligand(P)
    for mol2file in mol2files:
        print "Added %s with tag 'LIGAND'" %mol2file
        L.readmol2(mol2file,tag='LIGAND')
    #
    # Pass combined pdb file to mutate routines and mutate
    #
    MUT.new_PDB(P)
    import pKa.pKD_tools as pKD_tools
    total_bump=0.0
    #
    # Model
    #
    for mutation in mutations:
        #
        # Get info
        #
        resid=pKD_tools.get_resid_from_mut(mutation)
        newres=pKD_tools.get_newrestyp_from_mut(mutation)
        oldres=pKD_tools.get_oldrestyp_from_mut(mutation)
        bump_score=MUT.mutate(resid,newres,orgtype=oldres)
        if bump_score is None or bump_score is False or bump_score>max_overlap:
            print 'Cannot model this set of mutations - too many bumps'
            return False,20.0
        print 'Bump score for %s: %5.3f' %(mutation,bump_score)
        total_bump=total_bump+bump_score
    print 'Total bump score for all mutations: %5.3f' %(bump_score)
    if return_score:
        return MUT,bump_score
    return MUT
Model a number of mutations in a pdbfile when one or more ligands are present
Model a number of mutations in a pdbfile when one or more ligands are present
Model a number of mutations in a pdbfile when one or more ligands are present
def Model_Mutations_old(pdbfile,mol2files,mutations,max_overlap=0.5,return_score=False):
     Initialise mutate routines
    MUT=Mutate(max_bump=max_overlap)
     Read PDB file
    import Protool
    P=Protool.structureIO()
    P.readpdb(pdbfile)
    P.remove_all_hydrogens()
     Read mol2 file
    L=Protool.ligand(P)
    for mol2file in mol2files:
        print "Added %s with tag 'LIGAND'" %mol2file
        L.readmol2(mol2file,tag='LIGAND')
     Pass combined pdb file to mutate routines and mutate
    MUT.new_PDB(P)
    import pKa.pKD_tools as pKD_tools
    total_bump=0.0
     Model
    for mutation in mutations:
         Get info
        resid=pKD_tools.get_resid_from_mut(mutation)
        newres=pKD_tools.get_newrestyp_from_mut(mutation)
        oldres=pKD_tools.get_oldrestyp_from_mut(mutation)
        bump_score=MUT.mutate(resid,newres,orgtype=oldres)
        if bump_score is None or bump_score is False or bump_score>max_overlap:
            print 'Cannot model this set of mutations - too many bumps'
            return False,20.0
        print 'Bump score for %s: %5.3f' %(mutation,bump_score)
        total_bump=total_bump+bump_score
    print 'Total bump score for all mutations: %5.3f' %(bump_score)
    if return_score:
        return MUT,bump_score
    return MUT
def Model_Mutations_old ( pdbfile , mol2files , mutations , max_overlap = 0.5 , return_score = False ) : MUT = Mutate ( max_bump = max_overlap ) import Protool P = Protool . structureIO ( ) P . readpdb ( pdbfile ) P . remove_all_hydrogens ( ) L = Protool . ligand ( P ) for mol2file in mol2files : print "Added %s with tag 'LIGAND'" % mol2file L . readmol2 ( mol2file , tag = 'LIGAND' ) MUT . new_PDB ( P ) import pKa . pKD_tools as pKD_tools total_bump = 0.0 for mutation in mutations : resid = pKD_tools . get_resid_from_mut ( mutation ) newres = pKD_tools . get_newrestyp_from_mut ( mutation ) oldres = pKD_tools . get_oldrestyp_from_mut ( mutation ) bump_score = MUT . mutate ( resid , newres , orgtype = oldres ) if bump_score is None or bump_score is False or bump_score > max_overlap : print 'Cannot model this set of mutations - too many bumps' return False , 20.0 print 'Bump score for %s: %5.3f' % ( mutation , bump_score ) total_bump = total_bump + bump_score print 'Total bump score for all mutations: %5.3f' % ( bump_score ) if return_score : return MUT , bump_score return MUT
Model a number of mutations in a pdbfile when one or more ligands are present
Model a number of mutations in a pdbfile when one or more ligands are present
"""Model a number of mutations in a pdbfile when one or more ligands are present""" # # Initialise mutate routines # # # Read PDB file # # # Read mol2 file # # # Pass combined pdb file to mutate routines and mutate # # # Model # # # Get info #
pdbfile
mol2files
mutations
max_overlap
return_score