I'd suggest not adding restraints to the model at all. Instead, Gather your restraints as you want and create different ScoringFynction objects for the different purposes. 

It keeps code a bit simpler and can be faster. Also, I think Model::remove_restraint is undocumented. 

Sent from Mailbox for iPhone


On Sat, Mar 15, 2014 at 6:33 PM, harianto tjong <htjong@usc.edu> wrote:

Thanks, Ben!
I will check for the resolution.

Ricardo, in my installation it is terminated with: AttributeError: set_weight.
Thanks for trying out, Ricardo!

Best,
Harianto.


On Sat, Mar 15, 2014 at 1:20 PM, Ben Webb <ben@salilab.org> wrote:
On 3/14/14, 6:35 PM, harianto tjong wrote:
But when I add at the end of the code:
m.remove_restraint(r)
then it will be Segmentation fault.

Sounds like a bug to me - we'll investigate. I've opened an issue for it at https://github.com/salilab/imp/issues/767 - you can follow that to see the resolution.

        Ben
--
ben@salilab.org                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
        - Sir Arthur Conan Doyle

_______________________________________________
IMP-users mailing list
IMP-users@salilab.org
https://salilab.org/mailman/listinfo/imp-users