示例#1
0
def ligands(name_database, pr_init):
    '''search ligands in PDB database
    out : list of ligands with PDB files associated'''
    
    print "Start Search Ligand In PDB file"
    # control file exist
    if path.exists(pr_init + "resultLigandInPDB") and path.getsize(pr_init + "resultLigandInPDB") != 0: 
        return pr_init + "resultLigandInPDB"
    
    # import list PBD from file .dat
    # http://www.rcsb.org/pdb/rest/representatives?cluster=50
    l_PDB = managePDB.retriveListPDB(name_database)
    
    l_d_lig = []

    for PDB_ID in l_PDB:
        d_lig_PDB = structure.ligandPDB()
        d_lig_PDB["name"] = PDB_ID
        l_lig_in = parsing.retrieveListLigand(pathManage.pathDitrectoryPDB() + PDB_ID.lower() + ".pdb")
        d_lig_PDB["ligands"] = l_lig_in
        l_d_lig.append(d_lig_PDB)
    
    # write result file
    p_out = writeFile.resultLigandInPDB(l_d_lig, pr_init)

    print "END Search Ligand In PDB file"
    return p_out
示例#2
0
def waterGlobal (name_database, limit_acc = 00.0):
    """
    Number of water molecules in PDB
    arg: -> Path folder database
         -> name folder result
         -> limit acc
    return: NONE
    """
    
    pr_result = pathManage.result (name_database + "/water")
    
    # retrieve list PDB file
    l_PDBID = managePDB.retriveListPDB(name_database)
    # calcul acc with NACESS
    if limit_acc != 0.0 : 
        for PDB_ID in l_PDBID :
            p_PDB = pathManage.pathDitrectoryPDB () + PDB_ID + ".pdb"
            runOtherSoft.runNACESS(p_PDB, pathManage.pathDitrectoryPDB (), multi_run = 0)
        
    p_filout = waterAnalysis.resolutionWater(l_PDBID, pr_result, limit_acc)

    runScriptR.waterPlotResolution (p_filout)