IMP logo
IMP Reference Guide  2.8.0
The Integrative Modeling Platform
parameters.py
1 """@namespace IMP.pmi.restraints.parameters
2 Restraints for parameters.
3 """
4 
5 import IMP
6 import IMP.isd
7 import IMP.pmi.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  m = self.w.get_model()
26  super(WeightRestraint, self).__init__(m, label=label, weight=weight)
27  self.lower = lower
28  self.upper = upper
29  self.kappa = kappa
30  self.rs.add_restraint(
32  self.w,
33  self.lower,
34  self.upper,
35  self.kappa))
36 
37 
39 
40  """Wrapper for ``IMP.isd.JeffreysRestraint``"""
41 
42  def __init__(self, nuisance, label=None, weight=1.):
43  """Create Jeffreys prior.
44  @param nuisance Nuisance parameter
45  @param label A unique label to be used in outputs
46  @param weight The weight to apply to all internal restraints
47  """
48  m = nuisance.get_model()
49  super(JeffreysPrior, self).__init__(m, label=label, weight=weight)
50  jp = IMP.isd.JeffreysRestraint(self.m, nuisance)
51  self.rs.add_restraint(jp)
def __init__
Create Jeffreys prior.
Definition: parameters.py:43
Wrapper for an IMP.isd.WeightRestraint
Definition: parameters.py:11
Miscellaneous utilities.
Definition: tools.py:1
Classes to handle different kinds of restraints.
def __init__
Create restraint on weight parameter.
Definition: parameters.py:19
Wrapper for IMP.isd.JeffreysRestraint
Definition: parameters.py:38
Base class for PMI restraints, which wrap IMP.Restraint(s).
Inferential scoring building on methods developed as part of the Inferential Structure Determination ...