5 from __future__
import print_function
19 IMP.Restraint.__init__(self, m,
"MyRestraint %1%")
23 def unprotected_evaluate(self, da):
25 for i
in range(1, len(self.ps)):
28 if p0.get_value(k) > p1.get_value(k):
29 diff = (p0.get_value(k) - p1.get_value(k))
31 p0.add_to_derivative(k, -1, da)
32 p1.add_to_derivative(k, 1, da)
35 print(p0.get_name(),
"and", p1.get_name(),
" are ok")
38 def do_get_inputs(self):
45 for i
in range(0, 10):
49 r = MyRestraint(m, ps, k)
51 print(r.evaluate(
True))
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
LogLevel get_log_level()
Get the currently active global log level.
Class for storing model, its restraints, constraints, and particles.
Class to handle individual model particles.
A restraint is a term in an IMP ScoringFunction.