Exemple #1
0
def two_pdb_chains(pdb,
                   ch1='',
                   ch2='',
                   dock=None,
                   file1=None,
                   file2=None,
                   surface=False,
                   allres=False,
                   cutoff1=15,
                   cutoff2=2):
    if dock == None:
        from use_dock import DockTool
        dock = DockTool()
        p1, ch1, p2, ch2 = dock.prepare_data(pdb,
                                             ch1,
                                             pdb,
                                             ch2,
                                             file1=file1,
                                             file2=file2)
    area1 = get_area(dock.chain1, dock.chain1_id, ch1)
    area2 = get_area(dock.chain2, dock.chain2_id, ch2)
    areac = get_area(dock.combine, dock.chain1_id + dock.chain2_id, ch1 + ch2)
    dock.clean_temp_path()
    res1 = area1.keys()
    res2 = area2.keys()
    outer1 = get_outer(area1, cutoff1)
    outer2 = get_outer(area2, cutoff1)
    inter1 = get_interface(area1, areac, cutoff2)
    inter2 = get_interface(area2, areac, cutoff2)
    if allres:
        return inter1 & outer1, inter2 & outer2, outer1, outer2, res1, res2
    if surface:
        return inter1 & outer1, inter2 & outer2, outer1, outer2
    return inter1 & outer1, inter2 & outer2
Exemple #2
0
def change_of_rel_asa(pdb, ch1='', ch2='', dock=None, file1=None, file2=None):
    if dock == None:
        from use_dock import DockTool
        dock = DockTool()
        p1, ch1, p2, ch2 = dock.prepare_data(pdb, ch1, pdb, ch2, file1=file1, file2=file2)
    area1 = get_area(dock.chain1, dock.chain1_id, ch1)
    area2 = get_area(dock.chain2, dock.chain2_id, ch2)
    areac = get_area(dock.combine, dock.chain1_id+dock.chain2_id, ch1+ch2)
    dock.clean_temp_path()
    data = []
    for p in area1:
        data.append([pdb, ch1, p, area1[p][1] - areac[p][1]])
    for p in area2:
        data.append([pdb, ch2, p, area2[p][1] - areac[p][1]])
    return data
Exemple #3
0
def change_of_rel_asa(pdb, ch1='', ch2='', dock=None, file1=None, file2=None):
    if dock == None:
        from use_dock import DockTool
        dock = DockTool()
        p1, ch1, p2, ch2 = dock.prepare_data(pdb,
                                             ch1,
                                             pdb,
                                             ch2,
                                             file1=file1,
                                             file2=file2)
    area1 = get_area(dock.chain1, dock.chain1_id, ch1)
    area2 = get_area(dock.chain2, dock.chain2_id, ch2)
    areac = get_area(dock.combine, dock.chain1_id + dock.chain2_id, ch1 + ch2)
    dock.clean_temp_path()
    data = []
    for p in area1:
        data.append([pdb, ch1, p, area1[p][1] - areac[p][1]])
    for p in area2:
        data.append([pdb, ch2, p, area2[p][1] - areac[p][1]])
    return data
Exemple #4
0
def two_pdb_chains(pdb, ch1='', ch2='', dock=None, file1=None, file2=None,
                   surface=False, allres=False, cutoff1=15, cutoff2=2):
    if dock == None:
        from use_dock import DockTool
        dock = DockTool()
        p1, ch1, p2, ch2 = dock.prepare_data(pdb, ch1, pdb, ch2, file1=file1, file2=file2)
    area1 = get_area(dock.chain1, dock.chain1_id, ch1)
    area2 = get_area(dock.chain2, dock.chain2_id, ch2)
    areac = get_area(dock.combine, dock.chain1_id+dock.chain2_id, ch1+ch2)
    dock.clean_temp_path()
    res1 = area1.keys()
    res2 = area2.keys()
    outer1 = get_outer(area1, cutoff1)
    outer2 = get_outer(area2, cutoff1)
    inter1 = get_interface(area1, areac, cutoff2)
    inter2 = get_interface(area2, areac, cutoff2)
    if allres:
        return inter1 & outer1, inter2 & outer2, outer1, outer2, res1, res2
    if surface:
        return inter1 & outer1, inter2 & outer2, outer1, outer2
    return inter1 & outer1, inter2 & outer2