5 """Create XYRadial Position Restraint
12 consider_radius =
False,
17 @param representation representation
21 if representation
is None and hier
is not None:
22 self.m = hier.get_model()
23 elif hier
is None and representation
is not None:
24 self.m = representation.prot.get_model()
26 raise Exception(
"XYRadialPositionRestraint: must pass hier or representation")
34 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
36 terminal = residues[-1]
38 xyr.add_particle(terminal)
40 terminal = residues[0]
42 xyr.add_particle(terminal)
44 for residue
in residues:
46 xyr.add_particle(residue)
50 for p, state
in representation._protocol_output:
51 p.add_xyradial_restraint(state, residues, lower_bound,
52 upper_bound, sigma, self)
54 self.rs.add_restraint(xyr)
56 def set_label(self, label):
59 def add_to_model(self):
62 def get_restraint(self):
65 def set_weight(self, weight):
67 self.rs.set_weight(self.weight)
72 score = self.weight * self.rs.unprotected_evaluate(
None)
73 output[
"_TotalScore"] = str(score)
74 output[
"XYRadialPositionRestraint_" + self.label] = str(score)
78 return self.weight * self.rs.unprotected_evaluate(
None)
81 """Create XYRadial Position Lower restraints
84 representation =
None,
87 consider_radius =
False,
91 @param representation representation
95 if representation
is None and hier
is not None:
96 self.m = hier.get_model()
97 elif hier
is None and representation
is not None:
98 self.m = representation.prot.get_model()
100 raise Exception(
"XYRadialPositionLowerRestraint: must pass hier or representation")
108 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
109 cterminal = residues[-1]
112 xyr.add_particle(cterminal)
113 self.rs.add_restraint(xyr)
115 def set_label(self, label):
118 def add_to_model(self):
121 def get_restraint(self):
124 def set_weight(self, weight):
126 self.rs.set_weight(self.weight)
128 def get_output(self):
131 score = self.weight * self.rs.unprotected_evaluate(
None)
132 output[
"_TotalScore"] = str(score)
133 output[
"XYRadialPositionLowerRestraint_" + self.label] = str(score)
137 return self.weight * self.rs.unprotected_evaluate(
None)
140 """Create XYRadial Position Upper restraints
143 representation =
None,
146 consider_radius =
False,
150 @param representation representation
154 if representation
is None and hier
is not None:
155 self.m = hier.get_model()
156 elif hier
is None and representation
is not None:
157 self.m = representation.prot.get_model()
159 raise Exception(
"XYRadialPositionUpperRestraint: must pass hier or representation")
167 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
168 cterminal = residues[-1]
171 xyr.add_particle(cterminal)
172 self.rs.add_restraint(xyr)
174 def set_label(self, label):
177 def add_to_model(self):
180 def get_restraint(self):
183 def set_weight(self, weight):
185 self.rs.set_weight(self.weight)
187 def get_output(self):
190 score = self.weight * self.rs.unprotected_evaluate(
None)
191 output[
"_TotalScore"] = str(score)
192 output[
"XYRadialPositionUpperRestraint_" + self.label] = str(score)
196 return self.weight * self.rs.unprotected_evaluate(
None)
200 """Create Z-Axial Position restraints
203 representation =
None,
207 consider_radius =
False,
212 @param representation representation
216 if representation
is None and hier
is not None:
217 self.m = hier.get_model()
218 elif hier
is None and representation
is not None:
219 self.m = representation.prot.get_model()
221 raise Exception(
"ZAxialPositionRestraint: must pass hier or representation")
229 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
231 residues = residues[-1:]
233 residues = residues[:1]
234 for residue
in residues:
235 zax.add_particle(residue)
239 for p, state
in representation._protocol_output:
240 p.add_zaxial_restraint(state, residues, lower_bound,
241 upper_bound, sigma, self)
243 self.rs.add_restraint(zax)
245 def set_label(self, label):
248 def add_to_model(self):
251 def get_restraint(self):
254 def set_weight(self, weight):
256 self.rs.set_weight(self.weight)
258 def get_output(self):
261 score = self.weight * self.rs.unprotected_evaluate(
None)
262 output[
"_TotalScore"] = str(score)
263 output[
"ZAxialPositionRestraint_" + self.label] = str(score)
267 return self.weight * self.rs.unprotected_evaluate(
None)
270 """Create Z-Axial Position Lower restraints
273 representation =
None,
276 consider_radius =
False,
280 @param representation representation
284 if representation
is None and hier
is not None:
285 self.m = hier.get_model()
286 elif hier
is None and representation
is not None:
287 self.m = representation.prot.get_model()
289 raise Exception(
"ZAxialPositionLowerRestraint: must pass hier or representation")
297 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
298 cterminal = residues[-1]
301 zax.add_particle(cterminal)
302 self.rs.add_restraint(zax)
304 def set_label(self, label):
307 def add_to_model(self):
310 def get_restraint(self):
313 def set_weight(self, weight):
315 self.rs.set_weight(self.weight)
317 def get_output(self):
320 score = self.weight * self.rs.unprotected_evaluate(
None)
321 output[
"_TotalScore"] = str(score)
322 output[
"ZAxialPositionLowerRestraint_" + self.label] = str(score)
326 return self.weight * self.rs.unprotected_evaluate(
None)
329 """Create Z-Axial Position Upper restraints
332 representation =
None,
335 consider_radius =
False,
339 @param representation representation
343 if representation
is None and hier
is not None:
344 self.m = hier.get_model()
345 elif hier
is None and representation
is not None:
346 self.m = representation.prot.get_model()
348 raise Exception(
"ZAxialPositionUpperRestraint: must pass hier or representation")
356 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
357 cterminal = residues[-1]
360 zax.add_particle(cterminal)
361 self.rs.add_restraint(zax)
363 def set_label(self, label):
366 def add_to_model(self):
369 def get_restraint(self):
372 def set_weight(self, weight):
374 self.rs.set_weight(self.weight)
376 def get_output(self):
379 score = self.weight * self.rs.unprotected_evaluate(
None)
380 output[
"_TotalScore"] = str(score)
381 output[
"ZAxialPositionUpperRestraint_" + self.label] = str(score)
385 return self.weight * self.rs.unprotected_evaluate(
None)
389 """Create Y-Axial Position restraints
392 representation =
None,
396 consider_radius =
False,
401 @param representation representation
405 if representation
is None and hier
is not None:
406 self.m = hier.get_model()
407 elif hier
is None and representation
is not None:
408 self.m = representation.prot.get_model()
410 raise Exception(
"YAxialPositionRestraint: must pass hier or representation")
418 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
420 terminal = residues[-1]
422 yax.add_particle(terminal)
424 terminal = residues[0]
426 yax.add_particle(terminal)
428 for residue
in residues:
430 yax.add_particle(residue)
434 for p, state
in representation._protocol_output:
435 p.add_yaxial_restraint(state, residues, lower_bound,
436 upper_bound, sigma, self)
438 self.rs.add_restraint(yax)
440 def set_label(self, label):
443 def add_to_model(self):
446 def get_restraint(self):
449 def set_weight(self, weight):
451 self.rs.set_weight(self.weight)
453 def get_output(self):
456 score = self.weight * self.rs.unprotected_evaluate(
None)
457 output[
"_TotalScore"] = str(score)
458 output[
"YAxialPositionRestraint_" + self.label] = str(score)
462 return self.weight * self.rs.unprotected_evaluate(
None)
465 """Create Y-Axial Position Lower restraints
468 representation =
None,
471 consider_radius =
False,
475 @param representation representation
479 if representation
is None and hier
is not None:
480 self.m = hier.get_model()
481 elif hier
is None and representation
is not None:
482 self.m = representation.prot.get_model()
484 raise Exception(
"YAxialPositionLowerRestraint: must pass hier or representation")
492 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
493 cterminal = residues[-1]
496 yax.add_particle(cterminal)
497 self.rs.add_restraint(yax)
499 def set_label(self, label):
502 def add_to_model(self):
505 def get_restraint(self):
508 def set_weight(self, weight):
510 self.rs.set_weight(self.weight)
512 def get_output(self):
515 score = self.weight * self.rs.unprotected_evaluate(
None)
516 output[
"_TotalScore"] = str(score)
517 output[
"YAxialPositionLowerRestraint_" + self.label] = str(score)
521 return self.weight * self.rs.unprotected_evaluate(
None)
524 """Create Y-Axial Position Upper restraints
527 representation =
None,
530 consider_radius =
False,
534 @param representation representation
538 if representation
is None and hier
is not None:
539 self.m = hier.get_model()
540 elif hier
is None and representation
is not None:
541 self.m = representation.prot.get_model()
543 raise Exception(
"YAxialPositionUpperRestraint: must pass hier or representation")
551 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
552 cterminal = residues[-1]
555 yax.add_particle(cterminal)
556 self.rs.add_restraint(yax)
558 def set_label(self, label):
561 def add_to_model(self):
564 def get_restraint(self):
567 def set_weight(self, weight):
569 self.rs.set_weight(self.weight)
571 def get_output(self):
574 score = self.weight * self.rs.unprotected_evaluate(
None)
575 output[
"_TotalScore"] = str(score)
576 output[
"YAxialPositionUpperRestraint_" + self.label] = str(score)
580 return self.weight * self.rs.unprotected_evaluate(
None)
584 """Create Membrane Surface Location Restraint
587 representation =
None,
596 @param representation representation
600 if representation
is None and hier
is not None:
601 self.m = hier.get_model()
602 elif hier
is None and representation
is not None:
603 self.m = representation.prot.get_model()
605 raise Exception(
"MembraneSurfaceLocationRestraint: must pass hier or representation")
612 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=resolution)
613 for residue
in residues:
615 msl.add_particle(residue)
619 for p, state
in representation._protocol_output:
620 p.add_membrane_surface_location_restraint(
621 state, residues, tor_R, tor_r, tor_th, sigma, self)
623 self.rs.add_restraint(msl)
625 def set_label(self, label):
628 def add_to_model(self):
631 def get_restraint(self):
634 def set_weight(self, weight):
636 self.rs.set_weight(self.weight)
638 def get_output(self):
641 score = self.weight * self.rs.unprotected_evaluate(
None)
642 output[
"_TotalScore"] = str(score)
643 output[
"MembraneSurfaceLocationRestraint_" + self.label] = str(score)
647 return self.weight * self.rs.unprotected_evaluate(
None)
651 """Create Membrane Surface Location CONDITIONAL Restraint
652 for Nup120 ALPS Motifs - Mutually Exclusive from (135,152,'Nup120') and (197,216,'Nup120').
653 It returns a minimum penalty score from two potential ALPS motifs.
656 representation =
None,
666 @param representation representation
670 if representation
is None and hier
is not None:
671 self.m = hier.get_model()
672 elif hier
is None and representation
is not None:
673 self.m = representation.prot.get_model()
675 raise Exception(
"MembraneSurfaceLocationConditionalRestraint: must pass hier or representation")
677 self.rs =
IMP.RestraintSet(self.m,
'MembraneSurfaceLocationConditionalRestraint')
682 residues1 = IMP.pmi.tools.select_by_tuple(representation, protein1, resolution=resolution)
683 for residue
in residues1:
685 msl.add_particle1(residue)
686 residues2 = IMP.pmi.tools.select_by_tuple(representation, protein2, resolution=resolution)
687 for residue
in residues2:
689 msl.add_particle2(residue)
694 for p, state
in representation._protocol_output:
695 for residues
in residues1, residues2:
696 p.add_membrane_surface_location_restraint(
697 state, residues, tor_R, tor_r, tor_th, sigma, self)
699 self.rs.add_restraint(msl)
701 def set_label(self, label):
704 def add_to_model(self):
707 def get_restraint(self):
710 def set_weight(self, weight):
712 self.rs.set_weight(self.weight)
714 def get_output(self):
717 score = self.weight * self.rs.unprotected_evaluate(
None)
718 output[
"_TotalScore"] = str(score)
719 output[
"MembraneSurfaceLocationConditionalRestraint_" + self.label] = str(score)
723 return self.weight * self.rs.unprotected_evaluate(
None)
727 """Create Membrane Exclusion Restraint
730 representation =
None,
739 @param representation representation
743 if representation
is None and hier
is not None:
744 self.m = hier.get_model()
745 elif hier
is None and representation
is not None:
746 self.m = representation.prot.get_model()
748 raise Exception(
"MembraneExclusionRestraint: must pass hier or representation")
755 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=resolution)
756 for residue
in residues:
758 mex.add_particle(residue)
762 for p, state
in representation._protocol_output:
763 p.add_membrane_exclusion_restraint(
764 state, residues, tor_R, tor_r, tor_th, sigma, self)
766 self.rs.add_restraint(mex)
768 def set_label(self, label):
771 def add_to_model(self):
774 def get_restraint(self):
777 def set_weight(self, weight):
779 self.rs.set_weight(self.weight)
781 def get_output(self):
784 score = self.weight * self.rs.unprotected_evaluate(
None)
785 output[
"_TotalScore"] = str(score)
786 output[
"MembraneExclusionRestraint_" + self.label] = str(score)
790 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.
Representation of the system.
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.
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.