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)
47 self.rs.add_restraint(xyr)
49 def set_label(self, label):
52 def add_to_model(self):
55 def get_restraint(self):
58 def set_weight(self, weight):
60 self.rs.set_weight(self.weight)
65 score = self.weight * self.rs.unprotected_evaluate(
None)
66 output[
"_TotalScore"] = str(score)
67 output[
"XYRadialPositionRestraint_" + self.label] = str(score)
71 return self.weight * self.rs.unprotected_evaluate(
None)
74 """Create XYRadial Position Lower restraints
77 representation =
None,
80 consider_radius =
False,
84 @param representation representation
88 if representation
is None and hier
is not None:
89 self.m = hier.get_model()
90 elif hier
is None and representation
is not None:
91 self.m = representation.prot.get_model()
93 raise Exception(
"XYRadialPositionLowerRestraint: must pass hier or representation")
101 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
102 cterminal = residues[-1]
105 xyr.add_particle(cterminal)
106 self.rs.add_restraint(xyr)
108 def set_label(self, label):
111 def add_to_model(self):
114 def get_restraint(self):
117 def set_weight(self, weight):
119 self.rs.set_weight(self.weight)
121 def get_output(self):
124 score = self.weight * self.rs.unprotected_evaluate(
None)
125 output[
"_TotalScore"] = str(score)
126 output[
"XYRadialPositionLowerRestraint_" + self.label] = str(score)
130 return self.weight * self.rs.unprotected_evaluate(
None)
133 """Create XYRadial Position Upper restraints
136 representation =
None,
139 consider_radius =
False,
143 @param representation representation
147 if representation
is None and hier
is not None:
148 self.m = hier.get_model()
149 elif hier
is None and representation
is not None:
150 self.m = representation.prot.get_model()
152 raise Exception(
"XYRadialPositionUpperRestraint: must pass hier or representation")
160 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
161 cterminal = residues[-1]
164 xyr.add_particle(cterminal)
165 self.rs.add_restraint(xyr)
167 def set_label(self, label):
170 def add_to_model(self):
173 def get_restraint(self):
176 def set_weight(self, weight):
178 self.rs.set_weight(self.weight)
180 def get_output(self):
183 score = self.weight * self.rs.unprotected_evaluate(
None)
184 output[
"_TotalScore"] = str(score)
185 output[
"XYRadialPositionUpperRestraint_" + self.label] = str(score)
189 return self.weight * self.rs.unprotected_evaluate(
None)
193 """Create Z-Axial Position restraints
196 representation =
None,
200 consider_radius =
False,
205 @param representation representation
209 if representation
is None and hier
is not None:
210 self.m = hier.get_model()
211 elif hier
is None and representation
is not None:
212 self.m = representation.prot.get_model()
214 raise Exception(
"ZAxialPositionRestraint: must pass hier or representation")
222 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
224 residues = residues[-1:]
226 residues = residues[:1]
227 for residue
in residues:
228 zax.add_particle(residue)
232 for p, state
in representation._protocol_output:
233 p.add_zaxial_restraint(state, residues, lower_bound,
234 upper_bound, sigma, self)
236 self.rs.add_restraint(zax)
238 def set_label(self, label):
241 def add_to_model(self):
244 def get_restraint(self):
247 def set_weight(self, weight):
249 self.rs.set_weight(self.weight)
251 def get_output(self):
254 score = self.weight * self.rs.unprotected_evaluate(
None)
255 output[
"_TotalScore"] = str(score)
256 output[
"ZAxialPositionRestraint_" + self.label] = str(score)
260 return self.weight * self.rs.unprotected_evaluate(
None)
263 """Create Z-Axial Position Lower restraints
266 representation =
None,
269 consider_radius =
False,
273 @param representation representation
277 if representation
is None and hier
is not None:
278 self.m = hier.get_model()
279 elif hier
is None and representation
is not None:
280 self.m = representation.prot.get_model()
282 raise Exception(
"ZAxialPositionLowerRestraint: must pass hier or representation")
290 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
291 cterminal = residues[-1]
294 zax.add_particle(cterminal)
295 self.rs.add_restraint(zax)
297 def set_label(self, label):
300 def add_to_model(self):
303 def get_restraint(self):
306 def set_weight(self, weight):
308 self.rs.set_weight(self.weight)
310 def get_output(self):
313 score = self.weight * self.rs.unprotected_evaluate(
None)
314 output[
"_TotalScore"] = str(score)
315 output[
"ZAxialPositionLowerRestraint_" + self.label] = str(score)
319 return self.weight * self.rs.unprotected_evaluate(
None)
322 """Create Z-Axial Position Upper restraints
325 representation =
None,
328 consider_radius =
False,
332 @param representation representation
336 if representation
is None and hier
is not None:
337 self.m = hier.get_model()
338 elif hier
is None and representation
is not None:
339 self.m = representation.prot.get_model()
341 raise Exception(
"ZAxialPositionUpperRestraint: must pass hier or representation")
349 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
350 cterminal = residues[-1]
353 zax.add_particle(cterminal)
354 self.rs.add_restraint(zax)
356 def set_label(self, label):
359 def add_to_model(self):
362 def get_restraint(self):
365 def set_weight(self, weight):
367 self.rs.set_weight(self.weight)
369 def get_output(self):
372 score = self.weight * self.rs.unprotected_evaluate(
None)
373 output[
"_TotalScore"] = str(score)
374 output[
"ZAxialPositionUpperRestraint_" + self.label] = str(score)
378 return self.weight * self.rs.unprotected_evaluate(
None)
382 """Create Y-Axial Position restraints
385 representation =
None,
389 consider_radius =
False,
394 @param representation representation
398 if representation
is None and hier
is not None:
399 self.m = hier.get_model()
400 elif hier
is None and representation
is not None:
401 self.m = representation.prot.get_model()
403 raise Exception(
"YAxialPositionRestraint: must pass hier or representation")
411 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
413 terminal = residues[-1]
415 yax.add_particle(terminal)
417 terminal = residues[0]
419 yax.add_particle(terminal)
421 for residue
in residues:
423 yax.add_particle(residue)
424 self.rs.add_restraint(yax)
426 def set_label(self, label):
429 def add_to_model(self):
432 def get_restraint(self):
435 def set_weight(self, weight):
437 self.rs.set_weight(self.weight)
439 def get_output(self):
442 score = self.weight * self.rs.unprotected_evaluate(
None)
443 output[
"_TotalScore"] = str(score)
444 output[
"YAxialPositionRestraint_" + self.label] = str(score)
448 return self.weight * self.rs.unprotected_evaluate(
None)
451 """Create Y-Axial Position Lower restraints
454 representation =
None,
457 consider_radius =
False,
461 @param representation representation
465 if representation
is None and hier
is not None:
466 self.m = hier.get_model()
467 elif hier
is None and representation
is not None:
468 self.m = representation.prot.get_model()
470 raise Exception(
"YAxialPositionLowerRestraint: must pass hier or representation")
478 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
479 cterminal = residues[-1]
482 yax.add_particle(cterminal)
483 self.rs.add_restraint(yax)
485 def set_label(self, label):
488 def add_to_model(self):
491 def get_restraint(self):
494 def set_weight(self, weight):
496 self.rs.set_weight(self.weight)
498 def get_output(self):
501 score = self.weight * self.rs.unprotected_evaluate(
None)
502 output[
"_TotalScore"] = str(score)
503 output[
"YAxialPositionLowerRestraint_" + self.label] = str(score)
507 return self.weight * self.rs.unprotected_evaluate(
None)
510 """Create Y-Axial Position Upper restraints
513 representation =
None,
516 consider_radius =
False,
520 @param representation representation
524 if representation
is None and hier
is not None:
525 self.m = hier.get_model()
526 elif hier
is None and representation
is not None:
527 self.m = representation.prot.get_model()
529 raise Exception(
"YAxialPositionUpperRestraint: must pass hier or representation")
537 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=1)
538 cterminal = residues[-1]
541 yax.add_particle(cterminal)
542 self.rs.add_restraint(yax)
544 def set_label(self, label):
547 def add_to_model(self):
550 def get_restraint(self):
553 def set_weight(self, weight):
555 self.rs.set_weight(self.weight)
557 def get_output(self):
560 score = self.weight * self.rs.unprotected_evaluate(
None)
561 output[
"_TotalScore"] = str(score)
562 output[
"YAxialPositionUpperRestraint_" + self.label] = str(score)
566 return self.weight * self.rs.unprotected_evaluate(
None)
570 """Create Membrane Surface Location Restraint
573 representation =
None,
582 @param representation representation
586 if representation
is None and hier
is not None:
587 self.m = hier.get_model()
588 elif hier
is None and representation
is not None:
589 self.m = representation.prot.get_model()
591 raise Exception(
"MembraneSurfaceLocationRestraint: must pass hier or representation")
598 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=resolution)
599 for residue
in residues:
601 msl.add_particle(residue)
605 for p, state
in representation._protocol_output:
606 p.add_membrane_surface_location_restraint(
607 state, residues, tor_R, tor_r, tor_th, sigma, self)
609 self.rs.add_restraint(msl)
611 def set_label(self, label):
614 def add_to_model(self):
617 def get_restraint(self):
620 def set_weight(self, weight):
622 self.rs.set_weight(self.weight)
624 def get_output(self):
627 score = self.weight * self.rs.unprotected_evaluate(
None)
628 output[
"_TotalScore"] = str(score)
629 output[
"MembraneSurfaceLocationRestraint_" + self.label] = str(score)
633 return self.weight * self.rs.unprotected_evaluate(
None)
637 """Create Membrane Surface Location CONDITIONAL Restraint
638 for Nup120 ALPS Motifs - Mutually Exclusive from (135,152,'Nup120') and (197,216,'Nup120').
639 It returns a minimum penalty score from two potential ALPS motifs.
642 representation =
None,
652 @param representation representation
656 if representation
is None and hier
is not None:
657 self.m = hier.get_model()
658 elif hier
is None and representation
is not None:
659 self.m = representation.prot.get_model()
661 raise Exception(
"MembraneSurfaceLocationConditionalRestraint: must pass hier or representation")
663 self.rs =
IMP.RestraintSet(self.m,
'MembraneSurfaceLocationConditionalRestraint')
668 residues1 = IMP.pmi.tools.select_by_tuple(representation, protein1, resolution=resolution)
669 for residue
in residues1:
671 msl.add_particle1(residue)
672 residues2 = IMP.pmi.tools.select_by_tuple(representation, protein2, resolution=resolution)
673 for residue
in residues2:
675 msl.add_particle2(residue)
676 self.rs.add_restraint(msl)
678 def set_label(self, label):
681 def add_to_model(self):
684 def get_restraint(self):
687 def set_weight(self, weight):
689 self.rs.set_weight(self.weight)
691 def get_output(self):
694 score = self.weight * self.rs.unprotected_evaluate(
None)
695 output[
"_TotalScore"] = str(score)
696 output[
"MembraneSurfaceLocationConditionalRestraint_" + self.label] = str(score)
700 return self.weight * self.rs.unprotected_evaluate(
None)
704 """Create Membrane Exclusion Restraint
707 representation =
None,
716 @param representation representation
720 if representation
is None and hier
is not None:
721 self.m = hier.get_model()
722 elif hier
is None and representation
is not None:
723 self.m = representation.prot.get_model()
725 raise Exception(
"MembraneExclusionRestraint: must pass hier or representation")
732 residues = IMP.pmi.tools.select_by_tuple(representation, protein, resolution=resolution)
733 for residue
in residues:
735 mex.add_particle(residue)
736 self.rs.add_restraint(mex)
738 def set_label(self, label):
741 def add_to_model(self):
744 def get_restraint(self):
747 def set_weight(self, weight):
749 self.rs.set_weight(self.weight)
751 def get_output(self):
754 score = self.weight * self.rs.unprotected_evaluate(
None)
755 output[
"_TotalScore"] = str(score)
756 output[
"MembraneExclusionRestraint_" + self.label] = str(score)
760 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.