6 """Create XYRadial Position Restraint
13 consider_radius =
False,
18 @param representation representation
22 if representation
is None and hier
is not None:
23 self.m = hier.get_model()
24 elif hier
is None and representation
is not None:
25 self.m = representation.prot.get_model()
27 raise Exception(
"XYRadialPositionRestraint: must pass hier or representation")
35 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
37 terminal = residues[-1]
39 xyr.add_particle(terminal)
41 terminal = residues[0]
43 xyr.add_particle(terminal)
45 for residue
in residues:
47 xyr.add_particle(residue)
51 for p, state
in representation._protocol_output:
52 p.add_xyradial_restraint(state, residues, lower_bound,
53 upper_bound, sigma, self)
55 self.rs.add_restraint(xyr)
57 def set_label(self, label):
60 def add_to_model(self):
63 def get_restraint(self):
66 def set_weight(self, weight):
68 self.rs.set_weight(self.weight)
73 score = self.weight * self.rs.unprotected_evaluate(
None)
74 output[
"_TotalScore"] = str(score)
75 output[
"XYRadialPositionRestraint_" + self.label] = str(score)
79 return self.weight * self.rs.unprotected_evaluate(
None)
82 """Create XYRadial Position Lower restraints
85 representation =
None,
88 consider_radius =
False,
92 @param representation representation
96 if representation
is None and hier
is not None:
97 self.m = hier.get_model()
98 elif hier
is None and representation
is not None:
99 self.m = representation.prot.get_model()
101 raise Exception(
"XYRadialPositionLowerRestraint: must pass hier or representation")
109 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
110 cterminal = residues[-1]
113 xyr.add_particle(cterminal)
114 self.rs.add_restraint(xyr)
116 def set_label(self, label):
119 def add_to_model(self):
122 def get_restraint(self):
125 def set_weight(self, weight):
127 self.rs.set_weight(self.weight)
129 def get_output(self):
132 score = self.weight * self.rs.unprotected_evaluate(
None)
133 output[
"_TotalScore"] = str(score)
134 output[
"XYRadialPositionLowerRestraint_" + self.label] = str(score)
138 return self.weight * self.rs.unprotected_evaluate(
None)
141 """Create XYRadial Position Upper restraints
144 representation =
None,
147 consider_radius =
False,
151 @param representation representation
155 if representation
is None and hier
is not None:
156 self.m = hier.get_model()
157 elif hier
is None and representation
is not None:
158 self.m = representation.prot.get_model()
160 raise Exception(
"XYRadialPositionUpperRestraint: must pass hier or representation")
168 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
169 cterminal = residues[-1]
172 xyr.add_particle(cterminal)
173 self.rs.add_restraint(xyr)
175 def set_label(self, label):
178 def add_to_model(self):
181 def get_restraint(self):
184 def set_weight(self, weight):
186 self.rs.set_weight(self.weight)
188 def get_output(self):
191 score = self.weight * self.rs.unprotected_evaluate(
None)
192 output[
"_TotalScore"] = str(score)
193 output[
"XYRadialPositionUpperRestraint_" + self.label] = str(score)
197 return self.weight * self.rs.unprotected_evaluate(
None)
201 """Create Z-Axial Position restraints
204 representation =
None,
208 consider_radius =
False,
213 @param representation representation
217 if representation
is None and hier
is not None:
218 self.m = hier.get_model()
219 elif hier
is None and representation
is not None:
220 self.m = representation.prot.get_model()
222 raise Exception(
"ZAxialPositionRestraint: must pass hier or representation")
230 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
232 residues = residues[-1:]
234 residues = residues[:1]
235 for residue
in residues:
236 zax.add_particle(residue)
240 for p, state
in representation._protocol_output:
241 p.add_zaxial_restraint(state, residues, lower_bound,
242 upper_bound, sigma, self)
244 self.rs.add_restraint(zax)
246 def set_label(self, label):
249 def add_to_model(self):
252 def get_restraint(self):
255 def set_weight(self, weight):
257 self.rs.set_weight(self.weight)
259 def get_output(self):
262 score = self.weight * self.rs.unprotected_evaluate(
None)
263 output[
"_TotalScore"] = str(score)
264 output[
"ZAxialPositionRestraint_" + self.label] = str(score)
268 return self.weight * self.rs.unprotected_evaluate(
None)
271 """Create Z-Axial Position Lower restraints
274 representation =
None,
277 consider_radius =
False,
281 @param representation representation
285 if representation
is None and hier
is not None:
286 self.m = hier.get_model()
287 elif hier
is None and representation
is not None:
288 self.m = representation.prot.get_model()
290 raise Exception(
"ZAxialPositionLowerRestraint: must pass hier or representation")
298 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
299 cterminal = residues[-1]
302 zax.add_particle(cterminal)
303 self.rs.add_restraint(zax)
305 def set_label(self, label):
308 def add_to_model(self):
311 def get_restraint(self):
314 def set_weight(self, weight):
316 self.rs.set_weight(self.weight)
318 def get_output(self):
321 score = self.weight * self.rs.unprotected_evaluate(
None)
322 output[
"_TotalScore"] = str(score)
323 output[
"ZAxialPositionLowerRestraint_" + self.label] = str(score)
327 return self.weight * self.rs.unprotected_evaluate(
None)
330 """Create Z-Axial Position Upper restraints
333 representation =
None,
336 consider_radius =
False,
340 @param representation representation
344 if representation
is None and hier
is not None:
345 self.m = hier.get_model()
346 elif hier
is None and representation
is not None:
347 self.m = representation.prot.get_model()
349 raise Exception(
"ZAxialPositionUpperRestraint: must pass hier or representation")
357 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
358 cterminal = residues[-1]
361 zax.add_particle(cterminal)
362 self.rs.add_restraint(zax)
364 def set_label(self, label):
367 def add_to_model(self):
370 def get_restraint(self):
373 def set_weight(self, weight):
375 self.rs.set_weight(self.weight)
377 def get_output(self):
380 score = self.weight * self.rs.unprotected_evaluate(
None)
381 output[
"_TotalScore"] = str(score)
382 output[
"ZAxialPositionUpperRestraint_" + self.label] = str(score)
386 return self.weight * self.rs.unprotected_evaluate(
None)
390 """Create Y-Axial Position restraints
393 representation =
None,
397 consider_radius =
False,
402 @param representation representation
406 if representation
is None and hier
is not None:
407 self.m = hier.get_model()
408 elif hier
is None and representation
is not None:
409 self.m = representation.prot.get_model()
411 raise Exception(
"YAxialPositionRestraint: must pass hier or representation")
419 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
421 terminal = residues[-1]
423 yax.add_particle(terminal)
425 terminal = residues[0]
427 yax.add_particle(terminal)
429 for residue
in residues:
431 yax.add_particle(residue)
435 for p, state
in representation._protocol_output:
436 p.add_yaxial_restraint(state, residues, lower_bound,
437 upper_bound, sigma, self)
439 self.rs.add_restraint(yax)
441 def set_label(self, label):
444 def add_to_model(self):
447 def get_restraint(self):
450 def set_weight(self, weight):
452 self.rs.set_weight(self.weight)
454 def get_output(self):
457 score = self.weight * self.rs.unprotected_evaluate(
None)
458 output[
"_TotalScore"] = str(score)
459 output[
"YAxialPositionRestraint_" + self.label] = str(score)
463 return self.weight * self.rs.unprotected_evaluate(
None)
466 """Create Y-Axial Position Lower restraints
469 representation =
None,
472 consider_radius =
False,
476 @param representation representation
480 if representation
is None and hier
is not None:
481 self.m = hier.get_model()
482 elif hier
is None and representation
is not None:
483 self.m = representation.prot.get_model()
485 raise Exception(
"YAxialPositionLowerRestraint: must pass hier or representation")
493 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
494 cterminal = residues[-1]
497 yax.add_particle(cterminal)
498 self.rs.add_restraint(yax)
500 def set_label(self, label):
503 def add_to_model(self):
506 def get_restraint(self):
509 def set_weight(self, weight):
511 self.rs.set_weight(self.weight)
513 def get_output(self):
516 score = self.weight * self.rs.unprotected_evaluate(
None)
517 output[
"_TotalScore"] = str(score)
518 output[
"YAxialPositionLowerRestraint_" + self.label] = str(score)
522 return self.weight * self.rs.unprotected_evaluate(
None)
525 """Create Y-Axial Position Upper restraints
528 representation =
None,
531 consider_radius =
False,
535 @param representation representation
539 if representation
is None and hier
is not None:
540 self.m = hier.get_model()
541 elif hier
is None and representation
is not None:
542 self.m = representation.prot.get_model()
544 raise Exception(
"YAxialPositionUpperRestraint: must pass hier or representation")
552 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=1)
553 cterminal = residues[-1]
556 yax.add_particle(cterminal)
557 self.rs.add_restraint(yax)
559 def set_label(self, label):
562 def add_to_model(self):
565 def get_restraint(self):
568 def set_weight(self, weight):
570 self.rs.set_weight(self.weight)
572 def get_output(self):
575 score = self.weight * self.rs.unprotected_evaluate(
None)
576 output[
"_TotalScore"] = str(score)
577 output[
"YAxialPositionUpperRestraint_" + self.label] = str(score)
581 return self.weight * self.rs.unprotected_evaluate(
None)
585 """Create Membrane Surface Location Restraint
588 representation =
None,
597 @param representation representation
601 if representation
is None and hier
is not None:
602 self.m = hier.get_model()
603 elif hier
is None and representation
is not None:
604 self.m = representation.prot.get_model()
606 raise Exception(
"MembraneSurfaceLocationRestraint: must pass hier or representation")
613 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=resolution)
614 for residue
in residues:
616 msl.add_particle(residue)
620 for p, state
in representation._protocol_output:
621 p.add_membrane_surface_location_restraint(
622 state, residues, tor_R, tor_r, tor_th, sigma, self)
624 self.rs.add_restraint(msl)
626 def set_label(self, label):
629 def add_to_model(self):
632 def get_restraint(self):
635 def set_weight(self, weight):
637 self.rs.set_weight(self.weight)
639 def get_output(self):
642 score = self.weight * self.rs.unprotected_evaluate(
None)
643 output[
"_TotalScore"] = str(score)
644 output[
"MembraneSurfaceLocationRestraint_" + self.label] = str(score)
648 return self.weight * self.rs.unprotected_evaluate(
None)
652 """Create Membrane Surface Location CONDITIONAL Restraint
653 for Nup120 ALPS Motifs - Mutually Exclusive from (135,152,'Nup120') and (197,216,'Nup120').
654 It returns a minimum penalty score from two potential ALPS motifs.
657 representation =
None,
667 @param representation representation
671 if representation
is None and hier
is not None:
672 self.m = hier.get_model()
673 elif hier
is None and representation
is not None:
674 self.m = representation.prot.get_model()
676 raise Exception(
"MembraneSurfaceLocationConditionalRestraint: must pass hier or representation")
678 self.rs =
IMP.RestraintSet(self.m,
'MembraneSurfaceLocationConditionalRestraint')
683 residues1 = IMP.pmi1.tools.select_by_tuple(representation, protein1, resolution=resolution)
684 for residue
in residues1:
686 msl.add_particle1(residue)
687 residues2 = IMP.pmi1.tools.select_by_tuple(representation, protein2, resolution=resolution)
688 for residue
in residues2:
690 msl.add_particle2(residue)
695 for p, state
in representation._protocol_output:
696 for residues
in residues1, residues2:
697 p.add_membrane_surface_location_restraint(
698 state, residues, tor_R, tor_r, tor_th, sigma, self)
700 self.rs.add_restraint(msl)
702 def set_label(self, label):
705 def add_to_model(self):
708 def get_restraint(self):
711 def set_weight(self, weight):
713 self.rs.set_weight(self.weight)
715 def get_output(self):
718 score = self.weight * self.rs.unprotected_evaluate(
None)
719 output[
"_TotalScore"] = str(score)
720 output[
"MembraneSurfaceLocationConditionalRestraint_" + self.label] = str(score)
724 return self.weight * self.rs.unprotected_evaluate(
None)
728 """Create Membrane Exclusion Restraint
731 representation =
None,
740 @param representation representation
744 if representation
is None and hier
is not None:
745 self.m = hier.get_model()
746 elif hier
is None and representation
is not None:
747 self.m = representation.prot.get_model()
749 raise Exception(
"MembraneExclusionRestraint: must pass hier or representation")
756 residues = IMP.pmi1.tools.select_by_tuple(representation, protein, resolution=resolution)
757 for residue
in residues:
759 mex.add_particle(residue)
763 for p, state
in representation._protocol_output:
764 p.add_membrane_exclusion_restraint(
765 state, residues, tor_R, tor_r, tor_th, sigma, self)
767 self.rs.add_restraint(mex)
769 def set_label(self, label):
772 def add_to_model(self):
775 def get_restraint(self):
778 def set_weight(self, weight):
780 self.rs.set_weight(self.weight)
782 def get_output(self):
785 score = self.weight * self.rs.unprotected_evaluate(
None)
786 output[
"_TotalScore"] = str(score)
787 output[
"MembraneExclusionRestraint_" + self.label] = str(score)
791 return self.weight * self.rs.unprotected_evaluate(
None)
Create Z-Axial Position Upper restraints.
Restrain particles by their z coordinate.
Create Z-Axial Position restraints.
Restrain particles by their y coordinate.
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 Y-Axial Position restraints.
Try to keep one set of particles localized on a membrane surface.
Restrain particles by their z coordinate.
Create Membrane Surface Location Restraint.
Object used to hold a set of restraints.
Create Y-Axial Position Lower restraints.
Try to keep particles away from a membrane.
Restrain particles by their distance from the z axis in the xy plane.
Create XYRadial Position Restraint.
Try to keep particles localized on a membrane surface.
Create Y-Axial Position Upper restraints.
The general base class for IMP exceptions.
Create Z-Axial Position Lower restraints.
Restraints designed for modeling the Nuclear Pore Complex (NPC)
Create XYRadial Position Lower restraints.
Create Membrane Exclusion Restraint.
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.
Create XYRadial Position Upper restraints.
Restrain particles by their y coordinate.