IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
/restraints/parameters.py
1 """@namespace IMP.pmi1.restraints.parameters
2 Restraints for parameters.
3 """
4 
5 import IMP
6 import IMP.isd
7 import IMP.pmi1.tools
9 
10 
12 
13  """Wrapper for an ``IMP.isd.WeightRestraint``"""
14 
15  def __init__(self, w, lower, upper, kappa, label=None, weight=1.):
16  """Create restraint on weight parameter.
17  @param w ``IMP.isd.Weight`` particle
18  @param lower Lower bound on weight restraint
19  @param upper Upper bound on weight restraint
20  @param kappa Strength of restraint
21  @param label A unique label to be used in outputs
22  @param weight The weight to apply to all internal restraints
23  """
24  self.w = w
25  model = self.w.get_model()
26  super(WeightRestraint, self).__init__(model, label=label,
27  weight=weight)
28  self.lower = lower
29  self.upper = upper
30  self.kappa = kappa
31  self.rs.add_restraint(
33  self.w,
34  self.lower,
35  self.upper,
36  self.kappa))
37 
38 
40 
41  """Wrapper for ``IMP.isd.JeffreysRestraint``"""
42 
43  def __init__(self, nuisance, label=None, weight=1.):
44  """Create Jeffreys prior.
45  @param nuisance Nuisance parameter
46  @param label A unique label to be used in outputs
47  @param weight The weight to apply to all internal restraints
48  """
49  model = nuisance.get_model()
50  super(JeffreysPrior, self).__init__(model, label=label, weight=weight)
51  jp = IMP.isd.JeffreysRestraint(self.model, nuisance)
52  self.rs.add_restraint(jp)
def __init__
Create restraint on weight parameter.
Classes to handle different kinds of restraints.
Miscellaneous utilities.
Definition: /tools.py:1
Wrapper for IMP.isd.JeffreysRestraint
Base class for PMI restraints, which wrap IMP.Restraint(s).
Wrapper for an IMP.isd.WeightRestraint
Inferential scoring building on methods developed as part of the Inferential Structure Determination ...