IMP logo
IMP Reference Guide  2.6.1
The Integrative Modeling Platform
parameters.py
1 #!/usr/bin/env python
2 import IMP
3 import IMP.core
4 import IMP.algebra
5 import IMP.atom
6 import IMP.container
7 import IMP.isd
8 import IMP.pmi.tools
9 
10 class WeightRestraint(object):
11 
12  def __init__(self, weight, lower, upper, kappa):
13 
14  self.weight = weight
15  self.m = self.weight.get_model()
16  self.label = "None"
17  self.rs = IMP.RestraintSet(self.m, 'weight_restraint')
18  self.lower = lower
19  self.upper = upper
20  self.kappa = kappa
21  self.rs.add_restraint(
23  self.weight,
24  self.lower,
25  self.upper,
26  self.kappa))
27 
28  def get_restraint(self, label):
29  return self.rs
30 
31  def add_to_model(self):
33 
34  def set_label(self, label):
35  self.label = label
36 
37  def get_output(self):
38  self.m.update()
39  output = {}
40  score = self.rs.unprotected_evaluate(None)
41  output["_TotalScore"] = str(score)
42  output["WeightRestraint_" + self.label] = str(score)
43  return output
44 
45 
46 class JeffreysPrior(object):
47 
48  def __init__(self, nuisance):
49 
50  self.m = nuisance.get_model()
51  self.label = "None"
52  self.rs = IMP.RestraintSet(self.m, 'jeffrey_prior')
53  jp = IMP.isd.JeffreysRestraint(self.m, nuisance)
54  self.rs.add_restraint(jp)
55 
56  def add_to_model(self):
58 
59  def set_label(self, label):
60  self.label = label
61 
62  def get_output(self):
63  output = {}
64  score = self.rs.unprotected_evaluate(None)
65  output["_TotalScore"] = str(score)
66  output["JeffreyPrior_" + self.label] = str(score)
67  return output
68 
69 #
Various classes to hold sets of particles.
Miscellaneous utilities.
Definition: tools.py:1
Object used to hold a set of restraints.
Definition: RestraintSet.h:36
def add_restraint_to_model
Add a PMI restraint to the model.
Definition: tools.py:37
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Functionality for loading, creating, manipulating and scoring atomic structures.
Inferential scoring building on methods developed as part of the Inferential Structure Determination ...