import IMP.atom import IMP.core import IMP.domino import IMP.container import IMP.misc import math from tools import * # References muller="Muller et al. Mol. Biol. Cell 2005 (16) 3341-3352" # # gridding # CP_positions=grid_cell(side, ds, 0.0) #CP_positions=grid_cell_tr(side, ds, 0.0) #IL2_positions=grid_cell_tr(side, ds, 108.0) # # h_CP: list of molecular hierarchies, containing # proteins in the primitive cell h_CP[0] # proteins in the i-th cell h_CP[i] h_CP=create_hierarchies(num_cells,"Central Plaque") #h_IL2=create_hierarchies(num_cells,"Intermed. Layer 2") # # PROTEIN REPRESENTATION # # 1) proteins in the Central Plaque # Spc42p (N) # Spc29p (N and C) # Spc110p (C) # Cmd1p (N and C) # # list of protein names useful for EquivalenceState filters all_CP=["Spc42p_n","Spc29p","Spc110p_c","Cmd1p"] #all_IL2=["Cnm67p_c","Spc42p_c"] for i in range(0,num_cells): # with a rhombus as primitive cell you need 2X proteins for jj in range(0,1): # Spc42p_n, 2 copies, 1 bead #Spc42p_n_0=create_protein("Spc42p_n", 7, 1) #Spc42p_n_1=create_protein("Spc42p_n", 7, 1) #h_CP[i].add_child(Spc42p_n_0) #h_CP[i].add_child(Spc42p_n_1) # Spc29p, 2 beads Spc29p_n=create_protein("Spc29p_n", 14.5, 1) Spc29p_c=create_protein("Spc29p_c", 14.5, 1, 132) Spc29p=create_merged_protein("Spc29p",Spc29p_n, Spc29p_c, 0.0) h_CP[i].add_child(Spc29p) # Spc110p_c, 3 beads Spc110p_c=create_protein("Spc110p_c", 26, 1, 627+164) h_CP[i].add_child(Spc110p_c) # Cmd1p, 1 bead #Cmd1p_n=create_protein("Cmd1p_n", 8, 1) #Cmd1p_c=create_protein("Cmd1p_c", 8, 1, 80) #Cmd1p=create_merged_protein("Cmd1p", Cmd1p_n, Cmd1p_c, 0.0) #h_CP[i].add_child(Cmd1p) # 2) proteins in the Intermediate Layer 2 # Cnm67 (C) # Spc42p (C) # Cnm67p, 2 beads #Cnm67p_c=create_protein("Cnm67p_c", 15, 1, 272+179) #h_IL2[i].add_child(Cnm67p_c) # Spc42p, 3 beads #Spc42p_c_0=create_protein("Spc42p_c", 13, 1, 77+60) #h_IL2[i].add_child(Spc42p_c_0) #add_internal_restraint("Spc42p_0",Spc42p_n_0,Spc42p_c_0, 110) #Spc42p_c_1=create_protein("Spc42p_c", 13, 1, 77+60) #h_IL2[i].add_child(Spc42p_c_1) #add_internal_restraint("Spc42p_1",Spc42p_n_1,Spc42p_c_1, 110) # 3) proteins in the inner plaque # Spc110p (N) #Spc110p_n=make_protein("Spc110p_n", 17, 2) # 4) proteins in the outer plaque # Nud1p # Cnm67p (N) # Spc72p #Nud1p=make_protein("Nud1p", xx, x, outer_plaque) # # SYMMETRY RESTRAINT # # translations of the hexagonal supercell translations=[] translations.append(IMP.algebra.Vector3D( 0.0, 0.0, 0.0 )) translations.append(IMP.algebra.Vector3D( 0.0, side*sqrt3, 0.0 )) translations.append(IMP.algebra.Vector3D( 1.5*side, side*sqrt3/2.0, 0.0 )) translations.append(IMP.algebra.Vector3D( 1.5*side, -side*sqrt3/2.0, 0.0 )) translations.append(IMP.algebra.Vector3D( 0.0, -side*sqrt3, 0.0 )) translations.append(IMP.algebra.Vector3D( -1.5*side, -side*sqrt3/2.0, 0.0 )) translations.append(IMP.algebra.Vector3D( -1.5*side, side*sqrt3/2.0, 0.0 )) # rotation + translation transformations=[] for tr in translations: for i in range(0,3): rot=IMP.algebra.get_rotation_about_axis(IMP.algebra.Vector3D(0,0,1), float(i)*math.radians(120.0)) transformations.append(IMP.algebra.Transformation3D(rot,tr)) add_symmetry_restraint(h_CP, transformations, num_cells) #add_symmetry_restraint(h_IL2, transformations, num_cells) # # FRET # # intra-CP ''' add_fret_restraint(h_CP[0], "Spc29p", "C", h_CP, "Cmd1p", "C", 1.69, muller) add_fret_restraint(h_CP[0], "Spc29p", "N", h_CP, "Cmd1p", "C", 1.75, muller) add_fret_restraint(h_CP[0], "Spc29p", "C", h_CP, "Spc110p_c", "C", 1.37, muller) add_fret_restraint(h_CP[0], "Spc29p", "C", h_CP, "Spc42p_n", "N", 2.05, muller) add_fret_restraint(h_CP[0], "Cmd1p", "C", h_CP, "Spc42p_n", "N", 2.07, muller) add_fret_restraint(h_CP[0], "Cmd1p", "C", h_CP, "Spc110p_c", "C", 2.15, muller) add_fret_restraint(h_CP[0], "Spc42p_n", "N", h_CP, "Spc110p_c", "C", 2.02, muller) ''' # missing FRETs # 330 solutions in Mod, none if lower #add_fret_restraint(h_CP, "Spc29p", "N", h_CP, "Spc110p_c", "C", 1.3, muller) #no solutions if this is not in HIGH class #add_fret_restraint(h_CP, "Spc29p", "N", h_CP, "Spc42p_n", "N", 1.7, muller) # 20 solutions if in Mod class, none if lower #add_fret_restraint(h_CP, "Spc29p", "N", h_CP, "Cmd1p", "N", 1.7, muller) # 140 solutions if in Mod class, none if lower #add_fret_restraint(h_CP, "Spc29p", "C", h_CP, "Cmd1p", "N", 1.7, muller) # 3 solutions if in Mod class, none if lower #add_fret_restraint(h_CP, "Cmd1p", "N", h_CP, "Spc42p_n", "N", 1.7, muller) # 150 solutions if in Mod class, none if lower #add_fret_restraint(h_CP, "Cmd1p", "N", h_CP, "Spc110p_c", "C", 1.3, muller) # inter CP-IL2. Shouldn't they be >100 A apart? #add_fret_restraint(h_IL2, "Spc42p_c", "C", h_CP, "Spc110p_c", "C", 1.07, muller) #add_fret_restraint(h_IL2, "Cnm67p_c", "C", h_CP, "Cmd1p", "C", 1.1, muller) #add_fret_restraint(h_IL2, "Spc42p_c", "C", h_CP, "Cmd1p", "C", 1.1, muller) #add_fret_restraint(h_IL2, "Spc42p_c", "C", h_CP, "Spc42p_n", "N", 1.27, muller) # intra-IL2 #add_fret_restraint(h_IL2, "Spc42p_c", "C", h_IL2, "Cnm67p_c", "C", 2.29, muller) # inter IP-gammaTUB #add_fret_restraint((Spc110p_n, N), (Tub4p, C), 1.34) #add_fret_restraint((Tub4p, C), (Spc110p_n, N), 1.25) #add_fret_restraint((Spc110p, N), (Spc97p, C), 1.3) #add_fret_restraint((Spc97p, C), (Spc110p_n, N), 1.25) #add_fret_restraint((Spc98p, C), (Spc110p_n, N), 1.28) # intra-IP #add_fret_restraint((Spc110p_n, N), (Spc110p_n, N), 1.2, muller) # intra-gammaTUB #add_fret_restraint((Spc98p, N), (Spc97p, N), 1.41) #add_fret_restraint((Tub4p, N), (Spc97p, C), 1.3) #add_fret_restraint((Spc97p, C), (Tub4p, C), 1.58) #add_fret_restraint((Tub4p, C), (Spc97p, C), 1.4) #add_fret_restraint((Spc97p, C), (Spc98p, C), 1.33) #add_fret_restraint((Spc98p, C), (Spc97p, C), 1.26) #add_fret_restraint((Spc98p, N), (Spc97p, N), 1.41) #add_fret_restraint((Tub4p, N), (Spc97p, C), 1.3) #add_fret_restraint((Spc97p, C), (Tub4p, C), 1.58) #add_fret_restraint((Tub4p, C), (Spc97p, C), 1.4) # # TWO-HYBRID SCREENING # # CP #add_y2h_restraint(h_CP[0], "Cmd1p", "ALL", h_CP, "Spc110p_c", (900,1020)) #add_y2h_restraint(h_CP[0], "Spc42p_n", "N", h_CP, "Spc110p_c", "C") add_y2h_restraint(h_CP[0], "Spc29p", "ALL", h_CP, "Spc110p_c", (811,944)) #add_y2h_restraint(h_CP[0], "Spc110p_c", "C", h_CP, "Spc110p_c", "C") #add_y2h_restraint(h_CP[0], "Spc42p_n", (1,138), h_CP, "Spc29p", "ALL") # these are the strongest #add_y2h_restraint(h_CP[0], "Spc42p_n", (1,138), h_CP, "Spc42p_n", (1,138)) #add_y2h_restraint(h_CP[0], "Spc42p_n", (1,363), h_CP, "Spc42p_n", "ALL") # these are weaker than full length #add_y2h_restraint((Spc42p_n, (1,363)), (Spc42p_n, (1,138))) #add_y2h_restraint((Spc42p_n, (1,363)), (Spc42p_n, (96,363))) # this is controversial... #noyh2((Spc42p, ALL), (Spc110p, ALL)) # IL2 #add_y2h_restraint(h_IL2, "Cnm67p_c", "C", h_IL2, "Spc42p_c", "C") # OP #add_y2h_restraint((Cnm67p, range(1,580)), (Cnm67p, range(66,477))) #add_y2h_restraint((Cnm67p, range(1,580)), (Nud1p, ALL)) #add_y2h_restraint((Cnm67p, ALL), (Nud1p, range(405,852))) #add_y2h_restraint((Cnm67p, range(1,209)), (Nud1p, ALL)) #add_y2h_restraint((Cnm67p, range(1,209)), (Nud1p, range(405,852))) #add_y2h_restraint((Cnm67p, range(66,477)), (Nud1p, range(405,852))) # covers coiled coil #add_y2h_restraint((Cnm67p_c, range(386,580)), (Spc42p_n, range(96,363))) #add_y2h_restraint((Cnm67p_c, range(386,580)), (Nud1p, range(405,852))) #noadd_y2h_restraint((Spc29p, C), (Cnm67p, ALL)) #add_y2h_restraint((Cnm67p, N), (Nud1p, C)) #add_y2h_restraint((Nud1p, (1,852)), (Nud1p, range(405,852))) #add_y2h_restraint((Nud1p, (405,852)), (Nud1p, range(405,852))) # IP and gamma-TUB #noyh2((Spc110p, C and central domain showed no interaction #add_y2h_restraint((Spc110p_n, (1,204)), (Spc97p, ALL)) #add_y2h_restraint((Spc110p_n, (1,204)), (Spc98p, ALL)) #add_y2h_restraint((Spc110p_n, (1,204)), (Tub4p, ALL)) #add_y2h_restraint((Spc110p, (1,176)), (Spc97p, ALL)) #add_y2h_restraint((Spc110p, (1,176)), (Spc98p, ALL)) #add_y2h_restraintnot Tub4p, 4,fold reduction in interacting with Spc97 & Spc98 #yh2((Spc110p, N), (Spc97p,14 weak interaction #yh2((Spc110p, N), (Spc97p,20 no interaction #noadd_y2h_restraint((Spc97p, ALL), (Spc110p, ALL)) #yh2((Spc110p, range(1,176) with Tub4 only when co,expressed with Spc97 & Spc98 #no interactions: Spc29p, C), (Spc110p, N, Spc29), (Spc42p, C, central domain Spc110), (Spc29p, Spc29), (Cnm67p, Spc29), (Tub4 components #add_y2h_restraint((Spc42p_c, C), (Cnm67p_c, C)) # on coiled coil #add_y2h_restraint((Spc42p_n, (1,363)), (Cnm67p_c, (386,580))) # on coiled coil #add_y2h_restraint((Spc42p_n, (96,363)), (Cnm67p_c, (386,580))) #add_y2h_restraint((Spc72p, (1,271)), (Spc97p, ALL)) #add_y2h_restraint((Spc72p, (1,271)), (Spc98p, ALL)) #add_y2h_restraint((Spc72 (1,271) with Tub4 only when co,expressed with Spc97 & Spc98 #add_y2h_restraint((Spc72 (1,176) with Tub4 only when co,expressed with Spc97 & Spc98 #add_y2h_restraint((Spc97p, ALL), (Spc98p, ALL)) #add_y2h_restraint((Spc98p, ALL), (Spc97p, ALL)) #no interaction with Spc110 #no interaction with itself #add_y2h_restraint((Spc97p,14 weakly with Spc110 #add_y2h_restraint((Spc97p,20 no interaction with Spc110 #add_y2h_restraint((Spc97p,14 with Spc98 not Tub4 #add_y2h_restraint((Spc97p,20 weakly with Tub4p, not with Spc98 #no interaction Spc97), (Spc110(1,183) #no interaction Spc97), (Spc110(1,150) #no interaction Spc97p,62), (Spc110(1,183) #no interaction Spc97p,114), (Spc110(1,183) #add_y2h_restraint((Spc97p, ALL), (Spc98p, ALL), .9) #add_y2h_restraint((Spc97p, ALL), (Spc98p, (148,846)), .9) #add_y2h_restraint((Spc97p, ALL), (Spc98p, (1,361)), .25) #add_y2h_restraint((Spc97p, ALL), (Tub4p, ALL), .9) #no interaction Spc97), (Spc97 #add_y2h_restraint((Spc97p,62), (Spc98 greater than or equal to 90% #add_y2h_restraint((Spc97p,62), (Spc98(148,846) 50,90% #no interaction Spc97p,62), (Spc98(1,361) #add_y2h_restraint((Spc97p,62), (Tub4 greater than or equal to 90% #add_y2h_restraint((Spc97p,114), (Spc98 25% #no interaction Spc97p,114), (Spc98(148,846) #no interaction Spc97p,114), (Spc98(1,361) #add_y2h_restraint((Spc97p,114), (Tub4 greater than or equal to 90% #add_y2h_restraint((Spc98p, (147,846)), (Tub4p, ALL)) #add_y2h_restraint((Spc98p, (147,846)), (Spc97p, ALL)) #add_y2h_restraint((Spc98p, (147,551)), (Spc97p, ALL))# but not Tub4 #add_y2h_restraint((Spc98p, (1,324) not Tub4 or Spc97 #add_y2h_restraint((Spc98p, ALL), (Spc110p_n, (1,183)), .9) #add_y2h_restraint((Spc98p, ALL), (Spc110p_n, (1,150)), .9) #add_y2h_restraint((Spc98p, ALL), (Spc110p,221 (1,183) 50,90% #add_y2h_restraint((Spc98p,63), (Spc110(1,183) greater than or equal to 90% #add_y2h_restraint((Spc98p,63), (Spc110(1,150) 50,90% #no interaction Spc98p,63), (Spc110p,221(1,183) #add_y2h_restraint((Spc98p, ALL), (Spc97p, ALL), .9) #add_y2h_restraint((Spc98p, ALL), (Spc97p, (1,548)), .5) # 50,90% #add_y2h_restraint((Spc98p, ALL), (Tub4p, ALL), .9) #no interaction Spc98), (Spc98 #add_y2h_restraint((Spc98p,63), (Spc97 50,90% #add_y2h_restraint((Spc98p,63), (Spc97(1,548) greater than or equal to 90% #add_y2h_restraint((Spc98p,63), (Tub4 greater than or equal to 90% #add_y2h_restraint((Spc98p, (1,846)), (Tub4p, ALL)) #add_y2h_restraint((Spc98p, (1,846)), (Spc97p, ALL)) #no interaction Spc98(1,324)), (Tub4 or Spc97 #add_y2h_restraint((Spc98p, (147,551)), (Spc97p, ALL)) #add_y2h_restraint((Spc98p, (511,846)), (Tub4p, ALL)) #Spc97 with Tub4 #Spc98 with Tub4 #add_y2h_restraint((Tub4 truncation (1,306) not with Spc97 or Spc98 #add_y2h_restraint((Tub4 truncation (168,473) not with Spc97 or Spc98 #no interaction Tub4:Spc110(1,183) #add_y2h_restraint((Tub4), (Spc98 50,90% #add_y2h_restraint((Tub4), (Spc98(148,846) greater than or equal to 90% #add_y2h_restraint((Tub4), (Spc98(1,361) greater than or equal to 90% #add_y2h_restraint((Tub4), (Spc97 greater than or equal to 90% #add_y2h_restraint((Tub4), (Spc97(1,548) greater than or equal to 90% #add_y2h_restraint((Tub4), (Tub4 greater than or equal to 90% print "creating discrete states" pst= IMP.domino.ParticleStatesTable() # Central Plaque CP_states=IMP.domino.XYZStates(CP_positions) for ps in h_CP[0].get_leaves(): #perm=IMP.domino.PermutationStates(CP_states) pst.set_particle_states(ps, CP_states) # Intermediate Layer 2 #IL2_states=IMP.domino.XYZStates(IL2_positions) #for ps in h_IL2[0].get_leaves(): # pst.set_particle_states(ps, IL2_states) print "creating filters" filters=[] #add_equivalence_filters(filters, all_CP, h_CP[0]) #add_equivalence_filters(filters, all_IL2, h_IL2[0]) print "creating sampler" model.set_log_level(IMP.VERBOSE) s=create_sampler(filters,pst) #IMP.set_log_level(IMP.VERBOSE) #s.set_maximum_number_of_assignments(1) print "sampling" #cs=s.get_sample() ass=IMP.domino.Subset(pst.get_particles()) cs=s.get_sample_assignments(ass) #model.set_gather_statistics(True) print "found ", len(cs), "solutions" #print "found ", cs.get_number_of_configurations(), "solutions" #for i in range(cs.get_number_of_configurations()): # cs.load_configuration(i) # low=model.evaluate(False) # display(CP_positions,h_CP,"configuration_"+str(i)+".score_"+str(low)+".pym") #score=[] #for v in cs: # IMP.domino.load_particle_states(ass,v,pst) # ss=model.evaluate(False) # score.append(ss) #model.show_restraint_score_statistics() file=open("solutions.pym", "wa") #topscore = 500 #topscore = min(topscore,len(cs)) #print "visualizing the top ",topscore #for i in range(0,topscore): for ii in range(0,len(cs),1): #low=min(score) #ii=score.index(low) #score[ii]=510000000. #print "** solution number:",i," is:",low IMP.domino.load_particle_states(ass,cs[ii],pst) #model.update() display(CP_positions,h_CP,file)