コード例 #1
0
     print("No grid file", pdb_id, site_id)
     continue
 elif os.path.isfile("%s/%s_ElectFeatures.txt"%(root_dir, pdb_id)) == False: #is there bluues electrostatics data?
     print("No electro file", pdb_id, site_id)
     continue 
 elif os.path.isfile("%s/%s.findgeo"%(root_dir, pdb_id)) == False: #is there findgeo/CMM data?
     print("No geom file", pdb_id, site_id)
     continue
 else:
     print(pdb_id, site_id)
     chain = entry.chainID
     if relax == True:
         pdb_file = "%s_Relaxed.pdb"%pdb_id
     else:
         pdb_file = "%s.pdb"%pdb_id
     residues, res_nums, header = pdbp.create_res("%s/%s"%(root_dir, pdb_file))
     #print(res_nums)
     this_protein = pdbp.Protein(residues, res_nums, header)
     center_of_mass = np.mean(this_protein.Coords, axis = 0)
     #print(center_of_mass)
     metals = set([str(entry.seqNum1), str(entry.seqNum2), str(entry.seqNum3), str(entry.seqNum4)])
     metal_res = []
     for x in metals:
         if x != "0": metal_res.append(str(round(float(x))) + chain )
     metals = [entry.resName1, entry.resName2, entry.resName3, entry.resName4]
     
     site_atom_count = 0
     for x in metals:
         if x != "0": site_atom_count += metal_size[x]
     
     #general SITE info
コード例 #2
0
        if relaxed == "Relaxed":
            pdb_id = pdb_id + "_Relaxed"
        if os.path.isfile(
                "/panfs/pfs.local/work/slusky/MSEAL/data/PDB_chains/%s/%s/%s/%s/%s.pdb"
                % (pdb_id[0], pdb_id[1], pdb_id[0:6], relaxed,
                   pdb_id)) == False:  #pdb_id[0], pdb_id[1],
            #if os.path.isfile("SampleData/%s/UnRelaxed/%s.pdb"%(pdb_id, pdb_id) ) == False: #pdb_id[0], pdb_id[1],
            continue
        else:
            print(pdb_id, metals)
            chain = pdb_id[5]
            metal_res = [str(x) + chain for x in metals]
            #residues, res_nums, header = pdbp.create_res("SampleData/%s/UnRelaxed/%s.pdb"%(pdb_id, pdb_id)) #test on local
            residues, res_nums, header = pdbp.create_res(
                "/panfs/pfs.local/work/slusky/MSEAL/data/PDB_chains/%s/%s/%s/%s/%s.pdb"
                % (pdb_id[0], pdb_id[1], pdb_id[0:6], relaxed,
                   pdb_id))  #for production run on CRC
            #print(res_nums)
            this_protein = pdbp.Protein(residues, res_nums, header)
            SITE_center_pt = SITE_center(metal_res, this_protein)
            index = entry.Index
            site_list.loc[index, "X"] = SITE_center_pt[0]
            site_list.loc[index, "Y"] = SITE_center_pt[1]
            site_list.loc[index, "Z"] = SITE_center_pt[2]
            site_list.loc[index,
                          "NearNeigh"] = nearest_neigh(SITE_center_pt,
                                                       metal_res, this_protein)
            #print(site_list.loc[index,:])

site_list.to_csv("SITECenters_%s.txt" % relaxed, sep="\t", index=False)