1 """@namespace IMP.pmi1.restraints.npc
2 Specialized restraints for modeling the Nuclear Pore Complex.
4 These restraints have been used to model the Nuclear Pore Complex (NPC)
5 but may be useful for other applications too. They model the NPC as lying
6 in the xy plane, centered at the origin. (Transport through the pore
7 corresponds to movement along the z axis.) The surface of the nuclear
8 membrane is represented as the surface of a half torus, also lying in
9 the xy plane and centered at the origin. Individual proteins
10 (or parts of proteins, such as the N- or C- termini) are then localized to
11 different regions of the complex (e.g. near the membrane or pore, or on
12 the nuclear or cytoplasmic side) by simple restraints on ther Cartesian
21 """Create XYRadial Position Restraint
28 consider_radius =
False,
32 @param representation representation
35 self.m = representation.prot.get_model()
41 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
43 terminal = residues[-1]
45 xyr.add_particle(terminal)
47 terminal = residues[0]
49 xyr.add_particle(terminal)
51 for residue
in residues:
53 xyr.add_particle(residue)
57 for p, state
in representation._protocol_output:
58 p.add_xyradial_restraint(state, residues, lower_bound,
59 upper_bound, sigma, self)
61 self.rs.add_restraint(xyr)
63 def set_label(self, label):
66 def add_to_model(self):
69 def get_restraint(self):
72 def set_weight(self, weight):
74 self.rs.set_weight(self.weight)
79 score = self.weight * self.rs.unprotected_evaluate(
None)
80 output[
"_TotalScore"] = str(score)
81 output[
"XYRadialPositionRestraint_" + self.label] = str(score)
85 return self.weight * self.rs.unprotected_evaluate(
None)
88 """Create XYRadial Position Lower restraints
94 consider_radius =
False,
97 @param representation representation
100 self.m = representation.prot.get_model()
106 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
107 cterminal = residues[-1]
110 xyr.add_particle(cterminal)
111 self.rs.add_restraint(xyr)
113 def set_label(self, label):
116 def add_to_model(self):
119 def get_restraint(self):
122 def set_weight(self, weight):
124 self.rs.set_weight(self.weight)
126 def get_output(self):
129 score = self.weight * self.rs.unprotected_evaluate(
None)
130 output[
"_TotalScore"] = str(score)
131 output[
"XYRadialPositionLowerRestraint_" + self.label] = str(score)
135 return self.weight * self.rs.unprotected_evaluate(
None)
138 """Create XYRadial Position Upper restraints
144 consider_radius =
False,
147 @param representation representation
150 self.m = representation.prot.get_model()
156 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
157 cterminal = residues[-1]
160 xyr.add_particle(cterminal)
161 self.rs.add_restraint(xyr)
163 def set_label(self, label):
166 def add_to_model(self):
169 def get_restraint(self):
172 def set_weight(self, weight):
174 self.rs.set_weight(self.weight)
176 def get_output(self):
179 score = self.weight * self.rs.unprotected_evaluate(
None)
180 output[
"_TotalScore"] = str(score)
181 output[
"XYRadialPositionUpperRestraint_" + self.label] = str(score)
185 return self.weight * self.rs.unprotected_evaluate(
None)
189 """Create Z-Axial Position restraints
196 consider_radius =
False,
200 @param representation representation
203 self.m = representation.prot.get_model()
209 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
211 residues = residues[-1:]
213 residues = residues[:1]
214 for residue
in residues:
215 zax.add_particle(residue)
219 for p, state
in representation._protocol_output:
220 p.add_zaxial_restraint(state, residues, lower_bound,
221 upper_bound, sigma, self)
223 self.rs.add_restraint(zax)
225 def set_label(self, label):
228 def add_to_model(self):
231 def get_restraint(self):
234 def set_weight(self, weight):
236 self.rs.set_weight(self.weight)
238 def get_output(self):
241 score = self.weight * self.rs.unprotected_evaluate(
None)
242 output[
"_TotalScore"] = str(score)
243 output[
"ZAxialPositionRestraint_" + self.label] = str(score)
247 return self.weight * self.rs.unprotected_evaluate(
None)
250 """Create Z-Axial Position Lower restraints
256 consider_radius =
False,
259 @param representation representation
262 self.m = representation.prot.get_model()
268 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
269 cterminal = residues[-1]
272 zax.add_particle(cterminal)
273 self.rs.add_restraint(zax)
275 def set_label(self, label):
278 def add_to_model(self):
281 def get_restraint(self):
284 def set_weight(self, weight):
286 self.rs.set_weight(self.weight)
288 def get_output(self):
291 score = self.weight * self.rs.unprotected_evaluate(
None)
292 output[
"_TotalScore"] = str(score)
293 output[
"ZAxialPositionLowerRestraint_" + self.label] = str(score)
297 return self.weight * self.rs.unprotected_evaluate(
None)
300 """Create Z-Axial Position Upper restraints
306 consider_radius =
False,
309 @param representation representation
312 self.m = representation.prot.get_model()
318 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
319 cterminal = residues[-1]
322 zax.add_particle(cterminal)
323 self.rs.add_restraint(zax)
325 def set_label(self, label):
328 def add_to_model(self):
331 def get_restraint(self):
334 def set_weight(self, weight):
336 self.rs.set_weight(self.weight)
338 def get_output(self):
341 score = self.weight * self.rs.unprotected_evaluate(
None)
342 output[
"_TotalScore"] = str(score)
343 output[
"ZAxialPositionUpperRestraint_" + self.label] = str(score)
347 return self.weight * self.rs.unprotected_evaluate(
None)
351 """Create Y-Axial Position restraints
358 consider_radius =
False,
362 @param representation representation
365 self.m = representation.prot.get_model()
371 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
373 terminal = residues[-1]
375 yax.add_particle(terminal)
377 terminal = residues[0]
379 yax.add_particle(terminal)
381 for residue
in residues:
383 yax.add_particle(residue)
387 for p, state
in representation._protocol_output:
388 p.add_yaxial_restraint(state, residues, lower_bound,
389 upper_bound, sigma, self)
391 self.rs.add_restraint(yax)
393 def set_label(self, label):
396 def add_to_model(self):
399 def get_restraint(self):
402 def set_weight(self, weight):
404 self.rs.set_weight(self.weight)
406 def get_output(self):
409 score = self.weight * self.rs.unprotected_evaluate(
None)
410 output[
"_TotalScore"] = str(score)
411 output[
"YAxialPositionRestraint_" + self.label] = str(score)
415 return self.weight * self.rs.unprotected_evaluate(
None)
418 """Create Y-Axial Position Lower restraints
424 consider_radius =
False,
427 @param representation representation
430 self.m = representation.prot.get_model()
436 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
437 cterminal = residues[-1]
440 yax.add_particle(cterminal)
441 self.rs.add_restraint(yax)
443 def set_label(self, label):
446 def add_to_model(self):
449 def get_restraint(self):
452 def set_weight(self, weight):
454 self.rs.set_weight(self.weight)
456 def get_output(self):
459 score = self.weight * self.rs.unprotected_evaluate(
None)
460 output[
"_TotalScore"] = str(score)
461 output[
"YAxialPositionLowerRestraint_" + self.label] = str(score)
465 return self.weight * self.rs.unprotected_evaluate(
None)
468 """Create Y-Axial Position Upper restraints
474 consider_radius =
False,
477 @param representation representation
480 self.m = representation.prot.get_model()
486 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
487 cterminal = residues[-1]
490 yax.add_particle(cterminal)
491 self.rs.add_restraint(yax)
493 def set_label(self, label):
496 def add_to_model(self):
499 def get_restraint(self):
502 def set_weight(self, weight):
504 self.rs.set_weight(self.weight)
506 def get_output(self):
509 score = self.weight * self.rs.unprotected_evaluate(
None)
510 output[
"_TotalScore"] = str(score)
511 output[
"YAxialPositionUpperRestraint_" + self.label] = str(score)
515 return self.weight * self.rs.unprotected_evaluate(
None)
519 """Create Membrane Surface Location Restraint
530 @param representation representation
533 self.m = representation.prot.get_model()
539 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=resolution)
540 for residue
in residues:
542 msl.add_particle(residue)
546 for p, state
in representation._protocol_output:
547 p.add_membrane_surface_location_restraint(
548 state, residues, tor_R, tor_r, tor_th, sigma, self)
550 self.rs.add_restraint(msl)
552 def set_label(self, label):
555 def add_to_model(self):
558 def get_restraint(self):
561 def set_weight(self, weight):
563 self.rs.set_weight(self.weight)
565 def get_output(self):
568 score = self.weight * self.rs.unprotected_evaluate(
None)
569 output[
"_TotalScore"] = str(score)
570 output[
"MembraneSurfaceLocationRestraint_" + self.label] = str(score)
574 return self.weight * self.rs.unprotected_evaluate(
None)
578 """Create Membrane Surface Location CONDITIONAL Restraint
579 for Nup120 ALPS Motifs - Mutually Exclusive from (135,152,'Nup120') and (197,216,'Nup120').
580 It returns a minimum penalty score from two potential ALPS motifs.
592 @param representation representation
595 self.m = representation.prot.get_model()
596 self.rs =
IMP.RestraintSet(self.m,
'MembraneSurfaceLocationConditionalRestraint')
601 residues1 = IMP.pmi1.tools.select_by_tuple(representation, protein1, resolution=resolution)
602 for residue
in residues1:
604 msl.add_particle1(residue)
605 residues2 = IMP.pmi1.tools.select_by_tuple(representation, protein2, resolution=resolution)
606 for residue
in residues2:
608 msl.add_particle2(residue)
613 for p, state
in representation._protocol_output:
614 for residues
in residues1, residues2:
615 p.add_membrane_surface_location_restraint(
616 state, residues, tor_R, tor_r, tor_th, sigma, self)
618 self.rs.add_restraint(msl)
620 def set_label(self, label):
623 def add_to_model(self):
626 def get_restraint(self):
629 def set_weight(self, weight):
631 self.rs.set_weight(self.weight)
633 def get_output(self):
636 score = self.weight * self.rs.unprotected_evaluate(
None)
637 output[
"_TotalScore"] = str(score)
638 output[
"MembraneSurfaceLocationConditionalRestraint_" + self.label] = str(score)
642 return self.weight * self.rs.unprotected_evaluate(
None)
646 """Create Membrane Exclusion Restraint
657 @param representation representation
660 self.m = representation.prot.get_model()
666 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=resolution)
667 for residue
in residues:
669 mex.add_particle(residue)
673 for p, state
in representation._protocol_output:
674 p.add_membrane_exclusion_restraint(
675 state, residues, tor_R, tor_r, tor_th, sigma, self)
677 self.rs.add_restraint(mex)
679 def set_label(self, label):
682 def add_to_model(self):
685 def get_restraint(self):
688 def set_weight(self, weight):
690 self.rs.set_weight(self.weight)
692 def get_output(self):
695 score = self.weight * self.rs.unprotected_evaluate(
None)
696 output[
"_TotalScore"] = str(score)
697 output[
"MembraneExclusionRestraint_" + self.label] = str(score)
701 return self.weight * self.rs.unprotected_evaluate(
None)
Create XYRadial Position Lower restraints.
Restrain particles by their z coordinate.
Create Y-Axial Position Upper restraints.
Create Z-Axial Position Lower restraints.
Create XYRadial Position Restraint.
Restrain particles by their y coordinate.
Create Z-Axial Position restraints.
Create Membrane Surface Location CONDITIONAL Restraint for Nup120 ALPS Motifs - Mutually Exclusive fr...
Restrain particles by their distance from the z axis in the xy plane.
Create Z-Axial Position Upper restraints.
Try to keep one set of particles localized on a membrane surface.
Restrain particles by their z coordinate.
Object used to hold a set of restraints.
Create Membrane Exclusion Restraint.
Create Y-Axial Position restraints.
Create Membrane Surface Location Restraint.
Try to keep particles away from a membrane.
Restrain particles by their distance from the z axis in the xy plane.
Try to keep particles localized on a membrane surface.
Create XYRadial Position Upper restraints.
Restraints designed for modeling the Nuclear Pore Complex (NPC)
Restrain particles by their z coordinate.
Restrain particles by their distance from the z axis in the xy plane.
Restrain particles by their y coordinate.
Restrain particles by their y coordinate.
Create Y-Axial Position Lower restraints.