Dear all,
I have a question concerning the MinimumRestraint Class.
My problem is, that I don't know exactly how to handle it, so that I can use the modified assembly further, in my case for an optimization with the restraints still switched off. When I read in an assembly (model and restraints), evaluate it before and after I applied MinimumRestraints, I obtain the same value. But with MinimumRestraint.unprotected_evaluate it gives back a smaller score.
Here is the specific part (inactivate_pct is the percentage of restraints I want to inactivate):
E_ini=self.ass.evaluate(False) res=self.ass.restraints.restraint_sets['rigid_bodies'].get_restraints() l=len(res) num=int((1-inactivate_pct)*l) minres=IMP.core.MinimumRestraint(num, res, 'MinimumRestraint') minres.set_model(self.ass.model) E_minres=minres.unprotected_evaluate(IMP.DerivativeAccumulator(1.0)) E_end=self.ass.evaluate(False)
So E_ini = E_end > E_minres. How can I access the changed model??
Thanks a lot in advance!
Pia