A few comments: - don't call set_model on restraints. That method is there so that restraints can override it to take action upon being added to the model. One needs to call model.add_restraint(), otherwise the model won't know what needs to be done in order to accurately evaluate the restraint (and won't include the restraint in its evaluated score). - the number returned by a call to unprotected_evaluate may not be correct as invariants maintained by ScoreStates or Constraints may not be respected. Call evaluate instead. - in the example below, I'm not quite sure what self.ass is - since misres is never added to the model, model.evaluate() and minres.evaluate() wouldn't be expected to produce the same answer. Specifically, E_minres should be less than E_ini as it is taking a subset of the scoring terms. - Also, you probably want to remove the old restraints from the model so that the only score is the minimumrestraint score (eg for r in res: model.remove_restraint(r)) Does that help? On Apr 13, 2011, at 2:14 AM, Pia Unverdorben wrote:
|