133 def create_representation():
136 all.set_name(
"the universe")
142 for c
in h.get_children()],
146 def create_protein_from_pdbs(name, files):
147 def create_from_pdb(file):
154 if c.get_number_of_children()==0:
155 IMP.atom.show_molecular_hierarchy(t)
162 rb.set_coordinates_are_optimized(
True)
168 for i, f
in enumerate(files):
171 c.set_name(name+
" chain "+str(i))
173 for c
in h.get_children()],
178 h= create_from_pdb(files[0])
186 create_protein_from_pdbs(
"Seh1", [
"seh1.pdb"])
187 create_protein_from_pdbs(
"Sec13", [
"sec13.pdb"])
191 def add_connectivity_restraint(s):
194 def add_distance_restraint(s0, s1):
200 s0=S(hierarchy=all, molecule=
"Nup145C", residue_indexes=[(0,423)])
201 s1=S(hierarchy=all, molecule=
"Nup84")
202 s2=S(hierarchy=all, molecule=
"Sec13")
203 add_connectivity_restraint([s0,s1,s2])
204 add_distance_restraint(S(hierarchy=all, molecule=
"Nup145C", residue_indexes=[(0,423)]),
205 S(hierarchy=all, molecule=
"Nup85"))
206 add_distance_restraint(S(hierarchy=all, molecule=
"Nup145C", residue_indexes=[(0,423)]),
207 S(hierarchy=all, molecule=
"Nup120",
208 residue_indexes= [(500, 762)]))
209 add_distance_restraint(S(hierarchy=all, molecule=
"Nup84"),
210 S(hierarchy=all, molecule=
"Nup133",
211 residue_indexes=[(778, 1160)]))
212 add_distance_restraint(S(hierarchy=all, molecule=
"Nup85"),
213 S(hierarchy=all, molecule=
"Seh1"))
214 add_distance_restraint(S(hierarchy=all, molecule=
"Nup145C",
215 residue_indexes=[(0,423)]),
216 S(hierarchy=all, molecule=
"Sec13"))
219 (m,all)= create_representation()
224 dg= IMP.get_dependency_graph(m)
225 IMP.show_graphviz(dg);
228 pdg= IMP.get_pruned_dependency_graph(m)
230 IMP.show_graphviz(pdg)