def generate_smotif(top_entry,csmotif_index,csmotif_subentry,ex1,ex2): #[8, 9, 'left'] log=top_entry[2] direction=csmotif_index[2] if direction=='left': pss_index=csmotif_index[1] css_index=csmotif_index[0] dir_no,s2_struct,domain=log[pss_index][0],log[pss_index][1],log[pss_index][2] s1_struct=csmotif_subentry else: pss_index=csmotif_index[0] css_index=csmotif_index[1] dir_no,s1_struct,domain=log[pss_index][0],log[pss_index][1],log[pss_index][2] s2_struct=csmotif_subentry # 9_8_1 ['strand', 9, 13, 3, 112, 120] ['strand', 8, 4, 3, 123, 132] ['3po3K00', 'ARG', '70', 'THR', '77', 'PRO', '83', 'LEU', '111'] print s1_struct,s2_struct start=s1_struct[5] end=s2_struct[4] if end-start>1: smotif = ud.getSmotif(s1_struct, s2_struct) return dir_no,domain,s1_struct,s2_struct,smotif,direction else: create_log_file(ex1,ex2) sys.exit()
f_ss.close() f_map = open("map_route.dict", 'r') map_route = pickle.load(f_map) f_map.close() #********************************* #load in cathdb and extract info #********************************* ss_indices = map_route['map_route'][0] s1_profile = ss_profiles[ss_indices[0]][int(sys.argv[1])] s2_profile = ss_profiles[ss_indices[1]][int(sys.argv[2])] smotif = ud.getSmotif(s1_profile, s2_profile) rdc_file, ss_seq, cathdb = ud.initData() cath_entries = ud.extractCath(smotif, cathdb) print sys.argv[1], sys.argv[2], s1_profile, s2_profile print smotif print len(cath_entries) #********************************* # Search for needles in the haystack #********************************* B0 = 18.8 TinK = 298.0 Sorder = 1.0 scal = rf.rdcScal(Sorder, B0, TinK)
csmotif = ud.getNextSmotif(map_route, psmotif) top_dict, top_list = read_top(psmotif) top_entry = top_dict[top_list[int(sys.argv[3])]] profiles = ud.getSSProfile(ss_profiles,csmotif) sc_profile = profiles[int(sys.argv[4])] # sort_nchi[sum(temp_nchi)]=[temp_nchi,temp_tensor, log, domain] log = top_entry[-2] dir_name, sp_profile, domain, direction = getSx(log, csmotif) if direction == 'left': smotif = ud.getSmotif(sc_profile, sp_profile) else: smotif = ud.getSmotif(sp_profile, sc_profile) print csmotif, psmotif, smotif init_data = ud.testinitData('rdc_file', 'ss_seq', 'cathdb', 'rmsd_cutoff') rdc_file, ss_seq, cathdb, rmsd_cutoff = init_data[0], init_data[1], init_data[2], init_data[3] cath_entries = ud.extractCath(smotif, cathdb) #********************************* # Search for needles in the haystack #********************************* B0 = 18.8 TinK = 298.0
map_route=pickle.load(f_map) f_map.close() init_data = ud.testinitData('broker_file', 'ss_seq', 'cathdb') rdc_file, ss_seq, cathdb = init_data[0], init_data[1], init_data[2] s1,s2=get_r0(map_route['map_route']) s1_list,s2_list=get_profiles(s1,s2,ss_profile) s1_struct=s1_list[int(sys.argv[1])] s2_struct=s2_list[int(sys.argv[2])] #smotif= get_smotif(s1_struct,s2_struct) smotif = ud.getSmotif(s1_struct, s2_struct) # ss_array has [['helix', 22, 2, 23], ['SStruct', len(SStruct),start_res, end_res]] print smotif , s1_struct, s2_struct #cath_entries=extract_cath(smotif,cathdb) cath_entries = ud.extractCath(smotif,cathdb) print sys.argv[1],sys.argv[2],len(cath_entries) # main nM = 5000 # 1000 pts in each sphere M = [10,50] # 40 spheres 10-50 Angstrom npts = (M[1] - M[0]) * nM # 50 spheres * 1000 pts each rMx = fastT1FM.MakeDvector(npts) #allocate memmory rMy = fastT1FM.MakeDvector(npts) rMz = fastT1FM.MakeDvector(npts)